LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-18-2007, 01:09 AM   #1
bioe007
Member
 
Registered: Apr 2006
Location: lynnwood, wa - usa
Distribution: archlinux
Posts: 654

Rep: Reputation: 30
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
 
Old 11-18-2007, 03:24 AM   #2
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
Quote:
Originally Posted by bioe007 View Post
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.

Last edited by blackhole54; 11-18-2007 at 03:28 AM.
 
Old 11-18-2007, 10:03 AM   #3
bioe007
Member
 
Registered: Apr 2006
Location: lynnwood, wa - usa
Distribution: archlinux
Posts: 654

Original Poster
Rep: Reputation: 30
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

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.
 
Old 11-18-2007, 11:08 AM   #4
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 231Reputation: 231Reputation: 231
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..
 
Old 11-18-2007, 11:24 PM   #5
bioe007
Member
 
Registered: Apr 2006
Location: lynnwood, wa - usa
Distribution: archlinux
Posts: 654

Original Poster
Rep: Reputation: 30
bgeddy: thanks for the clarification
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I move /home ? MikeyDIUP Linux - Newbie 3 09-11-2005 01:36 AM
Move my Home directory... it-s Linux - General 5 07-08-2005 11:34 AM
How do I move /home to a new partition? glenn69 Linux - Newbie 2 01-05-2005 10:15 PM
I want to move home fannymites Linux - General 1 12-04-2004 05:45 AM
move home to new drive gSalsero Linux - Software 1 06-11-2004 04:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration