View previous topic :: View next topic |
Author |
Message |
tessmonsta Tux's lil' helper
Joined: 28 Jul 2005 Posts: 114
|
Posted: Mon Oct 02, 2006 6:17 pm Post subject: Swapping Home Directory |
|
|
I would like to swap the mount point of my home directory too a new, much bigger drive. Right now the files are currently on a 40 gb drive and working well. Recently, however, I cleared off the 200gb drive that's also in the system and mounted at /docs/mnt.
I'm guessing that if I want to do this, I would have to format the 200gb drive, copy over the contents of /home, and then alter fstab to mount the drive at /home, then reboot.
Is it that simple? I'm concerned that something will get confused in the user system by doing this. |
|
Back to top |
|
|
Zepp Veteran
Joined: 15 Mar 2004 Posts: 1246 Location: Ontario, Canada
|
Posted: Mon Oct 02, 2006 6:44 pm Post subject: |
|
|
Just move the files to the new try after you have setup the filesystem how you want it (partitions, fs choice, etc), modify fstab as you said, You don't even need to reboot. After fstab is modified just mount /home should do it. Nothing should break as long as the permissions are preserved and you copy everything (including the hiddent files/dirs) |
|
Back to top |
|
|
jesso Guru
Joined: 27 Oct 2004 Posts: 397 Location: Canada
|
Posted: Mon Oct 02, 2006 6:48 pm Post subject: |
|
|
You said the 200 Gig HD is already installed and had files on it.
You should not have to reformat it. You did that when you installed Gentoo. i.e. fdisk. |
|
Back to top |
|
|
Zepp Veteran
Joined: 15 Mar 2004 Posts: 1246 Location: Ontario, Canada
|
Posted: Mon Oct 02, 2006 6:59 pm Post subject: |
|
|
jesso wrote: | You said the 200 Gig HD is already installed and had files on it.
You should not have to reformat it. You did that when you installed Gentoo. i.e. fdisk. |
Technically no, but if you removing everything and re-using the drive I would recreate the file system. Just to make sure everything is cleaned out and to start fresh. |
|
Back to top |
|
|
tessmonsta Tux's lil' helper
Joined: 28 Jul 2005 Posts: 114
|
Posted: Mon Oct 02, 2006 7:02 pm Post subject: |
|
|
jesso wrote: | You said the 200 Gig HD is already installed and had files on it.
You should not have to reformat it. You did that when you installed Gentoo. i.e. fdisk. |
Nope, there are three drives in total on this system, and that one was left over from a previous system. It's also in FAT32 format, which is all the more reason why I should reformat it. |
|
Back to top |
|
|
tessmonsta Tux's lil' helper
Joined: 28 Jul 2005 Posts: 114
|
Posted: Mon Oct 02, 2006 7:05 pm Post subject: |
|
|
Zepp wrote: | Just move the files to the new try after you have setup the filesystem how you want it (partitions, fs choice, etc), modify fstab as you said, You don't even need to reboot. After fstab is modified just mount /home should do it. Nothing should break as long as the permissions are preserved and you copy everything (including the hiddent files/dirs) |
Part of the reason I'm worried is that the user directories contain active files served by Apache. I'm concerned there'd be some cocurrency issue there. Furthermore, /home is already a mountpoint for another drive. I suppose I could stop apache umount, mount and start it back up again, but rebooting was a single step and I really don't care about uptime. |
|
Back to top |
|
|
Zepp Veteran
Joined: 15 Mar 2004 Posts: 1246 Location: Ontario, Canada
|
Posted: Mon Oct 02, 2006 7:12 pm Post subject: |
|
|
tessmonsta wrote: | Zepp wrote: | Just move the files to the new try after you have setup the filesystem how you want it (partitions, fs choice, etc), modify fstab as you said, You don't even need to reboot. After fstab is modified just mount /home should do it. Nothing should break as long as the permissions are preserved and you copy everything (including the hiddent files/dirs) |
Part of the reason I'm worried is that the user directories contain active files served by Apache. I'm concerned there'd be some cocurrency issue there. Furthermore, /home is already a mountpoint for another drive. I suppose I could stop apache umount, mount and start it back up again, but rebooting was a single step and I really don't care about uptime. |
Stop all the processes that are writing to /home, unmount whatever you have mounted in /home (if you don't want to move those files) and move everything in /home to the new drive/partition. If you want you can boot into a live cd and do it or maybe single user mode. |
|
Back to top |
|
|
tessmonsta Tux's lil' helper
Joined: 28 Jul 2005 Posts: 114
|
Posted: Mon Oct 02, 2006 7:16 pm Post subject: |
|
|
Zepp wrote: | Stop all the processes that are writing to /home, unmount whatever you have mounted in /home (if you don't want to move those files) and move everything in /home to the new drive/partition. If you want you can boot into a live cd and do it or maybe single user mode. |
I was going to do this in root, since it's user directory is still at /root. How do I determine which processes are writing to /home? Is there a tool for this? |
|
Back to top |
|
|
Zepp Veteran
Joined: 15 Mar 2004 Posts: 1246 Location: Ontario, Canada
|
Posted: Mon Oct 02, 2006 7:44 pm Post subject: |
|
|
tessmonsta wrote: | Zepp wrote: | Stop all the processes that are writing to /home, unmount whatever you have mounted in /home (if you don't want to move those files) and move everything in /home to the new drive/partition. If you want you can boot into a live cd and do it or maybe single user mode. |
I was going to do this in root, since it's user directory is still at /root. How do I determine which processes are writing to /home? Is there a tool for this? |
Could try lsof, if you drop down to single user mode though pretty much nothing will be running |
|
Back to top |
|
|
|