Often its required that the a directory (for example /home)be moved to a seperate filesystem. The steps are simple:
- Boot system in single user mode (linux single), or if already booted take it down to single user using,
- Create a new partition if its not already done.
- Create the filesystem on the new partition
- Mount the filesystem under a suitable directory in /mnt
mkdir /mnt/newpart && mount /dev/hda3 /mnt/newpart
- Copy all files from the directory /usr to the new directory using
cp -a /home/* /mnt/newpart/*
The following steps needs to be done in a sequence.
- Rename /home
- Create new /home/ directory
- Mount the new filesystem in /home
- Update the /etc/fstab
mv /usr /old-home && /bin/mkdir /home && /bin/mount /dev/hda3 /home