LABELS in RH 7.3 fstab file

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Scott
Date:  
Subject: LABELS in RH 7.3 fstab file
You can also change the labels to whatever you want via the e2label
command. If you want to check what the current label is on a device, you
could enter this command:

/sbin/e2label /dev/sda7     (if you have scsi disks, or)
/sbin/e2label /dev/hda3     (if you have ide disks)


To change the label, simply pass the new label as an argument to the
e2label command. IE

/sbin/e2label /dev/sda7 /mylabel

Be sure to update your /etc/fstab file to reflect this change. IE

LABEL=/mylabel     /some_mount_point ...


You can always use the absolute device path, as specified below,
regardless of what label is (or is not) on the disk.

scott


On 13 Dec 2002, David Mandala wrote:

> The labels are on the hd in each partition. It puts them there when it
> formats the drive.
>
> But you can change to device, just remove the Label=/ and replace it
> with /dev/sda1 or /dev/sda6 and all will work fine. I usually do that to
> avoid problems with unpatched kernels. Red Hat patches their kernels to
> use LABEL= instead of devices. Can be a pain in the tail when you build
> your own kernel from pristine sources. Red Hat uses LABELS to avoid the
> problems of adding more devices in the drive chain especially SCSI
> devices. If you add a new SCSI device and it's id is less then the
> current device it will become the current device. Say sda has a SCSI id
> of 3 and you add a new SCSI drive and make it's id 2 it will become sda
> and what was sda will now be sdb.
>
> You can avoid the problem by being careful when installing new hardware
> but in some machines the BIOS assigns SCSI id's and it decides what id
> each device has and sometimes can change it mind! LABELS avoid the
> problem.
>
> Me I avoid labels too much hassle having to patch each kernel to work.
> The patch may actually be in the 2.4 kernel series but you need to know
> what option to activate and I don't.
>
> Cheers,
>
>
> Davidm
>
> On Fri, 2002-12-13 at 16:22, Scott H wrote:
> > I look in /etc/fstab on a RH7.3 server and
> > discover instead of seeing /dev/whatever devices
> > in the first column, there are some with "LABEL",
> > e.g.:
> >
> > LABEL=/    /    ext3      defaults    1 1

> >
> > Where does RH keep track of these labels? I need
> > to switch /dev/sda1 which is mounted at / , with
> > /dev/sda6 which is mounted at /backups. (I'm
> > testing a mirrored / folder to /backups for
> > disaster recovery, using mirrordir)
> >
> > Thanks!
> >
> > Scott
> >
> >
> >
> >
> >
> >
> >
> > .
> >
> > __________________________________________________
> > Do you Yahoo!?
> > Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> > http://mailplus.yahoo.com
> > ---------------------------------------------------
> > PLUG-discuss mailing list -
> > To subscribe, unsubscribe, or to change you mail settings:
> > http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss
>


--
NT makes anything simple, easy, and anything difficult to do, impossible.
Unix makes anything easy to do difficult, and anything difficult to do,
possible. Basically, if your VCR is still flashing "12:00" then unix is not
for you!