Re: confusing /etc/fstab

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

 



On Mon, 2005-01-31 at 19:20 -0600, Jeff Vian wrote:
> On Mon, 2005-01-31 at 15:32 -0600, Paul F. Almquist wrote:
> > On Monday 31 January 2005 13:33, Pedro Fernandes Macedo wrote:
> > > Paul F. Almquist wrote:
> > > >Labeling does introduce a problem:  What happens if 2 partitions have the
> > > > same label?  Which one does mount choose?  I do not know the algorithm
> It doesn't.  The conflict cannot be resolved, and it will hang
> 
> > > > but I do know that mount does not know which one you want to use.  In the
> > > > technical college where I taught Unix/Linux system administration we had
> > > > removable IDE drives in our lab machines. (standard IDE drives in a tray
> > > > that slides into a bay the in cabinet.  works good.  I use them at home
> > > > too)  I had a removable drive bay on my office machine. A couple of times
> > > > I had to make some repairs to corrupted student drives.  Since the drives
> > > > are not hot-swappable   I would power down my machine, insert the
> > > > student's drive, power up and boot. Their partition labels were the same
> > > > as on my internal IDE drive and as a result would bet mounted instead of
> > > > my partitions.  After a couple time of messing with that I changed the
> > > > /etc/fstab file on my system to use device names instead of labels.
> > > >
> > > >fsck also recognizes the labels, probably other disk related commands 
> > > > too.
> > > >
> > > >paul
> > >
> > > In such cases , I strongly suggest changing the labels. Here I used to
> > > have FC2 and FC3 test releases (during FC3 test) installed.
> > > The root for FC2 was labeled / , the one for FC3 was labeled fc3/ . And
> > > the same way for other partitions.
> > > Now , if you need to insert another disk with the same labels , you can
> > > always change the root=LABEL=/ part on grub to point to the right device.
> > > This change can be done at boot time (just press "a" on grub screen) and
> > > it probably will fix the issue, since the kernel will know exactly which
> > > partition to use on boot time.
> > That would take care of getting the right root partition but what about the 
> > case where, for example, /usr was in a separate partition on each disk with 
> > the same labels?
> > 
> 
> It is for that reason, that I seldom use labels.
> A machine that has drives already labeled at boot time will give new
> partitions created new labels. Swapping different drives in with
> conflicting labels will always cause a problem when labels are used in
> fstab for mounting.
> 
> I always put the partition name in fstab instead of using labels and
> thus do not have the conflict.

Swapping drives around when you have hard-coded partition names in fstab
will also cause problems; drives can change device names and then not be
mountable. The gist of it is that if you're adding in extra drives (and
particularly if you're removing drives), you'd better know what you're
doing or you could have problems. The same goes for adding and removing
partitions, though filesystem labels are a bit more robust than
partition names in that case.

Paul.
-- 
Paul Howarth <paul@xxxxxxxxxxxx>


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux