LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   move /home from remote? (https://www.linuxquestions.org/questions/slackware-14/move-home-from-remote-600517/)

bioe007 11-18-2007 01:09 AM

move /home from remote?
 
hi all, long time since I've been here. I've returned to the slack to setup my first webserver.

setup:slack11, 2.6, p3

is there a way to move the /home directory from a remote connection?

I am setting up my first server, which use to be my 'play with it until broken' box, then a box for my wife to use. Now its setup up to have a 40GB partition as /home (on hdb1) but I'd like to move /home to hda and use the 40GB to store other stuff for the webpage.

iirc the 'proper' way to move /home is to telinit 1, umount /home, edit fstab, mount /home and telinit 3.

I'm worried that since there is no keyboard/mouse/monitor for this anymore (i ssh to set up the webpages) once I telinit 1 I'll be screwed..

but I'm also wondering if I'm ssh'ing in as root then nothing can be running on /home.

I need to be pretty certain because this box will not install (cdrom can't read) anything slack greater than 10.2, so I don't want to go through an install (10.2) and upgrade all (to 11.0) again


many thnks

blackhole54 11-18-2007 03:24 AM

Quote:

Originally Posted by bioe007 (Post 2962718)
iirc the 'proper' way to move /home is to telinit 1, umount /home, edit fstab, mount /home and telinit 3.

I'm worried that since there is no keyboard/mouse/monitor for this anymore (i ssh to set up the webpages) once I telinit 1 I'll be screwed..

I am guessing you loose your network connection when you switch to single user mode (telinit 1). If you want to test it, you could use an at command to shut it down in, say, 5 minutes and then do a dry run where you haven't actually changed anything. If you find yourself locked out, the computer will automatically reboot in a few minutes anyway. (Being cautious, I would suggest you do a dry run on the automated reboot itself first.) I am assuming here you are sshed in as root so if this is successful, it won't hurt to temporarily loose the /home partition.

Another, I would guess safer, way would be to change fstab while in your normal runlevel and then reboot the computer remotely. When the computer reboots, it should have the new /home partition mounted. Of course, you need to copy everything to the new /home partition first. EDIT: Do make sure you have the ability to ssh in as root in case there is some problem with your new /home partition that prevents you connecting as a normal user.

bioe007 11-18-2007 10:03 AM

thanks, this is good advice. I was worried that I'd lose sshd in telinit 1, so if anyone knows that answer for sure I'd still like to know.

I ended up screwing up the other partition (hdb2) (rm -rf sure is powerful :) ) so I ended up killing my /hdb1 partition to backup the damaged /hdb2. tg for reiserfsck :D

anyways, all I did was as root `umount /home` then comment out the line in fstab, and remount /home. I don't care about the old user accounts anyways, so I think everything is ok.

bgeddy 11-18-2007 11:08 AM

bioe007:

Issuing telinit 1 will kill the ssh daemon as initab is set to run rc.K when entering runlevel 1 which kills all processes with killall5.

Glad it all worked out for you..

bioe007 11-18-2007 11:24 PM

bgeddy: thanks for the clarification :D


All times are GMT -5. The time now is 09:39 PM.