Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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.
Hello,
We need to migrate to a new storage frame and i'd like to do it with no/little downtime. The existing vg contains 1 lv that is spread across 4 disk devices. I have allocated and added 1 new disk to the vg that I want to migrate to. I used lvconvert to do this. Once lvconvert showed 100% sync I then used lvconvert to pull the original 4 drives. After, the vgdisplay command shows the vg/lv on the original and the new device empty. Any suggestions on what i'm doing wrong and how I can get this done? Here are the commands I used:
When we did a similar migration last year I found that any typo in the "lvconvert -m 0" makes it go back to the first (original) mirror device(s) rather than keeping the new mirror. Quite maddening on some of the things I did that were 7 TB and took hours to create the new mirror.
Mirroring and then removing the original is basically what pvmove does.
There is benefit to using lvconvert vs pvmove:
1) You can background the lvcconvert and periodically check its status.
2) You can work with multiple LVs more easily.
3) If something happens in the middle of the lvconvert your original extents are still in place until you decide to remove the extents on the new volumes.
pvmove is something I've used a few times for one off things (e.g. moving from a smaller volume to a larger one) but for a project where one is migrating from one disk array to another where multiple servers, multiple VGs and multiple LVs are concerned lvconvert is the way to go IMO.
If you don't restrict it to one LV, pvmove will happily move all the LVs in the source PV. If there is a crash during the operation, just running "pvmove" again with no physical volume arguments will restart all moves in progress from the last checkpoint. You can use the "--atomic" option to ensure that everything remains as it was on the source PV if the operation is aborted. You can use the "--background" option to run the pvmove daemon in the background.
Yes, you can do it all manually with lvconvert, just as you can use dmsetup directly to make COW snapshots without involving LVM. Generally, using the higher-level tools makes more sense to me unless there is some overriding reason that prevents it.
When we did a similar migration last year I found that any typo in the "lvconvert -m 0" makes it go back to the first (original) mirror device(s) rather than keeping the new mirror. Quite maddening on some of the things I did that were 7 TB and took hours to create the new mirror.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.