Jump to content

moving to new hard drive


crp

Recommended Posts

I am planning on migrating partitions (var and home for sure) to a newer harddrive on a RH9 running a BIND and sendmail server.Do I need to reboot and login as single user or would it be ok to just unplug the NIC ?

Link to comment
Share on other sites

Hi crpNot sure if I understand fully what you try to say . . . . But I fail to see why you would need to do either of them . . . . . . if you just copy ( not "mv" ) the /var and /home to the new partitions, and next change the /etc/fstab to the new partitions, you only have to reboot to have the new situation active. After that you can delete the files on the old partitions.NOTE: make sure you re-set the ownership on the /home partition after moving the files as root ( chown -R crp:crp /home/crp )B) Bruno

Link to comment
Share on other sites

Hi crpNot sure if I understand fully what you try to say . . . . But I fail to see why you would need to do either of them . . . . . . if you just copy ( not "mv" ) the /var and /home to the new partitions, and next change the /etc/fstab to the new partitions, you only have to reboot to have the new situation active. After that you can delete the files on the old partitions.NOTE: make sure you re-set the ownership on the /home partition after moving the files as root ( chown -R crp:crp /home/crp );) Bruno
It is a mail server so the var and home have files that are constantly being changed.by the way: anyone know what the error message:nfs_get_root: getattr error=5 (which seems to freeze the boot up) is really trying to tell me?
Link to comment
Share on other sites

It is a mail server so the var and home have files that are constantly being changed.
Ahaaaa . . . . . maybe you can stop the server for a few minutes and use a LiveCD to do the job ?
by the way: anyone know what the error message:nfs_get_root: getattr error=5 (which seems to freeze the boot up) is really trying to tell me?
Sorry . . . does not ring a bell at all.;) Bruno
Link to comment
Share on other sites

. . . . . . if you just copy ( not "mv" ) the /var and /home to the new partitions, and next change the /etc/fstab to the new partitions, you only have to reboot to have the new situation active. After that you can delete the files on the old partitions.;) Bruno
hmm, I could not cp the /home/ directories. For each one (user) I got an error of Input/output from the cp command. Tried to use SuperFileManager and that didn't either :hmm:
Link to comment
Share on other sites

Did you use the "cp -r" ( with the -r argument ) as root ?? :P Bruno
nope B) for some reason I thought -a would include the directories.Thanks. now just have 3 more reboots to go :(
Link to comment
Share on other sites

B) Glad it worked !But don't forget to re-set the ownership of the /home directories to their original users:group . . . because in moving them they are now owned by root:root !!:P Bruno
Link to comment
Share on other sites

:thumbsup: Glad it worked !:hmm: Bruno
B) it didn't for some reason, the cp just would not do directory creation , no matter what switch I used. :devil: all I want to do at this point is get the system over to a bigger harddrive. So, are there any cloning/ghosting programs out there that support direct copying and ext3 ?
Link to comment
Share on other sites

This makes me very curious to see the exact command you were using . . . and what the response was you got in the terminal.Anyway: There are 2 commands here below . . . Copy a hard disk partition to another hard disk:

# dd if=/dev/hda2 of=/dev/hdb2 bs=4096 conv=notrunc,noerror

Cloning an entire hard disk:

# dd if=/dev/hda of=/dev/hdb conv=notrunc,noerror

Be carefull adapting dd commands . . . they can wipe your drive in seconds !:thumbsup: Bruno

Link to comment
Share on other sites

This makes me very curious to see the exact command you were using . . . and what the response was you got in the terminal.
as root
mount -t ext3 /dev/hdd2 /mnt/point/cd /mnt/pointcp -a -r -u -v /home .

gave me error messages about not being able to create directories, tried

cp -a -r -u -v /home /mnt/point/

and got the same thing.Can't give you the error verbiage, the harddrive was taken out.

Link to comment
Share on other sites

Hi crpYour command puzzles me a bit . . . . the "-a" argument is "same as -dpR" . . . so you will not need the "-r" ( same as "-R" ) Also the "-u" ( copy only when the SOURCE file is newer than the destination file or when the destination file is missing ) makes only sense if there are already files on the target.Next: you copy /home to /mnt/point/ . . . and I think you should copy /home/* to /mnt/point ;)So please try this:

# chown -R crp:crp /mnt/point# chmod 775 /mnt/point# cp -rdv  /home/*  /mnt/point/

( change the crp:crp in the first command to what you see are the user:group in "ls -l /home/crp" ):hysterical: BrunoPS: I think the problem was that /mnt/point was owned by root and the "-p" ( preserve ) wanted/forced to copy files owned by crpYou could also do a simple "cp -r" without other arguments and change the permissions/ownership on the copied files after the copy has been done.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...