crp Posted January 31, 2007 Share Posted January 31, 2007 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 ? Quote Link to comment Share on other sites More sharing options...
Bruno Posted January 31, 2007 Share Posted January 31, 2007 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 Quote Link to comment Share on other sites More sharing options...
crp Posted February 1, 2007 Author Share Posted February 1, 2007 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 ) BrunoIt 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? Quote Link to comment Share on other sites More sharing options...
Bruno Posted February 1, 2007 Share Posted February 1, 2007 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 Quote Link to comment Share on other sites More sharing options...
crp Posted February 1, 2007 Author Share Posted February 1, 2007 . . . . . . 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. Brunohmm, 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 Quote Link to comment Share on other sites More sharing options...
Bruno Posted February 1, 2007 Share Posted February 1, 2007 Did you use the "cp -r" ( with the -r argument ) as root ?? Bruno Quote Link to comment Share on other sites More sharing options...
crp Posted February 1, 2007 Author Share Posted February 1, 2007 Did you use the "cp -r" ( with the -r argument ) as root ?? Brunonope for some reason I thought -a would include the directories.Thanks. now just have 3 more reboots to go Quote Link to comment Share on other sites More sharing options...
Bruno Posted February 1, 2007 Share Posted February 1, 2007 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 !! Bruno Quote Link to comment Share on other sites More sharing options...
crp Posted February 2, 2007 Author Share Posted February 2, 2007 Glad it worked ! Bruno it didn't for some reason, the cp just would not do directory creation , no matter what switch I used. 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 ? Quote Link to comment Share on other sites More sharing options...
Bruno Posted February 2, 2007 Share Posted February 2, 2007 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 ! Bruno Quote Link to comment Share on other sites More sharing options...
crp Posted February 5, 2007 Author Share Posted February 5, 2007 This makes me very curious to see the exact command you were using . . . and what the response was you got in the terminal.as rootmount -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. Quote Link to comment Share on other sites More sharing options...
Bruno Posted February 5, 2007 Share Posted February 5, 2007 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" ) 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.