Sure it is. Make a note of your current partition scheme with "fdisk -l" and take note of your partition layout in /etc/fstab. Make sure you set your jumpers right on both the new and old drive and install the new drive. After you boot back up you should see it in "fdisk -l" output. Here is an example of what I would do assuming your new drive is showing up as "/dev/hdb" and your current root partition is on "/dev/hda1" and your current home directory is on your "/" file system and you want all of your new drive to be used as /home:
1) Log in as root and make sure no other users are logged on.
2) # fdisk /dev/hdb
- n
- 1
- <ENTER> (first cylinder should default to 1)
- <ENTER> (last cylinder should default to last cylinder on drive)
- w
3) # mkfs.ext3 /dev/hdb1
4) # mkdir /mnt/home
5) # mount /dev/hdb1 /mnt/home
6) # cd /home
7) # cp -a * /mnt/home
The above will create a partion on your new disk, format it ext3 and copy all of your directories/files to the new file system keeping all permissions exactly as they are. Before deleting anything from your existing /home directory I would mount the new partition over /home and make sure everything still works OK and if everything is good unmount it and delete all the data from the /home directory on your "/" file system and add an entry to your /etc/fstab for the new partition. To test mount:
1) # umount /mnt/home
2) # mount /dev/hdb1 /home
Now log in as a normal user (without rebooting or you'll lose the mount). If everything seems to be in order you can unmount it and delete your data from the /home directory on your "/" partition. Log off and log back in as root:
1) # umount /home
2) # cd /home
3) # rm -rf *
Remount the new partition and add it to your /etc/fstab:
1) # mount /dev/hdb1 /home
2) # vi /etc/fstab
Add this line:
- Code: Select all
/dev/hdb1 /home ext3 defaults 1 2
I would stick it in as the 2nd or 3rd line (right under your root and boot (if you have one) file systems).