How do I replace two old drives (LVM in use) with a new one?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How do I replace two old drives (LVM in use) with a new one?
I read the DD commands, but can't figure out how to make it work in my scenario.
I have the following:
/dev/hda1 (boot partition)
/dev/hda2 (part of LVM VolGroup00)
/dev/hdb1 (part of LVM VolGroup00) ***According to SMART this drive will die in 24 hours.
New drive is currently sitting as /dev/hdc1 (bootable partition of same size as hda1 and /dev/hdc2 is the remaining space.
hda is about 70GB
hdb is about 30GB
hdc is 300GB
I want to replace the two original drives with the new 300GB drive and don't really care if LVM is in use, though I'm not sure it would make sense to leave it on in my scenario...(This is Fedora Core 6, BTW)
Actually, that just tells me how to remove my /dev/hdb1 drive...I want to replace both my hda and hdb drives. Since hda has the boot partition, I don't see how this would work.
Furthermore, and I guess I should have mentioned this, but when I try to:
pvmove /dev/hdb1 /dev/hdc2
I get an error. "device-mapper: reload ioctl failed: Invalid Argument"
So, I was thinking a bit-by-bit copy might be better, but the more I've read it doesn't look like using dd is an option beacuse of LVM.
So, in lieu of being able to move everything over, which it doesn't appear that I can, is there a generally accepted list of configuration files that I should capture so that when I rebuild the system from scratch I can use them to more quickly get my system up and running? I already have my html files on another box. Here's the listing of files that I also snagged:
.htaccess, access.db, domaintable.db, dovecot.conf, hosts, httpd.conf, local-host-names, magic, mailgertable.db, php.ini, sendmail.cf, sendmail.mc, virtusertable, virtusertable.db
I'm sure some of those I don't really need and I'm probably missing some as well. I also run gallery2, but will probably rebuild that one from scratch since I'm concerned pieces of it are sitting on the bad drive and if I tried to suck all that from the dying drive it would kill it...
Any thoughts on how I can get my system up and running on the new drive and/or what files I need to grab before it is dead are greatly appreciated.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.