Hello, I've got a CentOS 4.4 box that it's drive is dying. This machine has a lot of customizations done to it, custom configs and the like and i'd rather not have to do a full reinstall or manually copy over settings files. What i'm wondering is is there a way i can set up the new disk, make it bootable, then transfer the entire system over to it? I would then pull out the failing drive set the new one to be master, and go on with things? Recently i've had to do this on a FreeBSD system for pretty much the same reason, all data and settings went over fine and i'd like to have the same success here. Thanks. Dave.
Dave wrote:
Hello, I've got a CentOS 4.4 box that it's drive is dying. This machine has a lot of customizations done to it, custom configs and the like and i'd rather not have to do a full reinstall or manually copy over settings files. What i'm wondering is is there a way i can set up the new disk, make it bootable, then transfer the entire system over to it? I would then pull out the failing drive set the new one to be master, and go on with things? Recently i've had to do this on a FreeBSD system for pretty much the same reason, all data and settings went over fine and i'd like to have the same success here. Thanks. Dave.
There's a howto here: http://tldp.org/HOWTO/Hard-Disk-Upgrade/index.html
I haven't used it for several years but I think it will still work.
Dave spake the following on 4/16/2007 10:03 AM:
Hello, I've got a CentOS 4.4 box that it's drive is dying. This machine has a lot of customizations done to it, custom configs and the like and i'd rather not have to do a full reinstall or manually copy over settings files. What i'm wondering is is there a way i can set up the new disk, make it bootable, then transfer the entire system over to it? I would then pull out the failing drive set the new one to be master, and go on with things? Recently i've had to do this on a FreeBSD system for pretty much the same reason, all data and settings went over fine and i'd like to have the same success here. Thanks. Dave.
I have done it in the past. It is much easier to do so from a rescue disk or the CentOS live cd, because copying from a system that is still running might not work the best. You can set up the partitioning on the new drive, and use your favorite poison to copy each partition. You can use rsync, cp -a, or tar, whichever you are comfortable with. If the drives are close in size, you can usually get away with dd, or G4L if you want something more visual.
--On Monday, April 16, 2007 10:40 AM -0700 Scott Silva ssilva@sgvwater.com wrote:
You can set up the partitioning on the new drive, and use your favorite poison to copy each partition. You can use rsync, cp -a, or tar, whichever you are comfortable with. If the drives are close in size, you can usually get away with dd, or G4L if you want something more visual.
dump/restore in a pipeline would be my choice, at least if you're copying ext2 or 3 filesystems. You can see an example in old copies of the restore man page:
http://www.daemon-systems.org/man/restore.8.html
dump 0f - /usr | (cd /mnt; restore xf -)
dump reads through the block device and restore writes through the filesystem. This will preserve holes in sparse files, because the holes can be detected in the raw filesystem format.
When dump is mentioned, someone inevitably mentions that Linus disapproves of dump:
Hello, Thanks, i like this method i have used it on bsd systems and am glad it is viable here. I'll check out the tldp howto as well. Thanks. Dave.
----- Original Message ----- From: "Kenneth Porter" shiva@sewingwitch.com To: "CentOS mailing list" centos@centos.org Sent: Monday, April 16, 2007 1:58 PM Subject: Re: [CentOS] Re: moving CentOS to a larger disk
--On Monday, April 16, 2007 10:40 AM -0700 Scott Silva ssilva@sgvwater.com wrote:
You can set up the partitioning on the new drive, and use your favorite poison to copy each partition. You can use rsync, cp -a, or tar, whichever you are comfortable with. If the drives are close in size, you can usually get away with dd, or G4L if you want something more visual.
dump/restore in a pipeline would be my choice, at least if you're copying ext2 or 3 filesystems. You can see an example in old copies of the restore man page:
http://www.daemon-systems.org/man/restore.8.html
dump 0f - /usr | (cd /mnt; restore xf -)
dump reads through the block device and restore writes through the filesystem. This will preserve holes in sparse files, because the holes can be detected in the raw filesystem format.
When dump is mentioned, someone inevitably mentions that Linus disapproves of dump:
http://dump.sourceforge.net/isdumpdeprecated.html _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Hi, Thanks for your reply. Is there a rescue disk for CentOS 4.4? The drives are not similar in size, the new one is about twice as large. Thanks. Dave.
----- Original Message ----- From: "Scott Silva" ssilva@sgvwater.com To: centos@centos.org Sent: Monday, April 16, 2007 1:40 PM Subject: [CentOS] Re: moving CentOS to a larger disk
Dave spake the following on 4/16/2007 10:03 AM:
Hello, I've got a CentOS 4.4 box that it's drive is dying. This machine has a lot of customizations done to it, custom configs and the like and i'd rather not have to do a full reinstall or manually copy over settings files. What i'm wondering is is there a way i can set up the new disk, make it bootable, then transfer the entire system over to it? I would then pull out the failing drive set the new one to be master, and go on with things? Recently i've had to do this on a FreeBSD system for pretty much the same reason, all data and settings went over fine and i'd like to have the same success here. Thanks. Dave.
I have done it in the past. It is much easier to do so from a rescue disk or the CentOS live cd, because copying from a system that is still running might not work the best. You can set up the partitioning on the new drive, and use your favorite poison to copy each partition. You can use rsync, cp -a, or tar, whichever you are comfortable with. If the drives are close in size, you can usually get away with dd, or G4L if you want something more visual.
--
MailScanner is like deodorant... You hope everybody uses it, and you notice quickly if they don't!!!!
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Hi Dave,
Yes go here: http://www.sysresccd.org/Download
I did this yesterday from a 60 gig to a 120 gig. Worked flawlessly.
Used G4U to create image and resore image on larger drive, then used SRCD to grow image on new drive. Worked well for me,
Phil
On Monday 16 April 2007 14:28, Dave wrote:
Hi, Thanks for your reply. Is there a rescue disk for CentOS 4.4? The drives are not similar in size, the new one is about twice as large. Thanks. Dave.
----- Original Message ----- From: "Scott Silva" ssilva@sgvwater.com To: centos@centos.org Sent: Monday, April 16, 2007 1:40 PM Subject: [CentOS] Re: moving CentOS to a larger disk
Dave spake the following on 4/16/2007 10:03 AM:
Hello, I've got a CentOS 4.4 box that it's drive is dying. This machine has a lot of customizations done to it, custom configs and the like and i'd rather not have to do a full reinstall or manually copy over settings files. What i'm wondering is is there a way i can set up the new disk, make it bootable, then transfer the entire system over to it? I would then pull out the failing drive set the new one to be master, and go on with things? Recently i've had to do this on a FreeBSD system for pretty much the same reason, all data and settings went over fine and i'd like to have the same success here. Thanks. Dave.
I have done it in the past. It is much easier to do so from a rescue disk or the CentOS live cd, because copying from a system that is still running might not work the best. You can set up the partitioning on the new drive, and use your favorite poison to copy each partition. You can use rsync, cp -a, or tar, whichever you are comfortable with. If the drives are close in size, you can usually get away with dd, or G4L if you want something more visual.
--
Dave wrote:
Hi, Thanks for your reply. Is there a rescue disk for CentOS 4.4? The drives are not similar in size, the new one is about twice as large.
boot CD 1 from the same version CentOS with the single option (boot from the cdrom, then at the grub prompt, give it `single` as an additional argument).
John R Pierce spake the following on 4/16/2007 11:42 AM:
Dave wrote:
Hi, Thanks for your reply. Is there a rescue disk for CentOS 4.4? The drives are not similar in size, the new one is about twice as large.
boot CD 1 from the same version CentOS with the single option (boot from the cdrom, then at the grub prompt, give it `single` as an additional argument).
Or rescue as an option.
Hello, My thanks to everyone who has responded. I probably should have mentioned this box doesn't have a cd-rom in it and it's not practical to put one in, install was done via network. I read the tldp hard disk howto and i've got both drives in the box. My problem is the original howto makes no reference to lvm, when centos 4.4 installed that's what it used. So i need to transfer the lvm over along with the data and enlarge partitions to fill the available space on the new drive. And if possible i need to do this with native tools. Any help appreciated. Thanks. Dave.
----- Original Message ----- From: "John R Pierce" pierce@hogranch.com To: "CentOS mailing list" centos@centos.org Sent: Monday, April 16, 2007 2:42 PM Subject: Re: [CentOS] Re: moving CentOS to a larger disk
Dave wrote:
Hi, Thanks for your reply. Is there a rescue disk for CentOS 4.4? The drives are not similar in size, the new one is about twice as large.
boot CD 1 from the same version CentOS with the single option (boot from the cdrom, then at the grub prompt, give it `single` as an additional argument).
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Dave spake the following on 4/16/2007 4:13 PM:
Hello, My thanks to everyone who has responded. I probably should have mentioned this box doesn't have a cd-rom in it and it's not practical to put one in, install was done via network. I read the tldp hard disk howto and i've got both drives in the box. My problem is the original howto makes no reference to lvm, when centos 4.4 installed that's what it used. So i need to transfer the lvm over along with the data and enlarge partitions to fill the available space on the new drive. And if possible i need to do this with native tools. Any help appreciated. Thanks. Dave.
You can add the new drive to the existing VG, and then you can remove the original drive from the VG. That will move all the LV's to the new drive.
Hi, So, i plug in the drive, it's /dev/hdb the original is /dev/hda, i add /dev/hdb to my existing lvm setup. Does adding that move the data or do i have to dump partitions? Then i remove the original drive, shutdown, switch drives, and boot, and all is well. Did i miss a step? Thanks. Dave.
----- Original Message ----- From: "Scott Silva" ssilva@sgvwater.com To: centos@centos.org Sent: Monday, April 16, 2007 7:59 PM Subject: [CentOS] Re: moving CentOS to a larger disk
Dave spake the following on 4/16/2007 4:13 PM:
Hello, My thanks to everyone who has responded. I probably should have mentioned this box doesn't have a cd-rom in it and it's not practical to put one in, install was done via network. I read the tldp hard disk howto and i've got both drives in the box. My problem is the original howto makes no reference to lvm, when centos 4.4 installed that's what it used. So i need to transfer the lvm over along with the data and enlarge partitions to fill the available space on the new drive. And if possible i need to do this with native tools. Any help appreciated. Thanks. Dave.
You can add the new drive to the existing VG, and then you can remove the original drive from the VG. That will move all the LV's to the new drive.
--
MailScanner is like deodorant... You hope everybody uses it, and you notice quickly if they don't!!!!
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Dave spake the following on 4/16/2007 6:25 PM:
Hi, So, i plug in the drive, it's /dev/hdb the original is /dev/hda, i add /dev/hdb to my existing lvm setup. Does adding that move the data or do i have to dump partitions? Then i remove the original drive, shutdown, switch drives, and boot, and all is well. Did i miss a step? Thanks. Dave.
You will need to do some partitioning. If the original drive had a /boot partition and the rest of the space as LVM, then you would need to make a /boot partition of the same or similar size on the new drive, and the rest as a second partition of type LVM. Then you copy over the stuff from the boot part in hda to the boot part in hdb. Then you can add the lvm partition on hdb to the volume group with vgextend. Then you pvmove the volumes from hda to hdb. After that is done, you can vgreduce hda from the group. At this time your data should all be on the new drive. You can shut down and remove hda, and set hdb as the master and reboot with a rescue disk to make sure grub is properly installed if you didn't already do this.
This part of the LVM howto should help explain it in more detail;
http://www.tldp.org/HOWTO/LVM-HOWTO/removeadisk.html
On 4/16/07, Dave dmehler26@woh.rr.com wrote:
Hi, Thanks for your reply. Is there a rescue disk for CentOS 4.4? The drives are not similar in size, the new one is about twice as large. Thanks. Dave.
So don't use dd.
And, please, DON'T TOP POST!
(See, Jim, I learned my lesson....)
Thanks.
mhr