moving /home

Tim ignored_mailbox at yahoo.com.au
Mon Dec 5 07:43:24 UTC 2005


Paul F. Johnson:
>>> #LABEL=/home   /home    ext3    defaults 1 2
>>> /dev/hdb1      /home    ext3    defaults 1 2
>>>
>>> (replace hdb1 with sda

Claude Jones:
> I'm trying to understand the fstab man page, but I'm still not getting
> something. From man fstab:
> 
> "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."

Which means something along the lines that if your (current) /dev/hdb3
partition was labelled as being "/home" that you could always refer to
it as the /home partition, even if you mounted it somewhere else (for
instance, if you switched drives around, and it became /dev/hde3).

This is convenient for removable drives, or people who fiddle with their
hardware a lot.  It's probably not all that convenient for the boot
drive, as you'd also need to rejig your bootloader to find its new
location.

It has other problems, too:  Suppose you plug in a second drive from
another PC to copy files from one /home to another /home, it can't
handle two identical labels.  So it may be wise to personalise the
labels (e.g. don't call it /home, call it /something-home, where
"something" is pertinent to that system, and different on another
system's drive).

> From this, if I'm getting it right, your first line is saying to look for an 
> ext3 file system area to mount /home on - is that right?

Find the partition that the label refers to, and use it instead of the
label.  If the drive is currently mounted, you can find this out by just
typing in the "mount" command.

> Assuming I'm right, I still don't understand how your second line replaces 
> hdb1 with sda1 - what am I missing? I don't ever see sda1 mentioned - how is 
> it found?

If your drive was IDE, you would be using names like:  /dev/hdb
If your drive was SCSI, you would be using names like:  /dev/sdb

i.e. Customise the example to suit your own needs.

-- 
Don't send private replies to my address, the mailbox is ignored.
I read messages from the public lists.




More information about the users mailing list