Re: fstab question
Jonathan Rosenbaum <[email protected]>
| Newsgroups | gmane.org.user-groups.linux.morlug |
|---|---|
| Message-ID | <[email protected]> |
Andrei Smirnov wrote:
> In good old days I could understand my fstab because it clearly showed
> what /dev/hd was assigned to what partition, like
>
> /dev/hda1 / ext2 defaults 1 1
>
> Nowdays I can't see it anymore:
>
> LABEL=/ / ext2 defaults 1 1
> LABEL=/arc /arc ext2 defaults 1 2
> LABEL=/home1 /home ext2 defaults 1 2
> LABEL=/usr/local /opt ext2 defaults 1 2
>
> And look how those labels got screwed up during system reinstall and
> partition reassignment. So, where is that information what HD is
> associated with what LABEL?
That's cool. In fstab(5) it says
Instead of giving the device explicitly, one may indicate
the (ext2 or xfs) filesystem that is to be mounted by its
UUID or volume label (cf. e2label(8) or xfs_admin(8)),
writing LABEL=<label> or UUID=<uuid>, e.g., `LABEL=Boot'
or `UUID=3e6be9de-8139-11d1-9106-a43f08d823a6'. This will
make the system more robust: adding or removing a SCSI
disk changes the disk device name but not the filesystem
volume label.
You can use e2label to find out the associated partitions, assuming they
have actually been named as such during reinstallation. Unless you are
going to be doing something fancy, you can rename the LABEL=* part in
the fstab using the traditional method.
e2label /dev/hda3 ""
Jonathan
_______________________________________________
Morlug mailing list
[email protected]
http://mailman.morlug.org/mailman/listinfo/morlug
signature.asc
(application/pgp-signature, 256 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCVerlF+LALi2rcDcRAvG0AKCnAtrMROKAnqbjqhhqlni3jAzPegCfYVm6 Gg7YxaIiVInRVo5X36Iwikw= =gGTD -----END PGP SIGNATURE-----