LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 10-18-2004, 01:55 AM   #1
tardigrade
Member
 
Registered: Jun 2004
Distribution: SuSE 9.1
Posts: 150

Rep: Reputation: 15
moving /home to a new drive?


I want to move everthing in my /home/tardigrade to a new drive. Would it be logical to copy it to the drive then delete the orig and set my drive to mount at /home/tardigrade. Is this going to cause any problems? thanks for helping.
 
Old 10-18-2004, 02:49 AM   #2
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
Yes that should work fine.
Format the drive and make a new directory. Then use cp -a /home/tardigrade/* /mnt/home/tardigrade. Then re-name /home/tardigrade /old/home/tardigrade and then edit your /etc/fstab to mount your new /home partition and check that everything is ok. If all is fine delete the old /home.
A useful reference can be found here .

Last edited by TigerOC; 10-18-2004 at 02:51 AM.
 
Old 10-18-2004, 02:23 PM   #3
tardigrade
Member
 
Registered: Jun 2004
Distribution: SuSE 9.1
Posts: 150

Original Poster
Rep: Reputation: 15
problems.... i did a cp -a /* and none of the hidden files copied. so basicly everything program link is dead. all the other files seemed to work fine with permissions and all that junk but i cant figure out how to cp the hiddens.
 
Old 10-18-2004, 03:52 PM   #4
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
Did a bit of searching and * seems to be the cause. Try cp -a /home/tardigrade /mnt/home/tardigrade . That should resolve the problem I hope.
 
Old 10-18-2004, 04:26 PM   #5
m_yates
Senior Member
 
Registered: Aug 2003
Location: Upstate
Distribution: Debian, Mint, Mythbuntu
Posts: 1,249

Rep: Reputation: 101Reputation: 101
There is a very good guide for moving the /home directory here:

http://www-106.ibm.com/developerwork...-partplan.html
 
Old 10-18-2004, 05:56 PM   #6
tardigrade
Member
 
Registered: Jun 2004
Distribution: SuSE 9.1
Posts: 150

Original Poster
Rep: Reputation: 15
dropping the * does make sense since -a passes a recursive command. Unfortunately im impatient and resorted to a drag and drop copy of all the hidden stuff. Things went really crazy until i logout and back on so all the apps could restart (esp. kde). it seems to have worked though. to anyone who plans on moving there home drive in the future read the thing m_yates linked to and when using cp dont use a wildcard(*).

because it is annoying when people dont..
RECAP:
su for root access
prep new partition. make it and stuff. figure out its name (ill use /dev/hdb1 for ex.)
mkdir /mnt/hdb
mount /dev/hdb1 /mnt/hdb
cp -a /home/user /mnt/hdb
(dont forget the -a as it sets the reclusivness and keeps the permissions the same)

move /home/user somewhere like /home/old/ until your sure you can kill it.
umount /mnt/hdb
if its busy close anything related to it.
still doesnt work type fuser /dev/hdb1
this should tell you whats using it. if it shows up with anything do a kill 'PID'
still wont umount try: umount /mnt/hdb -l (as in L for lazy)
then edit /etc/fstab for the new partition so it mounts to /home/user
type mount /dev/hdb

you may have to restart kde(assuming your using kde). just logout and back in.
also if things go wrong as they did for me(see posts) open up konq. and click show hidden files. there should be a bunch of the in you home folder.

your /home/ should have a new home.

thanks again
tiger and yates/
 
  


Reply



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 /home Directory? NovaBurst DamnSmallLinux 1 04-18-2005 10:59 PM
moving /home to new dev DebNoob58 Linux - Newbie 3 10-30-2004 07:22 AM
need help moving home shaggystyle Linux - Hardware 15 09-01-2004 12:31 AM
moving /home to / abu_abdullaah Linux - Newbie 3 07-18-2004 01:15 PM
Moving /home xodeus Slackware 7 10-06-2003 03:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:47 PM.

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