LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 12-17-2007, 12:43 AM   #1
lstamm
Member
 
Registered: Aug 2007
Location: McBride, BC, Canada
Distribution: Slackware, OpenBSD, Edubuntu
Posts: 53

Rep: Reputation: 18
Question on creating a striped lvm


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.
 
Old 12-18-2007, 12:11 AM   #2
LinuxManMikeC
Member
 
Registered: Nov 2007
Location: Provo, Utah
Distribution: Debian and Ubuntu
Posts: 74

Rep: Reputation: 15
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 03:13 PM. Reason: minor typo, realized you are starting with plain old partitions
 
Old 12-18-2007, 07:28 AM   #3
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 13.1 / 12.3_64-KDE, Ubuntu 14.04, Fedora 20, Mint 17, Chakra
Posts: 3,680

Rep: Reputation: Disabled
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.

Last edited by JZL240I-U; 12-18-2007 at 07:29 AM.
 
Old 12-18-2007, 03:44 PM   #4
LinuxManMikeC
Member
 
Registered: Nov 2007
Location: Provo, Utah
Distribution: Debian and Ubuntu
Posts: 74

Rep: Reputation: 15
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.

Quote:
Originally Posted by JZL240I-U View Post
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.
 
Old 12-18-2007, 07:20 PM   #5
lstamm
Member
 
Registered: Aug 2007
Location: McBride, BC, Canada
Distribution: Slackware, OpenBSD, Edubuntu
Posts: 53

Original Poster
Rep: Reputation: 18
> 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...
 
  


Reply

Tags
lvm2


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Identify a striped LV zdenisl Linux - Software 4 01-24-2010 09:23 AM
LVM -creating physical volume satimis Linux - General 2 08-10-2006 02:44 AM
creating initrd to boot from LVM jcai Linux - General 3 06-12-2006 02:04 PM
I want to install without creating an lvm system eklhad Fedora 1 06-28-2005 10:17 AM
9.1 install on 3 striped drives monster98 Slackware - Installation 2 08-05-2004 03:23 PM


All times are GMT -5. The time now is 01:40 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration