[KLUG Members] Re: Need more space for /var (Adam Williams)

Adam Williams members@kalamazoolinux.org
21 May 2003 13:52:23 -0400


> This was the first fstab that I had seen that used the LABEL=/XXX instead of
> the /dev/hdX# that I am used to using. Apparently fstab lets you can mix and
> match, so I am OK with that.

the -L option of mkfs.ext2/ext3/xfs lets you specify a labelm so
somthing like "mkfs -L mail /dev/hda9" is legit.

> I just don't understand how you can use a label without somehow passing the
> device file. I.E., how does LABEL=/ specify that the device file to be
> mounted as root is /dev/hda1 and not /dev/sda1?

Very early in the boot process the paritions of type known too the
Kernel will be enumerated and their labels read if possible.  Then Label
= partition is just a map.

This is *wonderful* for larger systems where drives may be
removed/added, since that would muck up things like /dev/sdc4 when it
became /dev/sdd4 when a disk is added.

You can use findfs to poke around

[root@estate2 root]# findfs LABEL=/boot
/dev/hda1

Just don't create two partitions with the same label.

Thats ermmm....bad.  It will be less than happy next time you try and
boot, and by less than happy I mean seriously honked off (although newer
kernels are supposed to take it more in stride).

> >if you use the other entries already there for a template it is pretty
> >hard to screw up.  Make sure you test by rebooting and seeing that the
> >filesystem is mounted at the appropriate point.
> LABEL=/                 /                       ext2    defaults        1 1
> LABEL=/boot             /boot                   ext2    defaults        1 2
> LABEL=/home             /home                   ext2    defaults        1 2
> /dev/cdrom              /mnt/cdrom              iso9660 noauto,owner,ro 0 0
> /dev/fd0                /mnt/floppy             auto    noauto,owner    0 0
> LABEL=/usr              /usr                    ext2    defaults        1 2
> LABEL=/var              /var                    ext2    defaults        1 2
> none                    /proc                   proc    defaults        0 0
> none                    /dev/pts                devpts  gid=5,mode=620  0 0
> /dev/hda9               swap                    swap    defaults        0 0