LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 11-22-2003, 08:20 AM   #1
bhodi
LQ Newbie
 
Registered: Oct 2003
Location: Netherlands
Distribution: Slackware
Posts: 22

Rep: Reputation: 15
moving /home partition


Hi,

Currently my /home partition is on the same hda as my / partition. Problem is that the / partition is getting full so i want to move my /home partition to another hda (for example the /usr hda). Is this possible without doing a reinstall?
 
Old 11-22-2003, 08:36 AM   #2
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,033

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Yes, you do not need to reinstall. I have never done this, but I think what you need to do is

Mount your new disk as /mnt/new

as root, and probably in single-user mode, you need to copy the whole contents of /home to /mnt/new, preserving ownership and timestamps of the files. I think the command would be

cp -pr /home /mnt/new

Then, in single-user mode, you need to rename /home as /home.old (in case you/I have made a mistake).

Then unmount the new disk from /mnt and then mount it as /home.

Restart multi-user mode. If everything is OK, you need to edit fstab to mount the new disk as /home at boot time.

Someone will probably make corrections for me here!

Good luck!
 
Old 11-22-2003, 08:57 AM   #3
TheOneKEA
Member
 
Registered: Oct 2003
Location: Somewhere in Surrey
Distribution: Debian GNU/Linux 7.4.0 (amd64) w/kernel 3.13.0
Posts: 279

Rep: Reputation: 30
A better copy command is cp -dpR. This way, if he has any UNIX sockets or special files like device nodes or named pipes in his /home directory, cp won't try to read them and will just copy the files themselves.

But other than that, your method is sound.
 
  


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
moving files from windows partition to linux partition M O L8ingN2dust Linux - Newbie 11 01-08-2006 10:11 PM
moving /home /root & /var to new partition CrashedAgain Linux - General 8 11-24-2005 11:44 AM
Moving /home xodeus Slackware 7 10-06-2003 04:33 PM
Moving /home today to a new partition... LinuxBAH Linux - General 1 06-24-2003 08:16 PM
Moving/using new /home partition concoran Linux - General 1 05-20-2002 10:32 PM


All times are GMT -5. The time now is 07:21 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration