LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 05-31-2004, 09:18 AM   #1
iotc247
Member
 
Registered: Mar 2004
Location: Florida
Distribution: Gentoo
Posts: 248

Rep: Reputation: 30
Seperate /home directory to new partition


I had it setup that debian would just use a / and my slack partion would just use a / mount directory... Now i want a seperate partition for /home how can i move both home directories to a new home partition without losing the data...
 
Old 05-31-2004, 10:50 AM   #2
fsbooks
Member
 
Registered: Jan 2002
Location: Missoula. Montana, USA
Distribution: Slackware (various)
Posts: 464

Rep: Reputation: 52
I would do it like this:

Make the new partition, mount it, say on /mnt/homenew

I would use rsync to copy the files, as thus:

rsync -acvSHx --exclude lost+found /home/ /mnt/homenew

If you read the rsync manual, a is the archive flag (=-rlptgoD)
c does a checksum
v is verbose
S handles sparse files
H preserves hard links
x stays in one file system
You may of course not need all these flags, but they don't hurt.
Also note that the the trailing slash on /home/ is significant (you want the contents of the directory, not the directory).

Once done, you can overmount the new /home directory on /home (which will hide the old data). After verification that everything works, you can umount the new /home directory, and then delete the old data.

Presumably, you could just do an "mv", but I always like to be safe.
 
  


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
Seperate Partitions for /usr & /home? Jukas Debian 6 03-24-2005 10:50 AM
seperate /boot partition jturnbul Slackware 4 09-22-2004 06:45 PM
/home seperate partition from previous install, make it new /home in new install mipia Slackware 5 06-21-2004 10:57 PM
Seperate /home partition craigl Linux - Newbie 2 05-10-2004 11:15 PM
putting /home on a seperate partition ludwig W Linux - General 2 05-06-2003 02:37 AM

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

All times are GMT -5. The time now is 12:52 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
Open Source Consulting | Domain Registration