Create new partition and use it as a directory...
Hi,
I was wondering if it's possible to create a new partition and assign one of the directories in the directory tree to use that partition. FOr example, i made a new partition, and i want to use it as /home. How do i assign /home to the new partition and delete the old /home. Forgot to mention one thing, the above example is based on the assumption that all directories are in one single root partition... thnx |
You could try mounting the new partition somewhere else, then copying everything over, editing your fstab to point to the new partition and then reboot.
e.g. (not my current system, but hey!!: /dev/hda1 = / I create a new partition /dev/hdb6 and what it to be /home mkdir /mnt/newhome mount /dev/hdb6 /mnt/newhome -t ext3 cp /home /mnt/home -R jed /etc/fstab #edit the fstab to include a line that mounts /dev/hdb6 as /home with ext3 filesystem init 6 There are probably other, better ways, but I can't think of any at the moment - not at my Linux box. |
Hi, thnx
Can you pls give an example of how to edit the fstab to include the new '/home' ? |
You can even have it on a completely different hard drive, this is my /etc/fstab entry for /home,
Code:
/dev/hdb1 /home reiserfs defaults 1 1 |
following thymox's general (albeit highly inconsistent :D) schema, i'd just say that a few things are more water tight...
instead of the cp: find -xdev /home | cpio -pvd /mnt/ as this will ensure that symlinks and other such hangups are copied correctly. this way means that you naturally mount your new drive as /mnt/home |
All times are GMT -5. The time now is 04:18 PM. |