NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Question about /home



On Jan 22, 12:18, Michael Parson wrote:
} On 2022-01-22 11:20, Todd Gruhn wrote:
} > is /home in the  /  directory?   What happens if  /  is too small?
} 
} > Can it be moved to /usr?
} 
} It can be, as long as you either symlink /usr/home to /home, or fix

     Skip the symlink.

} everything that looks for home dirs to know to look in /usr/home.
} This will mostly be fixing entries in /etc/passwd, but there could be
} scripts, config files, etc, that expect a given user's $HOME to be under
} /home

     This may be okay, if it is a simple one-off script that you
write for your own system.  If the script came from somewhere else,
then it is big time broken and should be summarily rm'ed.

} > I recall that /home had its own filesystem/sector once upon a time...
} 
} Back in the old days, when disks were measured in megabytes, possibly
} small numbers of gigabytes, and before we had things like log structured
} filesystems, it was good practice to separate stuff that might have
} lots of read/writes off the / filesystem so that should something
} catastrophic happen (power loss, kernel panic, etc), the potential
} corruption to / would be limited and it would most likely pass the
} boot-up fsck and you'd have a functional enough system to repair any
} other damage that might have been done. So you might have /usr, /var,

     If your system is critical, then this should still be done.

} and /home on separate partitions or even disks. If you were in a
} networked environment, /home might even be an NFS mount from somewhere
} else, might even have /usr/local be an NFS mount that has common tools
} or programs that might be shared across multiple systems.
} 
} In those days, I tended to set up my systems to look something like:
} 
} /
} /var
} /home
} /usr
} /tmp (tended to be a ramdisk of some sort)

     /tmp should always be a separate file system for security
reasons (prevents games like hard linking to system files).

} Then, depending on the number of disks I had, if it was a networked
} environment with shared resources, etc, I might have separate /usr/local
} partition, disk, or network mount, /home might be shared from a central
} server, etc.
} 
} The other advantage to separate partitions back then was that the unix
} tape-backup program dump(8) used to only be able to handle things on the
} partition level, so, in order to back up /home separate from the other
} stuff, you needed /home to be on a partition of its own. At some point,
} at least on NetBSD, dump(8) was adapted to handle things at a directory
} level, removing that limitation.

     This is because unlike any other "normal" program, dump(8)
actually goes to the raw disk and reads the data directly rather
than going through the file system.

} KF5LGQ

     VA7JMN

}-- End of excerpt from Michael Parson


Home | Main Index | Thread Index | Old Index