* [linux-lvm] Is LVM safe? @ 2005-06-20 12:02 John Rowe 2005-06-20 13:17 ` Rainer Krienke 0 siblings, 1 reply; 13+ messages in thread From: John Rowe @ 2005-06-20 12:02 UTC (permalink / raw) To: linux-lvm With a 'standard' disk partition (ext3, etc.) I can be confident that if I have the partition I have the data: I can always just move the disk to another system and mount it. Is the same true for LVM? I am concerned that the LVM system also seems to need some information kept on the host files system in /etc/lvm* and that if I lose that I'm in serious trouble. John ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [linux-lvm] Is LVM safe? 2005-06-20 12:02 [linux-lvm] Is LVM safe? John Rowe @ 2005-06-20 13:17 ` Rainer Krienke 2005-06-20 13:26 ` Erik Ohrnberger 2005-06-20 13:49 ` John Rowe 0 siblings, 2 replies; 13+ messages in thread From: Rainer Krienke @ 2005-06-20 13:17 UTC (permalink / raw) To: LVM general discussion and development [-- Attachment #1: Type: text/plain, Size: 1893 bytes --] On Montag 20 Juni 2005 14:02, John Rowe wrote: > With a 'standard' disk partition (ext3, etc.) I can be confident that if > I have the partition I have the data: I can always just move the disk to > another system and mount it. Is the same true for LVM? > > I am concerned that the LVM system also seems to need some information > kept on the host files system in /etc/lvm* and that if I lose that I'm > in serious trouble. The main difference between a partition and lvm is in my eyes that in lvm you usually do not have a single disk where your data is on. Instead you will have a bunch of disks and possibly your data are spread across all of these disks (depending on the setup of your volumegroups). So if you want to move your disk to another system you will have to move all disks that have been part of the lvm structure. Since lvm scans all disks to build up the volumegroups and logical volumes it should also work after you moved your disks to another system. If you modified you /etc/lvm/lvm.conf file you probably will have to take a look at this file on the old and new system to get things right since you can for example determine which of the systems disks are scanned for physical volumes and volumegroups. Since there might be a different set of disks in the old and new system (aside from the disks you moved) the configuration could need an update in this case. Have a nice day Rainer -- --------------------------------------------------------------------------- Rainer Krienke, Universitaet Koblenz, Rechenzentrum, Raum A022 Universitaetsstrasse 1, 56070 Koblenz, Tel: +49 261287 -1312, Fax: -1001312 Mail: krienke@uni-koblenz.de, Web: http://www.uni-koblenz.de/~krienke Get my public PGP key: http://www.uni-koblenz.de/~krienke/mypgp.html --------------------------------------------------------------------------- [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [linux-lvm] Is LVM safe? 2005-06-20 13:17 ` Rainer Krienke @ 2005-06-20 13:26 ` Erik Ohrnberger 2005-06-20 13:35 ` Andy Smith 2005-06-20 13:49 ` John Rowe 1 sibling, 1 reply; 13+ messages in thread From: Erik Ohrnberger @ 2005-06-20 13:26 UTC (permalink / raw) To: linux-lvm On Mon, June 20, 2005 9:17, Rainer Krienke said: > > The main difference between a partition and lvm is in my eyes that in lvm > you > usually do not have a single disk where your data is on. Instead you will > have a bunch of disks and possibly your data are spread across all of > these > disks (depending on the setup of your volumegroups). > (snip) Hmm. The thought just crossed my mind that the failure rate of the LVM would be the sum of the failure rates of all the disks in your LVM. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [linux-lvm] Is LVM safe? 2005-06-20 13:26 ` Erik Ohrnberger @ 2005-06-20 13:35 ` Andy Smith 0 siblings, 0 replies; 13+ messages in thread From: Andy Smith @ 2005-06-20 13:35 UTC (permalink / raw) To: linux-lvm [-- Attachment #1: Type: text/plain, Size: 283 bytes --] On Mon, Jun 20, 2005 at 09:26:49AM -0400, Erik Ohrnberger wrote: > The thought just crossed my mind that the failure rate of the LVM would be > the sum of the failure rates of all the disks in your LVM. You can run LVM on top of software RAID... (or indeed hardware RAID of course) [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [linux-lvm] Is LVM safe? 2005-06-20 13:17 ` Rainer Krienke 2005-06-20 13:26 ` Erik Ohrnberger @ 2005-06-20 13:49 ` John Rowe 2005-06-20 14:09 ` Philipp Riegger 1 sibling, 1 reply; 13+ messages in thread From: John Rowe @ 2005-06-20 13:49 UTC (permalink / raw) To: LVM general discussion and development Thanks for the reply but this doesn't answer my question: If I have a Physical Volume which is the only Physical Volume in a Volume Group, can I always recover the recover the Volume Group if I have absolutely nothing else just like I can with an ext3 partition? It seems to me that the only possible answers are "yes" or "no", with "yes, but it's difficult" somewhere in between! Thanks again. John ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [linux-lvm] Is LVM safe? 2005-06-20 13:49 ` John Rowe @ 2005-06-20 14:09 ` Philipp Riegger 2005-06-20 14:34 ` John Rowe 2005-06-20 14:42 ` AJ Lewis 0 siblings, 2 replies; 13+ messages in thread From: Philipp Riegger @ 2005-06-20 14:09 UTC (permalink / raw) To: LVM general discussion and development On 20. Jun 2005, at 15:49 Uhr, John Rowe wrote: > If I have a Physical Volume which is the only Physical Volume in a > Volume Group, can I always recover the recover the Volume Group if I > have absolutely nothing else just like I can with an ext3 partition? Yes, it's easy. You just need a kernel with DM-Support and the LVM2-Tools. A simple vgscan vgchangs -ay And you have your "Partitions" back. ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [linux-lvm] Is LVM safe? 2005-06-20 14:09 ` Philipp Riegger @ 2005-06-20 14:34 ` John Rowe 2005-06-20 14:42 ` AJ Lewis 1 sibling, 0 replies; 13+ messages in thread From: John Rowe @ 2005-06-20 14:34 UTC (permalink / raw) To: LVM general discussion and development Thanks, this is more or less what I've been trying: #vgscan --mknodes -vv Setting global/locking_type to 1 Setting global/locking_dir to /var/lock/lvm File-based locking enabled. Wiping cache of LVM-capable devices Wiping internal cache Reading all physical volumes. This may take a while... Finding all volume groups /dev/md0: size is 0 sectors /dev/hda1: size is 417627 sectors /dev/hda1: No label detected /dev/hda2: size is 40965750 sectors /dev/hda2: No label detected /dev/hda3: size is 6136830 sectors /dev/hda3: No label detected /dev/hda4: size is 265056435 sectors /dev/hda4: lvm2 label detected /dev/cdrom: open failed: No medium found Finding all logical volumes # vgchange -ay -vv Setting global/locking_type to 1 Setting global/locking_dir to /var/lock/lvm File-based locking enabled. Finding all volume groups /dev/hda1: No label detected /dev/hda2: No label detected /dev/hda3: No label detected /dev/hda4: lvm2 label detected But it doesn't seem to find anything! John ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [linux-lvm] Is LVM safe? 2005-06-20 14:09 ` Philipp Riegger 2005-06-20 14:34 ` John Rowe @ 2005-06-20 14:42 ` AJ Lewis 2005-06-20 15:00 ` John Rowe 1 sibling, 1 reply; 13+ messages in thread From: AJ Lewis @ 2005-06-20 14:42 UTC (permalink / raw) To: LVM general discussion and development [-- Attachment #1: Type: text/plain, Size: 1424 bytes --] On Mon, Jun 20, 2005 at 04:09:10PM +0200, Philipp Riegger wrote: > On 20. Jun 2005, at 15:49 Uhr, John Rowe wrote: > > >If I have a Physical Volume which is the only Physical Volume in a > >Volume Group, can I always recover the recover the Volume Group if I > >have absolutely nothing else just like I can with an ext3 partition? > > Yes, it's easy. You just need a kernel with DM-Support and the > LVM2-Tools. > > A simple > > vgscan > vgchangs -ay > > And you have your "Partitions" back. Well, it's not quite that simple - if something scribbles over your LVM metadata (i've never seen this happen where it wasn't user error), you need to do quite a bit more work to get things back so you can activate your LVs so you can fsck your ext3 partition. It usually involves at least running a vgcfgrestore against the backup file in /etc/lvm/backup. So yes, it can be more complicated if the lvm metadata gets broken - but this is similar to what happens if the partition table gets busted on a normal disk. -- AJ Lewis Voice: 612-638-0500 Red Hat Inc. E-Mail: alewis@redhat.com One Main Street SE, Suite 209 Minneapolis, MN 55414 Current GPG fingerprint = D9F8 EDCE 4242 855F A03D 9B63 F50C 54A8 578C 8715 Grab the key at: http://people.redhat.com/alewis/gpg.html or one of the many keyservers out there... [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [linux-lvm] Is LVM safe? 2005-06-20 14:42 ` AJ Lewis @ 2005-06-20 15:00 ` John Rowe 2005-06-20 15:12 ` AJ Lewis 2005-06-20 16:10 ` Eric Hopper 0 siblings, 2 replies; 13+ messages in thread From: John Rowe @ 2005-06-20 15:00 UTC (permalink / raw) To: LVM general discussion and development > > Yes, it's easy. You just need a kernel with DM-Support and the > But this is similar to what > happens if the partition table gets busted on a normal disk. So the previous poster's "Yes" actually means "No". And a broken partition table will zap a disk with an LVM partition too won't it? So the bottom line is that if I want to move an LVM partition to a different system I have to hold my breath and pray. The idea that a disk partition needs Unix file to be able to read it is absolutely astonishing. John ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [linux-lvm] Is LVM safe? 2005-06-20 15:00 ` John Rowe @ 2005-06-20 15:12 ` AJ Lewis 2005-06-20 15:27 ` John Rowe 2005-06-20 16:10 ` Eric Hopper 1 sibling, 1 reply; 13+ messages in thread From: AJ Lewis @ 2005-06-20 15:12 UTC (permalink / raw) To: LVM general discussion and development [-- Attachment #1: Type: text/plain, Size: 1176 bytes --] On Mon, Jun 20, 2005 at 04:00:49PM +0100, John Rowe wrote: > > > > Yes, it's easy. You just need a kernel with DM-Support and the > > > But this is similar to what > > happens if the partition table gets busted on a normal disk. > > So the previous poster's "Yes" actually means "No". And a broken > partition table will zap a disk with an LVM partition too won't it? So > the bottom line is that if I want to move an LVM partition to a > different system I have to hold my breath and pray. No - that should just work. You just need to have the device-mapper kernel modules and the lvm2 tools. Then you do a 'vgscan && vgchange -ay' and it will be there. > The idea that a disk partition needs Unix file to be able to read it is > absolutely astonishing. What? -- AJ Lewis Voice: 612-638-0500 Red Hat Inc. E-Mail: alewis@redhat.com One Main Street SE, Suite 209 Minneapolis, MN 55414 Current GPG fingerprint = D9F8 EDCE 4242 855F A03D 9B63 F50C 54A8 578C 8715 Grab the key at: http://people.redhat.com/alewis/gpg.html or one of the many keyservers out there... [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [linux-lvm] Is LVM safe? 2005-06-20 15:12 ` AJ Lewis @ 2005-06-20 15:27 ` John Rowe 2005-06-20 15:45 ` AJ Lewis 0 siblings, 1 reply; 13+ messages in thread From: John Rowe @ 2005-06-20 15:27 UTC (permalink / raw) To: LVM general discussion and development > > > The idea that a disk partition needs Unix file to be able to read it is > > absolutely astonishing. > > What? I'm getting two different answers here. One person says I don't need /etc/lvm.*, the other says I do! FWIW, I'm running Linux version 2.6.9-5.0.5.EL having 'upgraded' from RedHat9 to Scientific Linux 4 (a RedHat Enterprise clone), and I can't see my LVM.. Of course I have backups but it worries me for the future. John ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [linux-lvm] Is LVM safe? 2005-06-20 15:27 ` John Rowe @ 2005-06-20 15:45 ` AJ Lewis 0 siblings, 0 replies; 13+ messages in thread From: AJ Lewis @ 2005-06-20 15:45 UTC (permalink / raw) To: LVM general discussion and development [-- Attachment #1: Type: text/plain, Size: 1317 bytes --] On Mon, Jun 20, 2005 at 04:27:35PM +0100, John Rowe wrote: > > > > > > The idea that a disk partition needs Unix file to be able to read it is > > > absolutely astonishing. > > > > What? > > I'm getting two different answers here. One person says I don't > need /etc/lvm.*, the other says I do! Ok, so the only time you *need* /etc/lvm/* is if you have to recover from bad metadata. Every PV in your VG has a complete copy of the metadata for that VG, so you have multiple copies of the layout - if you have one of these, you can recover your LVM setup. > FWIW, I'm running Linux version 2.6.9-5.0.5.EL having 'upgraded' from > RedHat9 to Scientific Linux 4 (a RedHat Enterprise clone), and I can't > see my LVM.. Seeing the output of 'vgscan -vvv' and 'vgchange -ay -vvv' would be helpful - maybe you could toss it up on pastebin.com? > Of course I have backups but it worries me for the future. -- AJ Lewis Voice: 612-638-0500 Red Hat Inc. E-Mail: alewis@redhat.com One Main Street SE, Suite 209 Minneapolis, MN 55414 Current GPG fingerprint = D9F8 EDCE 4242 855F A03D 9B63 F50C 54A8 578C 8715 Grab the key at: http://people.redhat.com/alewis/gpg.html or one of the many keyservers out there... [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [linux-lvm] Is LVM safe? 2005-06-20 15:00 ` John Rowe 2005-06-20 15:12 ` AJ Lewis @ 2005-06-20 16:10 ` Eric Hopper 1 sibling, 0 replies; 13+ messages in thread From: Eric Hopper @ 2005-06-20 16:10 UTC (permalink / raw) To: LVM general discussion and development [-- Attachment #1: Type: text/plain, Size: 1719 bytes --] On Mon, Jun 20, 2005 at 04:00:49PM +0100, John Rowe wrote: > > > > Yes, it's easy. You just need a kernel with DM-Support and the > > > But this is similar to what > > happens if the partition table gets busted on a normal disk. > > So the previous poster's "Yes" actually means "No". And a broken > partition table will zap a disk with an LVM partition too won't it? So > the bottom line is that if I want to move an LVM partition to a > different system I have to hold my breath and pray. No, it means "Yes" just like he said. There is a condition that you didn't explicitly state in the original question. If the LVM metadata is messed up somehow (which doesn't generally happen unless you do something stupid), you can't recover the LVM volumes without a filesystem backup of the metadata. > The idea that a disk partition needs Unix file to be able to read it is > absolutely astonishing. Umm, try this sometime... dd if=/dev/zero of=/dev/hda bs=512 count=1 Then just try to resurrect the partition. Unless you've created a backup of your partition table into a Unix file, then you aren't going to recover the partition table, period. So, poof, there, you have a disk partition that needs a Unix file to be able to read it. Since LVM maintains backups of all of this metadata in files, it's signficantly better for recovery than Unix partitions are. *sigh*, -- "It does me no injury for my neighbor to say there are twenty gods or no God. It neither picks my pocket nor breaks my leg." --- Thomas Jefferson "Go to Heaven for the climate, Hell for the company." -- Mark Twain -- Eric Hopper (hopper@omnifarious.org http://www.omnifarious.org/~hopper) -- [-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2005-06-20 16:10 UTC | newest] Thread overview: 13+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2005-06-20 12:02 [linux-lvm] Is LVM safe? John Rowe 2005-06-20 13:17 ` Rainer Krienke 2005-06-20 13:26 ` Erik Ohrnberger 2005-06-20 13:35 ` Andy Smith 2005-06-20 13:49 ` John Rowe 2005-06-20 14:09 ` Philipp Riegger 2005-06-20 14:34 ` John Rowe 2005-06-20 14:42 ` AJ Lewis 2005-06-20 15:00 ` John Rowe 2005-06-20 15:12 ` AJ Lewis 2005-06-20 15:27 ` John Rowe 2005-06-20 15:45 ` AJ Lewis 2005-06-20 16:10 ` Eric Hopper
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).