Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Swapping Home Directory
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
tessmonsta
Tux's lil' helper
Tux's lil' helper


Joined: 28 Jul 2005
Posts: 114

PostPosted: Mon Oct 02, 2006 6:17 pm    Post subject: Swapping Home Directory Reply with quote

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
View user's profile Send private message
Zepp
Veteran
Veteran


Joined: 15 Mar 2004
Posts: 1246
Location: Ontario, Canada

PostPosted: Mon Oct 02, 2006 6:44 pm    Post subject: Reply with quote

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
View user's profile Send private message
jesso
Guru
Guru


Joined: 27 Oct 2004
Posts: 397
Location: Canada

PostPosted: Mon Oct 02, 2006 6:48 pm    Post subject: Reply with quote

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
View user's profile Send private message
Zepp
Veteran
Veteran


Joined: 15 Mar 2004
Posts: 1246
Location: Ontario, Canada

PostPosted: Mon Oct 02, 2006 6:59 pm    Post subject: Reply with quote

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
View user's profile Send private message
tessmonsta
Tux's lil' helper
Tux's lil' helper


Joined: 28 Jul 2005
Posts: 114

PostPosted: Mon Oct 02, 2006 7:02 pm    Post subject: Reply with quote

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
View user's profile Send private message
tessmonsta
Tux's lil' helper
Tux's lil' helper


Joined: 28 Jul 2005
Posts: 114

PostPosted: Mon Oct 02, 2006 7:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
Zepp
Veteran
Veteran


Joined: 15 Mar 2004
Posts: 1246
Location: Ontario, Canada

PostPosted: Mon Oct 02, 2006 7:12 pm    Post subject: Reply with quote

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
View user's profile Send private message
tessmonsta
Tux's lil' helper
Tux's lil' helper


Joined: 28 Jul 2005
Posts: 114

PostPosted: Mon Oct 02, 2006 7:16 pm    Post subject: Reply with quote

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
View user's profile Send private message
Zepp
Veteran
Veteran


Joined: 15 Mar 2004
Posts: 1246
Location: Ontario, Canada

PostPosted: Mon Oct 02, 2006 7:44 pm    Post subject: Reply with quote

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 :P
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum