LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Moving my home folder. (https://www.linuxquestions.org/questions/linux-newbie-8/moving-my-home-folder-409359/)

Lordandmaker 01-29-2006 01:28 PM

Moving my home folder.
 
I've currently got my home folder mounted on the same (small) drive as Linux is installed on.
I've added a 200G drive, which is mounted at /FAT32 because that seemed like a good idea at the time.

I want to amalgamate the two, so my home folder is 200G.

If i copy the contents of my home folder onto what is now called /FAT32, and edit fstab to mount the big drive as my home folder, would creating a symlink called /FAT32 to replace the old mount work to stop me breaking file paths?

Would i be likely break anything in doing this?

Brian1 01-29-2006 01:51 PM

This is what you can do.

edit:
New thought from your question, If the new partition is created as ext2 or ext3 then mount it as /home_new. Then you can rename /home to /home_backup and then make a softlink to the new /home_new directory.

At the root of the drive
mount the new partition to /home_new
copy contents to mounted /home_new
mv /home /home_backup
mkdir home
ln -s /home_new /home
add the needed line to /etc/fstab to automount the new partition to /home_new

Only issue might be a permissions block but not sure, the best way is below.
edit:


First gather the needed info the /dev to each partition you will be working with.
You can get this from the command ' /sbin/fdisk -l '. Requires root to run it.

Know which partition contains the following directories /home /etc, and new but temporary /home_new.

* First make the partition formatted as ext2,ext3,rieresfs, or what ever linux type format you perfer. Fat32 will not get it. Reason Fat32 does not handle links.
* Next once the partition is created mount it temporary as /home_new
* Then copy the contents from /home to /home_new.

This is the way I would do the following.
* Shutdown and reboot with a Live CD or Rescue CD
* From there mount the partition that contains /etc directory
* Also mount the partition to /home if it is not he same.
* Now rename the orginal /home to /home_backup. command to use if not using a gui based Live CD. ' mv home home_backup '
* Now edit /etc/fstab and add a line like this. Note the /dev/hda8 is my location, yours may very. Also I use ext3 for the type of format on the partition.
Line will look like this.
Code:

/dev/hde8              /home                  ext3    defaults        1 2
Unmount all partitions and reboot without Live CD.

Hope this helps.
Brian1

m_yates 01-29-2006 02:08 PM

There is a nice step-by-step guide on how to do this here: http://www-128.ibm.com/developerwork...-partplan.html

You want to make sure that when you copy you /home directory, you use the command "cp -ax" as stated in the above mentioned guide. Otherwise, you will likely have problems with file permissions and ownership.


All times are GMT -5. The time now is 12:28 AM.