SlackwareThis Forum is for the discussion of Slackware Linux.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
This is not a strictly slackware question, but I'm asking it here because of the expertise of the posters here.
I have a server with a disk (not in a raid array) mostly full with data, spread over three partitions. I've got another disk of the same size that I want to install, and put the data on a striped LVM with the original disk and the new disk forming the new volume group, with three partitions still. I prefer the the striped LVM over a RAID0 array because of the ability to expand and contract the partitions.
My question is, can I create the volume group on just the new empty disk to start with, format the partions, copy over the data from the old disk, then reformat the old disk and bring it into the volume group as part of a striped volume? This wouldn't work on LVM1, but I'm not sure about LVM2. I don't see how the striping would happen, even if it is allowable.
The other option is to reformat both discs at the same time, and create the striped LVM volume group with both disks at the same time. Then reinstall the data from backup.
You can't change the mapping (linear or striped) for extents that have already been allocated to an LV. So you have to backup your data, wipe the current disk, then build a VG using both disks. Then when creating the LVs choose striped mapping.
Last edited by LinuxManMikeC; 12-18-2007 at 02:13 PM.
Reason: minor typo, realized you are starting with plain old partitions
Distribution: openSuSE 13.2 / 12.3_64-KDE, Ubuntu 14.04, Mint 17
As I understand it he doesn't want to change the striping. As a guess I think it is possible to do it the way the OP suggested (LVM ond the new disk, transferring data, making new (striped) PV on old disk and extending volume). You would still have six partitions, mind.
Suggestion: Just try but make a new (verified) backup first. Then, if it really is impossible to do that way you still have a scheme to fall back to.
Sorry, but you understand wrong, both the problem at hand and LVM in general. He wants to move 3 existing filesystems from partitions to Logical Volumes which are striped on two disks. As one of the two disks is the currently full disk with all his data on it, it must be emptied and initialized as a Physical Volume and added to the new Volume Group. If he were to just make the VG with one disk, he could not create LVs with striped mapping because there isn't a second PV to stripe to. Once the second PV is added, you can't convert any existing LVs to striped mapping. LVs must be created with striped mapping to begin with and that requires one or more PVs to do it.
Originally Posted by JZL240I-U
You would still have six partitions, mind.
This makes absolutely no sense.
To the OP (lstamm):
If you intend to keep the data as three distinct filesystems (moving each partition to an LV) you can backup raw disk images of the 3 partitions. Once you have the Logical Volumes set up you can just restore these disk images directly to their new locations. Then, if necessary, you can resize the filesystems to fill their LVs.
> LVs must be created with striped mapping to begin with and that requires one or more PVs to do it.
Thanks, LinuxManMikeC. That's exactly the answer I was looking for. I thought I had read somewhere that LVs could be converted to striped mapping with LVM2, after initially being created on a single PV. I couldn't see how that would work, and couldn't find any examples in the docs, but you never know...