Novell Home

Moving FileSystems into proper partitions

Novell Cool Solutions: Question & Answer

Posted: 2 Aug 2005

Q:
LT wrote: I have installed SUSE Linux 9.2 Professional at home. YaST gives you the ability to do a default installation of two partitions (/ and swap). I have been successful in creating other partitions such as /var, /home, /usr, and /boot partition. I noticed that SUSE wasn't intelligent enough to place the FileSystems into the proper partitions. However, I was wondering if its as easy as moving the FileSystem over to the proper partition and editing the /etc/fstab file. I created these partitions in order to better organize my system. Please let me know what you think.

A:
Stomfi replied: Yes, you are certainly doing the right thing here. I'll have a look at the setup problem at the lab, because I would expect the partitions to be used!
First, copy (do not move in case of hiccups) all the files from your original directories into your new partitions. Do one at a time. After each copy, say for /home, you can test the results with the command

mount /dev/yourpartition /home

create a new file in /home
umount /home

Is your new creation in the original? No... Good! Success.
Still leaving the original files in /home edit the fstab /dev/yourpartition /home and the rest of the permissions exactly the same as /"
Reboot and check if the new /home/file is there. Yes... Good! Success.
Comment out the new /home line in fstab and reboot again. Now you know you can safely delete the files in the original /home directory.
Re-edit fstab and uncomment your /home line.
Reboot and check again that /home is there. If it isn't you didn't follow these steps correctly, and there's nothing to do but create a new /home directory and recreate empty users.
Follow this safety first procedure with each directory and partition in turn.
Do not be tempted to do any short cuts, better safe than sorry. I sometimes do this sort of thing when one of my partitions get too full.
Kind regards, Stomfi

Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

Novell® Making IT Work As One

© 2008 Novell, Inc. All Rights Reserved.