[NTLUG:Discuss] How to move data from one drive to another
Leroy Tennison
leroy_tennison at prodigy.net
Sat Aug 6 17:51:38 CDT 2005
Bryan J. Smith wrote:
>On Fri, 2005-08-05 at 07:44 -0500, John Thomas wrote:
>
>
>>My current idea is this: Install the new larger drive as hdb, format it
>>and copy my existing /home to it.
>>
>>
>
><anal>I assume you meant sdb, not hdb</anal>
>
>Yep,
>
>1. fdisk /dev/sdb
>2. mke2fs -j /dev/sdb1
>3. mkdir /newhome
>4. mount /dev/sdb1 /newhome
>5. cd /home
>6. find . -umount | cpio -pmdv /newhome
>7. umount /newhome
>
>
>
>>Then, wipe the existing hda drive and do a clean install
>>(that would be Red Hat 4EL)
>>
>>
>
>You don't need to wipe it, just make sure you formal new filesystems in
>the Anaconda installer.
>
>
>
>>Next, how do I modify fstab to show that /home is on the new drive?
>>I've read the man page on fstab, but the use of the LABEL designation
>>is still obscure to me.
>>
>>
>
>You can either give the device name, e.g.: /dev/sdb1
>
>Or you can label the partition and use that in /etc/fstab.
>E.g., after step #2 above, do:
> e2label /dev/sdb1
>
>And instead of step 4, use the new label:
> mount LABEL=(whatever) /newhome
>
>And make sure you now use that for the new filesystem.
>
>Labels are just a way to make filesystems addressable/mountable without
>having to worry what the exact disk/slice the filesystem may be at
>boot/mount-time. You don't have to use them.
>
>But if you do use them, make sure your labels are _unique_.
>
>
>
>
Unless I'm badly mistaken, all LABEL= does is refer to the label
assigned to the disk partition by e2label (or by anaconda, etc. when
install was done). The fstab entry for the new location would probably
look something like:
/dev/sdb1 /home ext3 defaults 1 2
More information about the Discuss
mailing list