[lug] /etc/fstab in the modern world

Elyse M. Grasso emgrasso at data-raptors.com
Thu Oct 21 12:47:26 MDT 2004


On Thursday 21 October 2004 02:38 pm, P. Scott DeVos wrote:
> 
> Elyse M. Grasso wrote:
> > I'm using KRUD FC2 on a dual boot system.
> > 
> > I find RedHat's use of labels instead on devices in /etc/fstab annoying, 
since 
> > it hides potentially useful information. Is there any reason NOT to switch 
> > the LABEL entries back to /dev/hda? entries?
> > 
> The reason to use labels is that on modern systems where drives may come 
> and go, you cannot be sure of where in /dev it will reside.  The label 
> scheme makes it very easy to keep track of a file system even if it 
> moves around.
> 
> I'll give you an example.  I client of mine does backups on 
> hot-swappable removeable SATA drives.  If the backup drive is in the 
> slot when the computer boots, then the main drive comes up as /dev/sdb, 
> but if the backup drive is missing, it comes up as /dev/sda.  Because 
> every thing is labelled and mounted by label, it doesn't matter.
> 
> I label the filesystems on the backup drives as backup, then I mount 
> them with
> 
> mount -L backup /mnt/backup
> 
> prior to backup.
> 
> Recently I wanted to move the /home partition to another hard drive on a 
> machine.  After copying the data,  I just did the following:
> 
> e2label /dev/hda2 old/home  <==this fs was labelled /home
> e2label /dev/sdb1 /home
> 
> You can check the label of a file system with
> 
> e2label /dev/hda1
> 
> for example.
> 
> One inconvenience is that I do not know how to get a list of all the 
> labels by /dev entry or vice-versa.  If someone knows how, please let me 
> know!

It sounds like switching to more use of labels would resolve some of the other 
problems in the fstab. What are the best tools for determining the existing 
labels of drive systems that have them, and applying labels to drives that 
don't (or changing them if there are conflicts)? 

-- 
Elyse Grasso

http://www.data-raptors.com    Computers and Technology
http://www.astraltrading.com   Divination and Science Fiction



More information about the LUG mailing list