Forum Home
Press F1
 
Thread ID: 32712 2003-04-26 04:23:00 Linux making a new drive feel at /home Clueless (181) Press F1
Post ID Timestamp Content User
138969 2003-04-26 04:23:00 I'm having a Clueless moment.
I just got my claws on a 120gig HDD, and stuck it into Sam as hdc. I would like to move /home /etc and all those good things to this drive as a single 120gig partition, and then use the exsisting 20gig /home partition as something else alltogether

I don't know where to start, or even what to words to throw at a search engine.

.Clueless
Clueless (181)
138970 2003-04-26 04:38:00 never used Linux... but "Remounting partitions"??? somebody (208)
138971 2003-04-26 04:43:00 It's just a matter of getting your head around it. :D
It goes something like this: (in single user mode!) makedir /newdisk
mount -t auto /dev/hdc /newdisk
# do a man cp and get options for recursion, hidden files, etc
cp -Ra /home /newdisk/
cp -Ra /etc /newdisk/
ln -s /home /newdisk/home
ln -s /etc /newdisk/etc

Ungg. That looks great, but you need /etc/fstab to mount the disks ... so /etc will have to be on the main boot disk! So check the documents ...
I've seen the full description lately ... try "moving partitions linux" on google. I suspect it was in the Linux Cookbook, which is in the LDP.
Graham L (2)
138972 2003-04-26 08:40:00 Well, i had a look around, got distracted by the phone ringing constantly,got overwelmed by command line stuff that i don't understand, and screamed.. I then mounted the new drive as /home120 using yast2. I am currently copying all of /home over to it, and in the morning when that is done i'll rename /home to /homeold and /home120 shall become the new /home.

So it's either going to be an appaling failure, or it will work first time with ease.
---will post the result.

.Clueless
Clueless (181)
138973 2003-04-26 09:15:00 I hope you did a backup :D ;) stu140103 (137)
138974 2003-04-26 09:53:00 > cp -Ra /home /newdisk/
> cp -Ra /etc /newdisk/

Shouldn't that be "cp -Rap /name /new.name"? -p preserves permissions. If you don't do that, everything will end up being owned by root. (I recently moved /home too onto a new partition and I definetely needed -p). Just don't delete your old /home until you're completely satisfied that everything is alright.
segfault (655)
138975 2003-04-26 13:37:00 Well here it is all working with "/home" on the new 120 gig HDD that is just 11% used.... seems a waste, but its good to have the space to back my collection of .mp3's and .mpegs on CD

I'm not going to bother moving anything else,like "/etc" except to copy for back up purposes.

Yes stuart there's a back up, it's called "/homeold" I wont toss it till i feel i need the space. :-)

After renaming the original "/home" "/homeold" i went to Yast2 and remounted the new HDD as "/home" and used the command:

cd /homeold
cp -ax * /home and went to the dux-de-lux (a pub) for the night.....

Upon returning, i have logged in and all is well.

This site (www-106.ibm.com) was responcible for providing instructions that were simple enough for even me to grasp.

Thanx All

.Clueless
Clueless (181)
1