LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   New hard drive plz help (https://www.linuxquestions.org/questions/linux-newbie-8/new-hard-drive-plz-help-296308/)

sendas4 03-01-2005 11:01 AM

New hard drive plz help
 
I have 3 Partitions i want to put /usr on a new hard drive couldnt i just do this?

/dev/hda1 for /boot
/dev/hda2 for swap
/dev/hda3 for /

Coudlnt i just mount /dev/hdb to /mnt/hdb then

CP -R /usr /mnt/hdb

then add the mount entry in fstab and reboot? Or would this screw things up

Matir 03-01-2005 11:05 AM

that would screw things up. :)

I've done that before... it really screwed up the box.

cp -Rp SHOULD work.

I'd advise you to use a LiveCD for the remount phase... I assume you'll want to remove the contents of the old /usr first: otherwise it will still consume space in /.

sendas4 03-01-2005 11:45 AM

Ok thanks ill try that. Thanks for the fast response

frieza 03-01-2005 01:43 PM

my suggestion would be to mount the drive on a temporary mount point... copy everything from the old /usr to the new... then mount the new drive as /usr... make sure it works... then remove the mount temporarily, erase everything from the old /usr, and then remount /usr

Genesee 03-01-2005 02:19 PM

Quote:

Originally posted by frieza
my suggestion would be to mount the drive on a temporary mount point... copy everything from the old /usr to the new... then mount the new drive as /usr... make sure it works... then remove the mount temporarily, erase everything from the old /usr, and then remount /usr
this sounds right. mounting the "new" /usr over the existing /usr dir should render the "old" /usr inaccessible and allow you to make sure everything works properly, before you delete the old one for good.

Matir 03-01-2005 03:26 PM

While I agree with the above, one point is to be made: you'll have a hard time mounting and unmounting the active /usr on a system. Probably deleting too. So much runs from there. Fortunately mount is usually /bin/mount or you'd be truly up a creek.

sendas4 03-01-2005 04:14 PM

Well i tried but didnt work.

CP -Rp /usr /mnt/hdb1

then edited fstab

/dev/hdb1 /usr ext3 defaults 0 1

Linux boots but doesnt go into X windows.

It wont let me just mount /dev/hdb1 as /usr and it wont let me umount /usr

sendas4 03-01-2005 04:24 PM

Ah ok I got it working. It was user error. the first time i copied /usr to /mnt/hdb1 it did it was a folder so when i mounted /usr i had a /usr/usr .

Thanks for the help

Matir 03-01-2005 07:35 PM

No problem. Fully working now?

sendas4 03-01-2005 09:22 PM

Yup :P

Genesee 03-01-2005 10:03 PM

Quote:

Originally posted by sendas4
Yup :P
excellent


Matir - good point. :) that's the reason for having a dedicated /bin and /sbin (as opposed to /usr/bin, etc.) :

http://www.icon.co.za/~psheer/book/n...00000000000000


All times are GMT -5. The time now is 03:16 AM.