Adding a new drive / fstab

Ben Scott dragonhawk at gmail.com
Thu Jul 10 13:50:28 EDT 2008


On Thu, Jul 10, 2008 at 11:33 AM, V. Alex Brennen <vab at mit.edu> wrote:
> The reason that many people avoid putting anything under '/' that is not
> created by the operating system itself is that if you have any type of
> problem mounting the disk space that you plan to use under that
> directory, your programs or system can fill the '/' partition ...

  The same would be true of /mnt/, of course, unless that is its own
filesystem separate from the root.  And on many (most?) modern Linux
distros, the default is for one big partition for everything.  If one
sets permissions on the underlying mount point such that write access
is denied, you could solve that problem without resorting to a
separate partition just for mount points.  "chattr +i /mnt", for
example.

  Myself, I haven't worried about it much, but I haven't had to deal
much with different filesystem storages on the same host.  If one
filesystem isn't mounting, it will generally be noticed immediately,
because all sorts of things won't be working.  If I had big storage
appliances or lots of cross-mounts, like you described, my story would
likely be different.  "Experience is what you get by not having it
when you need it" and all that.  :)

  I *do* tend to create separate filesystems, but for other reasons.
I'm most concerned with a runaway process filling up the filesystem it
is *supposed* to be writing to.  For example, a malfunctioning process
generating tons of log messages can fill up the log partition.  (Which
can in turn cause all sorts of processes to hang/crash.)  So I isolate
them for that reason.  It also localizes filesystem fragmentation, and
allows for more selective use of the "noexec" option to "mount" as a
defense against malware.

  I use LVM rather than simple partitions to make resizing/reallocation easier.

  For example, on the GNHLUG server, there are LVs for / (root), swap,
/usr, /usr/local, /home, /sites, /tmp, /var/, /var/log, and
/var/spool.

> Linux has become somewhat resistant to these types of problems.

  I can say from recent experience that a full filesystem can impair a
modern Linux system pretty effectively.  :-/

  Some of the fancier filesystems don't use inodes; I expect they'd be
immune from inode exhaustion.  But they can still run out of space, of
course.

> Many default disk partitioning plans, including those of RedHat and many
> others, create a very small '/' partition.

  Red Hat (and derivatives) hasn't done things that way for years.
Their default scheme is to create a small /boot/ partition, and then
create one big / partition for everything else.  The reason for that
is *that* various bootloaders, motherboards, BIOSes, etc., have had
issues booting from large disks.  Ubuntu is the same way, as I recall.

-- Ben


More information about the gnhlug-discuss mailing list