In case you forgot to add another disk or partitioned your Linux installation wrong, you can still move /home to your new drive with these steps.  This works for Fedora, CentOS or SuSE.

Make sure that you are logged in as root and that no other user is logged in, then follow these steps;

1) fdisk /dev/sdb -- create a partition
2) mkfs.ext3 /dev/sdb1 -- format the partition as ext3
3) e2label /dev/sdb1 somelabel -- set a label 'somelabel' to the partition.
4) echo "LABEL=somelabel /home ext3 defaults,noatime 1 2" >>/etc/fstab -- auto mount at bootup
5) mount /dev/sdb1 /mnt -- mount somewhere now
6) cp -pPrfv /home/* /mnt/ -- copy everything over preserving everything
7) umount /mnt -- unmount it

// keep the old data in the original location for now
8) mkdir /oldhome
9) mv /home/* /oldhome/

10) mount -a

Now check to see if everything works. If it does (it should), then do the next step:
11) rm -rf /oldhome

0
Your rating: None
Post new comment
The content of this field is kept private and will not be shown publicly.
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.
Navigation
Syndicate
Syndicate content
Share this
Powered by Drupal, an open source content management system