Re: copying lvm with the same name
On Friday 20 March 2009 18:52:59 Aldo Foot wrote: On Fri, Mar 20, 2009 at 11:29 AM, Frank Cox thea...@sasktel.net wrote: On Fri, 20 Mar 2009 11:24:14 + Bill Crawford wrote: You should probably be able to get some sense out of this by doing: # vgrename 1dl8EY-s2Qe-W50Y-wU8V-nCRJ-5Upz-SEkJgp vg_sda2 [frank...@mutt temp]$ su -c vgrename 1dl8EY-s2Qe-W50Y-wU8V-nCRJ-5Upz-SEkJgp vg_sda2 Password: Volume group 1dl8EY-s2Qe-W50Y-wU8V-nCRJ-5Upz-SEkJgp not found. Isn't that UUID is for an actual Hard Drive partition (PV)? Things like PV UUID and LV UUID are not the same thing. Nah, it was for the LV. He might have been able to get the PV UUID from one of the other tools, I was being too clever :o) -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: copying lvm with the same name
Frank Cox wrote: One of my computers died and, of course, there is un-backed-up data on there that I want to recover if I can. The hard drive seems to be in good shape so I took it out of the dead box and installed it on this computer (my main desktop machine.) I have been doing a bunch of reading about logical volumes and some of what I've found is self-contradictory, incomplete and stuff that I just don't really understand (yet.) And, as you can imagine, since this is my main desktop machine I'm not terribly anxious to just start playing around with the lvm configuration without knowing what I'm doing. Here are my findings so far: [r...@mutt ~]# pvscan PV /dev/sdb2 VG VolGroup00 lvm2 [279.25 GB / 32.00 MB free] PV /dev/sda2 VG VolGroup00 lvm2 [465.56 GB / 32.00 MB free] Total: 2 [744.81 GB] / in use: 2 [744.81 GB] / in no VG: 0 [0 ] [r...@mutt ~]# lvscan ACTIVE'/dev/VolGroup00/LogVol00' [277.28 GB] inherit ACTIVE'/dev/VolGroup00/LogVol01' [1.94 GB] inherit It looks like the machine can see the second drive and the lvm that's on it /dev/sdb2, but it has the same VolGroup name as /dev/sda2. What I would like to do is twofold: First, and most importantly, I would like to mount it as-is so I can copy my data off of there. Second, I would like to re-format it and add it to the storage capacity that I already have on this machine. Heck, if it's still a good drive I might as well put it to use. So, how can I mount VolGroup00 that's on /dev/sdb2? The vgchange command followed by a simple mount command looks like what I want to do, but what's the syntax? As I said, I really don't want to bugger up my primary hard drive I have read this thread and I wish I had seen something like it two years ago. I had upgraded a system that used LVM and replaced two drives to increase the total available space. It turned out that I had forgotten to backup a directory. To late and rushing. I wanted to install the removed drive to see if the directory was on that drive but it was part of the old group (generic name creation) and strange and wonderful problems started to crop up. I never did get the drive mounted back then. There needs to be a firm way of changing and editing LVM characteristics in these situations. -- Robin Laing -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: copying lvm with the same name
On Monday 23 March 2009 15:53:01 Robin Laing wrote: There needs to be a firm way of changing and editing LVM characteristics in these situations. Yeah, boot from rescue disk and rename the first one it sees, should then let the other be visible. You could, at a pinch, change the partition type of the PVs of the visible volume group, which should lead to the hidden one appearing, although you might have to delete the metadata cache as mentioned earlier in the thread. -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: copying lvm with the same name
On Mon, Mar 23, 2009 at 8:53 AM, Robin Laing robin.la...@drdc-rddc.gc.ca wrote: There needs to be a firm way of changing and editing LVM characteristics in these situations. -- Robin Laing Hopefully the LVM toolset will be refined overtime. Rick said he'd look into the bugzilla reports; hopefully someone will take notice of what's being discussed. We could spend the whole day creating volumes, but the real test is when we need to implement some rescue procedure as the one at hand. ~af -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: copying lvm with the same name
Aldo Foot wrote: On Mon, Mar 23, 2009 at 8:53 AM, Robin Laing robin.la...@drdc-rddc.gc.ca wrote: There needs to be a firm way of changing and editing LVM characteristics in these situations. -- Robin Laing Hopefully the LVM toolset will be refined overtime. Rick said he'd look into the bugzilla reports; hopefully someone will take notice of what's being discussed. We could spend the whole day creating volumes, but the real test is when we need to implement some rescue procedure as the one at hand. I browsed bugzilla and didn't see any complaints of this type. I've filed a bug (491737) and suggested some fixes/enhancements. We'll see what happens. -- - Rick Stevens, Systems Engineer ri...@nerd.com - - AIM/Skype: therps2ICQ: 22643734Yahoo: origrps2 - -- -Hello. My PID is Inigo Montoya. You `kill -9'-ed my parent- - process. Prepare to vi. - -- -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: copying lvm with the same name
On Thursday 19 March 2009 18:02:26 Frank Cox wrote: ... LV Name/dev/VolGroup00/LogVol00 VG NameVolGroup00 LV UUIDyFemKc-s2bo-zZC0-cc7q-50By-4jQM-G1MsQr ... Block device 253:0 --- Segments --- Logical extent 0 to 8872: Type linear Physical volume /dev/sdb2 Physical extents 0 to 8872 ... LV Name/dev/VolGroup00/LogVol01 VG NameVolGroup00 LV UUID6UuO4G-X2dI-LirG-HvVF-zLfz-hrYW-NYZEdN ... Block device 253:1 --- Segments --- Logical extent 0 to 61: Type linear Physical volume /dev/sdb2 Physical extents 8873 to 8934 Here's the useful information about what's currently active (the Block device should correspond to numbers you'll see in the output from ls -l /dev/mapper) and below we can match these details against the physical devices: PV Name /dev/sdb2 ... Allocated PE 8935 PV UUID SW3Qdy-7qcu-0Th1-Rb2Z-ui24-14ab-qRpMoq --- Physical Segments --- Physical extent 0 to 8872: Logical volume/dev/VolGroup00/LogVol00 Logical extents 0 to 8872 This matches up with your LogVol00 above ... Physical extent 8873 to 8934: Logical volume/dev/VolGroup00/LogVol01 Logical extents 0 to 61 ... and this with your LogVol01 above. PV Name /dev/sda2 VG Name VolGroup00 ... PV UUID 1dl8EY-s2Qe-W50Y-wU8V-nCRJ-5Upz-SEkJgp ... Physical extent 0 to 14834: Logical volume/dev/VolGroup00/LogVol00 Logical extents 0 to 14834 Physical extent 14835 to 14896: Logical volume/dev/VolGroup00/LogVol01 Logical extents 0 to 61 This is your duplicate volume group, which has likewise two logical volumes, but looks like one of them is considerably larger. You should probably be able to get some sense out of this by doing: -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: copying lvm with the same name
On Thursday 19 March 2009 18:02:26 Frank Cox wrote: ... LV Name/dev/VolGroup00/LogVol00 VG NameVolGroup00 LV UUIDyFemKc-s2bo-zZC0-cc7q-50By-4jQM-G1MsQr ... Block device 253:0 --- Segments --- Logical extent 0 to 8872: Type linear Physical volume /dev/sdb2 Physical extents 0 to 8872 ... LV Name/dev/VolGroup00/LogVol01 VG NameVolGroup00 LV UUID6UuO4G-X2dI-LirG-HvVF-zLfz-hrYW-NYZEdN ... Block device 253:1 --- Segments --- Logical extent 0 to 61: Type linear Physical volume /dev/sdb2 Physical extents 8873 to 8934 Here's the useful information about what's currently active (the Block device should correspond to numbers you'll see in the output from ls -l /dev/mapper) and below we can match these details against the physical devices: PV Name /dev/sdb2 ... Allocated PE 8935 PV UUID SW3Qdy-7qcu-0Th1-Rb2Z-ui24-14ab-qRpMoq --- Physical Segments --- Physical extent 0 to 8872: Logical volume/dev/VolGroup00/LogVol00 Logical extents 0 to 8872 This matches up with your LogVol00 above ... Physical extent 8873 to 8934: Logical volume/dev/VolGroup00/LogVol01 Logical extents 0 to 61 ... and this with your LogVol01 above. And the rest: PV Name /dev/sda2 VG Name VolGroup00 ... PV UUID 1dl8EY-s2Qe-W50Y-wU8V-nCRJ-5Upz-SEkJgp ... Physical extent 0 to 14834: Logical volume/dev/VolGroup00/LogVol00 Logical extents 0 to 14834 Physical extent 14835 to 14896: Logical volume/dev/VolGroup00/LogVol01 Logical extents 0 to 61 This is your duplicate volume group, which has likewise two logical volumes, but looks like one of them is considerably larger. You should probably be able to get some sense out of this by doing: # vgrename 1dl8EY-s2Qe-W50Y-wU8V-nCRJ-5Upz-SEkJgp vg_sda2 Give it a try, hopefully that VG is inactive and will let you rename it. -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: copying lvm with the same name
On Fri, 20 Mar 2009 11:24:14 + Bill Crawford wrote: You should probably be able to get some sense out of this by doing: # vgrename 1dl8EY-s2Qe-W50Y-wU8V-nCRJ-5Upz-SEkJgp vg_sda2 [frank...@mutt temp]$ su -c vgrename 1dl8EY-s2Qe-W50Y-wU8V-nCRJ-5Upz-SEkJgp vg_sda2 Password: Volume group 1dl8EY-s2Qe-W50Y-wU8V-nCRJ-5Upz-SEkJgp not found. -- MELVILLE THEATRE ~ Melville Sask ~ http://www.melvilletheatre.com -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: copying lvm with the same name
On Friday 20 March 2009 18:29:33 Frank Cox wrote: On Fri, 20 Mar 2009 11:24:14 + Bill Crawford wrote: You should probably be able to get some sense out of this by doing: # vgrename 1dl8EY-s2Qe-W50Y-wU8V-nCRJ-5Upz-SEkJgp vg_sda2 [frank...@mutt temp]$ su -c vgrename 1dl8EY-s2Qe-W50Y-wU8V-nCRJ-5Upz-SEkJgp vg_sda2 Password: Volume group 1dl8EY-s2Qe-W50Y-wU8V-nCRJ-5Upz-SEkJgp not found. Oh balls, that's the PV UUID, not the VG UUID. Back to square one. You need to either temporarily pull sda2 out, and boot off a rescue disk to rename it, or vice versa. Or find out the UUID of the volume ... if you're lucky, vgdisplay --verbose *might* pick up the duplicate and show you the UUID for it. -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: copying lvm with the same name
On Fri, Mar 20, 2009 at 11:29 AM, Frank Cox thea...@sasktel.net wrote: On Fri, 20 Mar 2009 11:24:14 + Bill Crawford wrote: You should probably be able to get some sense out of this by doing: # vgrename 1dl8EY-s2Qe-W50Y-wU8V-nCRJ-5Upz-SEkJgp vg_sda2 [frank...@mutt temp]$ su -c vgrename 1dl8EY-s2Qe-W50Y-wU8V-nCRJ-5Upz-SEkJgp vg_sda2 Password: Volume group 1dl8EY-s2Qe-W50Y-wU8V-nCRJ-5Upz-SEkJgp not found. Isn't that UUID is for an actual Hard Drive partition (PV)? Things like PV UUID and LV UUID are not the same thing. ~af -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: copying lvm with the same name
On Fri, 20 Mar 2009 18:50:31 + Bill Crawford wrote: You need to either temporarily pull sda2 out, and boot off a rescue disk to rename it, or vice versa. Or find out the UUID of the volume ... if you're lucky, vgdisplay --verbose *might* pick up the duplicate and show you the UUID for it. That's what I was thinking. Since I no longer need the data on that drive (got what I wanted off of it copied the other day) would I be better off to disconnect sda2 and then boot off of a rescue disk and use fdisk to remove the partition table? Would I even need a rescue disk to do that, since sdb2 will boot this computer just fine (that's how I got it going to copy my data). Perhaps I could just boot it from sdb2 and run fdisk and clear the parition table that way. The ultimate objective here is simply to add sdb2 to the available storage on this computer. -- MELVILLE THEATRE ~ Melville Sask ~ http://www.melvilletheatre.com -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: copying lvm with the same name
Frank Cox wrote: On Fri, 20 Mar 2009 18:50:31 + Bill Crawford wrote: You need to either temporarily pull sda2 out, and boot off a rescue disk to rename it, or vice versa. Or find out the UUID of the volume ... if you're lucky, vgdisplay --verbose *might* pick up the duplicate and show you the UUID for it. That's what I was thinking. Since I no longer need the data on that drive (got what I wanted off of it copied the other day) would I be better off to disconnect sda2 and then boot off of a rescue disk and use fdisk to remove the partition table? Would I even need a rescue disk to do that, since sdb2 will boot this computer just fine (that's how I got it going to copy my data). Perhaps I could just boot it from sdb2 and run fdisk and clear the parition table that way. The ultimate objective here is simply to add sdb2 to the available storage on this computer. That's the easiest way out, but I'd do it in rescue mode, not when running off (what is now) sdb. Shut down, disconnect sda (500GB drive), boot in rescue mode and wipe the partition table on (what will NOW be) sda (the 300GB drive). Once that's done, you can shut down, reconnect the 500GB drive and boot normally. Check the lvdisplay -vm again and verify that now the extents are on sda2. Sorry it's been such a pain, Frank. You'd think the LVM tools would have options to handle this sort of thing, but they don't appear to or I'm not smart enough to figure out what they are. I'm going to trawl the bugzilla archives to see if this has been reported before (I'd be surprised if it wasn't) and if not, put a flea in their ear. Even before we have the final results, I'd like to thank Bill Crawford, Aldo Foot and several others (you know who you are) who helped pick up the slack and offer additional suggestions on this thread when I didn't (the day job does have its demands). This is a perfect example of how the list should work. -- - Rick Stevens, Systems Engineer ri...@nerd.com - - AIM/Skype: therps2ICQ: 22643734Yahoo: origrps2 - -- - A day for firm decisions!!! Well, then again, maybe not!- -- -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: copying lvm with the same name
From: Dr. Michael J. Chudobiak m...@avtechpulse.com Sent: Thursday, 2009, March 19 05:10 Frank Cox wrote: It looks like the machine can see the second drive and the lvm that's on it /dev/sdb2, but it has the same VolGroup name as /dev/sda2. Yes, this is common and annoying. Here is the guide that I followed when it happened to me: http://www.whoopis.com/howtos/linux_lvm_recovery.html I filed bug 461682 (https://bugzilla.redhat.com/show_bug.cgi?id=461682), requesting that the default volume names not be so generic - they now incorporate the hostname, so this problem should be much less common in F11+. That's a wrong solution. GUIDs were invented to handle this sort of problem. Suppose Fred has a machine he called boundless. He has a disk problem. He asked Judy to fix it. And for unknown reasons Judy also has a machine called boundless. GUIDs to the rescue. The only time GUIDs will fail is when you use dd to create as good a back-up as you can of a dying disk. Sometimes this is a bad thing, as in the scenario under discussion. Sometimes it is a good thing, as when I performed that sort of a recovery on an NTFS laptop drive. I didn't even have to reinstall anything after NTFS chkdisk massaged the drive. (It had a directory block it could not update - on the C: drive.) Sadly GUIDs are too complicated for the people naming disk partitions. {^_^} Joanne -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: copying lvm with the same name
On Fri, Mar 20, 2009 at 1:39 PM, jdow j...@earthlink.net wrote: From: Dr. Michael J. Chudobiak m...@avtechpulse.com Sent: Thursday, 2009, March 19 05:10 Frank Cox wrote: It looks like the machine can see the second drive and the lvm that's on it /dev/sdb2, but it has the same VolGroup name as /dev/sda2. Yes, this is common and annoying. Here is the guide that I followed when it happened to me: http://www.whoopis.com/howtos/linux_lvm_recovery.html I filed bug 461682 (https://bugzilla.redhat.com/show_bug.cgi?id=461682), requesting that the default volume names not be so generic - they now incorporate the hostname, so this problem should be much less common in F11+. That's a wrong solution. GUIDs were invented to handle this sort of problem. Suppose Fred has a machine he called boundless. He has a disk problem. He asked Judy to fix it. And for unknown reasons Judy also has a machine called boundless. GUIDs to the rescue. Hmm... The wrong solution? *It is* the solution because I actually used the advice given in this thread to fix a system. I don't think I understand how hostnames or GUIDs figure in this kind of situation. If you have the time, would you share with us how you've done it? The only time GUIDs will fail is when you use dd to create as good a back-up as you can of a dying disk. Sometimes this is a bad thing, as in the scenario under discussion. Sometimes it is a good thing, as when I performed that sort of a recovery on an NTFS laptop drive. I didn't even have to reinstall anything after NTFS chkdisk massaged the drive. (It had a directory block it could not update - on the C: drive.) Sadly GUIDs are too complicated for the people naming disk partitions. In this particular LVM case, we've looked at UUIDs as they refer to Logical Volumes, which are not disk partitions. They are not the same thing. ~af -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: copying lvm with the same name
Frank Cox wrote: It looks like the machine can see the second drive and the lvm that's on it /dev/sdb2, but it has the same VolGroup name as /dev/sda2. Yes, this is common and annoying. Here is the guide that I followed when it happened to me: http://www.whoopis.com/howtos/linux_lvm_recovery.html I filed bug 461682 (https://bugzilla.redhat.com/show_bug.cgi?id=461682), requesting that the default volume names not be so generic - they now incorporate the hostname, so this problem should be much less common in F11+. - Mike -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: copying lvm with the same name
On Thursday 19 March 2009 12:10:25 Dr. Michael J. Chudobiak wrote: ... I filed bug 461682 (https://bugzilla.redhat.com/show_bug.cgi?id=461682), requesting that the default volume names not be so generic - they now incorporate the hostname, so this problem should be much less common in F11+. It should possibly include a reference to the distro you're installing, else the test install of the next release I do in a separate partition ends up still with the same volume group name. I've manually called mine by the release here (and my rawhide install is actually just a real partition, now, it seemed less painful in the long run :o)). -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: copying lvm with the same name
On Thu, Mar 19, 2009 at 5:10 AM, Dr. Michael J. Chudobiak m...@avtechpulse.com wrote: Frank Cox wrote: It looks like the machine can see the second drive and the lvm that's on it /dev/sdb2, but it has the same VolGroup name as /dev/sda2. Yes, this is common and annoying. Here is the guide that I followed when it happened to me: http://www.whoopis.com/howtos/linux_lvm_recovery.html I filed bug 461682 (https://bugzilla.redhat.com/show_bug.cgi?id=461682), requesting that the default volume names not be so generic - they now incorporate the hostname, so this problem should be much less common in F11+. - Mike ___ The instructions from the link do work. The one thing I would add is that when you try to rename the VG, it may complain of active volumes in it and bail out. I did this exercise: rename my *system* disk's VG from VG00 to KEPLER. This is done entirely within the LiveCD environment. The VG name is arbitrary, name it anything you prefer. In my system disk I have a separate /boot and a VG with /, swap, /var, /usr, /usr/local, /tmp and /home. **Boot with a LiveCD You cannot change the VG name on a running system disk. Trying to rename the VG when LVs are still active, results in an error saying that there are active LVs in the VG. Do lvs --notice that one of the LV Attributes (Attr) is a for active. **Turn off the swap partition The LiveCD mounts the swap image and doesn't let go of it. # swapoff -a # lvchange -an /dev/VG00/swapLV (type in your own device name) **Deactivate all LVs The LV name is whatever name is under the LV column. # lvchange -an /dev/VG00/LV This is where you use the reference[1] to edit the initrd image file. [1] http://www.whoopis.com/howtos/linux_lvm_recovery.html -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: copying lvm with the same name
Frank Cox wrote: On Wed, 18 Mar 2009 17:07:28 -0700 Rick Stevens wrote: We have a serious conflict here. The df command shows you as on sda, but LVM is reporting sdb. My gut reaction is to have you do a: vgreduce --test VolGroup00 /dev/sdb2 and see if it would be successful. If so, then remove the --test and cross your fingers. [r...@mutt temp]# vgreduce --test VolGroup00 /dev/sdb2 Test mode: Metadata will NOT be updated. Physical Volume /dev/sdb2 not found in Volume Group VolGroup00 This is consistent with the fact that the active Volume Group that I'm using is not on /dev/sdb2. It's just the lvdisplay -vm command that shows it as being in use. This is truly screwey. The pvscan shows sdb2 as part of VolGroup00, lvdisplay shows the partition as in use, but vgreduce says sdb2 isn't part of the VG. Hoo, boy. Frank, this is potentially dangerous, but you can try # pvremove /dev/sdb2 to wipe out sdb2's PV status. Since you seem to be running on /dev/sda and vgreduce claims that /dev/sdb2 isn't part of the active VG, you should be able to do this without blowing things up. Damn this makes me nervous! -- - Rick Stevens, Systems Engineer ri...@nerd.com - - AIM/Skype: therps2ICQ: 22643734Yahoo: origrps2 - -- - Cuteness can be overcome through sufficient bastardry - - --Mark 'Kamikaze' Hughes - -- -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: copying lvm with the same name
On Thursday 19 March 2009 17:17:43 Rick Stevens wrote: This is truly screwey. The pvscan shows sdb2 as part of VolGroup00, lvdisplay shows the partition as in use, but vgreduce says sdb2 isn't part of the VG. Hoo, boy. Could someone post the output of lvdisplay --maps and of pvdisplay --maps ? -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: copying lvm with the same name
On Thu, Mar 19, 2009 at 10:17 AM, Rick Stevens ri...@nerd.com wrote: This is truly screwey. The pvscan shows sdb2 as part of VolGroup00, lvdisplay shows the partition as in use, but vgreduce says sdb2 isn't part of the VG. Hoo, boy. Frank, this is potentially dangerous, but you can try # pvremove /dev/sdb2 to wipe out sdb2's PV status. Since you seem to be running on /dev/sda and vgreduce claims that /dev/sdb2 isn't part of the active VG, you should be able to do this without blowing things up. Damn this makes me nervous! -- Time to dust out that vodoo doll :-) ~af -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: copying lvm with the same name
On Thu, 19 Mar 2009 17:47:53 + Bill Crawford wrote: Could someone post the output of lvdisplay --maps and of pvdisplay --maps ? [r...@mutt ~]# lvdisplay --maps --- Logical volume --- LV Name/dev/VolGroup00/LogVol00 VG NameVolGroup00 LV UUIDyFemKc-s2bo-zZC0-cc7q-50By-4jQM-G1MsQr LV Write Accessread/write LV Status available # open 1 LV Size277.28 GB Current LE 8873 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:0 --- Segments --- Logical extent 0 to 8872: Typelinear Physical volume /dev/sdb2 Physical extents0 to 8872 --- Logical volume --- LV Name/dev/VolGroup00/LogVol01 VG NameVolGroup00 LV UUID6UuO4G-X2dI-LirG-HvVF-zLfz-hrYW-NYZEdN LV Write Accessread/write LV Status available # open 1 LV Size1.94 GB Current LE 62 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:1 --- Segments --- Logical extent 0 to 61: Typelinear Physical volume /dev/sdb2 Physical extents8873 to 8934 [r...@mutt ~]# pvdisplay --maps --- Physical volume --- PV Name /dev/sdb2 VG Name VolGroup00 PV Size 279.27 GB / not usable 17.55 MB Allocatable yes PE Size (KByte) 32768 Total PE 8936 Free PE 1 Allocated PE 8935 PV UUID SW3Qdy-7qcu-0Th1-Rb2Z-ui24-14ab-qRpMoq --- Physical Segments --- Physical extent 0 to 8872: Logical volume /dev/VolGroup00/LogVol00 Logical extents 0 to 8872 Physical extent 8873 to 8934: Logical volume /dev/VolGroup00/LogVol01 Logical extents 0 to 61 Physical extent 8935 to 8935: FREE --- Physical volume --- PV Name /dev/sda2 VG Name VolGroup00 PV Size 465.57 GB / not usable 5.43 MB Allocatable yes PE Size (KByte) 32768 Total PE 14898 Free PE 1 Allocated PE 14897 PV UUID 1dl8EY-s2Qe-W50Y-wU8V-nCRJ-5Upz-SEkJgp --- Physical Segments --- Physical extent 0 to 14834: Logical volume /dev/VolGroup00/LogVol00 Logical extents 0 to 14834 Physical extent 14835 to 14896: Logical volume /dev/VolGroup00/LogVol01 Logical extents 0 to 61 Physical extent 14897 to 14897: FREE -- MELVILLE THEATRE ~ Melville Sask ~ http://www.melvilletheatre.com -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: copying lvm with the same name
On Thu, Mar 19, 2009 at 10:17 AM, Rick Stevens ri...@nerd.com wrote: Frank Cox wrote: On Wed, 18 Mar 2009 17:07:28 -0700 Rick Stevens wrote: We have a serious conflict here. The df command shows you as on sda, but LVM is reporting sdb. My gut reaction is to have you do a: vgreduce --test VolGroup00 /dev/sdb2 and see if it would be successful. If so, then remove the --test and cross your fingers. [r...@mutt temp]# vgreduce --test VolGroup00 /dev/sdb2 Test mode: Metadata will NOT be updated. Physical Volume /dev/sdb2 not found in Volume Group VolGroup00 This is consistent with the fact that the active Volume Group that I'm using is not on /dev/sdb2. It's just the lvdisplay -vm command that shows it as being in use. This is truly screwey. The pvscan shows sdb2 as part of VolGroup00, lvdisplay shows the partition as in use, but vgreduce says sdb2 isn't part of the VG. Hoo, boy. Frank, this is potentially dangerous, but you can try # pvremove /dev/sdb2 to wipe out sdb2's PV status. Since you seem to be running on /dev/sda and vgreduce claims that /dev/sdb2 isn't part of the active VG, you should be able to do this without blowing things up. Damn this makes me nervous! The pvremove man page does say whether the UUID can be used to remove a PV. Using the UUID would've come very handy in this kind of situation. ~af -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: copying lvm with the same name
Aldo Foot wrote: On Thu, Mar 19, 2009 at 10:17 AM, Rick Stevens ri...@nerd.com wrote: Frank Cox wrote: On Wed, 18 Mar 2009 17:07:28 -0700 Rick Stevens wrote: We have a serious conflict here. The df command shows you as on sda, but LVM is reporting sdb. My gut reaction is to have you do a: vgreduce --test VolGroup00 /dev/sdb2 and see if it would be successful. If so, then remove the --test and cross your fingers. [r...@mutt temp]# vgreduce --test VolGroup00 /dev/sdb2 Test mode: Metadata will NOT be updated. Physical Volume /dev/sdb2 not found in Volume Group VolGroup00 This is consistent with the fact that the active Volume Group that I'm using is not on /dev/sdb2. It's just the lvdisplay -vm command that shows it as being in use. This is truly screwey. The pvscan shows sdb2 as part of VolGroup00, lvdisplay shows the partition as in use, but vgreduce says sdb2 isn't part of the VG. Hoo, boy. Frank, this is potentially dangerous, but you can try # pvremove /dev/sdb2 to wipe out sdb2's PV status. Since you seem to be running on /dev/sda and vgreduce claims that /dev/sdb2 isn't part of the active VG, you should be able to do this without blowing things up. Damn this makes me nervous! The pvremove man page does say whether the UUID can be used to remove a PV. Using the UUID would've come very handy in this kind of situation. True, Aldo, but the interesting thing is that we're seeing very inconsistent data. The LV is running on /dev/sda2, but the status info show stuff as being on /dev/sdb2. For example, vgreduce says that /dev/sdb2 isn't part of the VG, while vgdisplay says it is. lvdisplay shows extents on /dev/sdb2 as being in use when, in fact, they aren't. My brain is starting to hurt. -- - Rick Stevens, Systems Engineer ri...@nerd.com - - AIM/Skype: therps2ICQ: 22643734Yahoo: origrps2 - -- -Do you know where _your_ towel is? - -- -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: copying lvm with the same name
On Thu, Mar 19, 2009 at 11:39 AM, Rick Stevens ri...@nerd.com wrote: Aldo Foot wrote: On Thu, Mar 19, 2009 at 10:17 AM, Rick Stevens ri...@nerd.com wrote: Frank Cox wrote: On Wed, 18 Mar 2009 17:07:28 -0700 Rick Stevens wrote: We have a serious conflict here. The df command shows you as on sda, but LVM is reporting sdb. My gut reaction is to have you do a: vgreduce --test VolGroup00 /dev/sdb2 and see if it would be successful. If so, then remove the --test and cross your fingers. [r...@mutt temp]# vgreduce --test VolGroup00 /dev/sdb2 Test mode: Metadata will NOT be updated. Physical Volume /dev/sdb2 not found in Volume Group VolGroup00 This is consistent with the fact that the active Volume Group that I'm using is not on /dev/sdb2. It's just the lvdisplay -vm command that shows it as being in use. This is truly screwey. The pvscan shows sdb2 as part of VolGroup00, lvdisplay shows the partition as in use, but vgreduce says sdb2 isn't part of the VG. Hoo, boy. Frank, this is potentially dangerous, but you can try # pvremove /dev/sdb2 to wipe out sdb2's PV status. Since you seem to be running on /dev/sda and vgreduce claims that /dev/sdb2 isn't part of the active VG, you should be able to do this without blowing things up. Damn this makes me nervous! The pvremove man page does say whether the UUID can be used to remove a PV. Using the UUID would've come very handy in this kind of situation. True, Aldo, but the interesting thing is that we're seeing very inconsistent data. The LV is running on /dev/sda2, but the status info show stuff as being on /dev/sdb2. For example, vgreduce says that /dev/sdb2 isn't part of the VG, while vgdisplay says it is. lvdisplay shows extents on /dev/sdb2 as being in use when, in fact, they aren't. And that's why I thought that the UUID would be of good use here. I noticed that the OP has two VGs with the same name and two LVs in each VG with the same names as well; and that's why pvremove could yield unpleasant results. Do you think that hard drive cable arrangement has anything to do with how the drives are seen in this case? Frank has not indicated whether he's using PATA or SATA drives. My brain is starting to hurt. No kidding. ~af -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: copying lvm with the same name
Aldo Foot venit, vidit, dixit 17.03.2009 18:45: On Mon, Mar 16, 2009 at 8:28 PM, Frank Cox thea...@sasktel.net wrote: One of my computers died and, of course, there is un-backed-up data on there that I want to recover if I can. The hard drive seems to be in good shape so I took it out of the dead box and installed it on this computer (my main desktop machine.) I have been doing a bunch of reading about logical volumes and some of what I've found is self-contradictory, incomplete and stuff that I just don't really understand (yet.) And, as you can imagine, since this is my main desktop machine I'm not terribly anxious to just start playing around with the lvm configuration without knowing what I'm doing. Here are my findings so far: [r...@mutt ~]# pvscan PV /dev/sdb2 VG VolGroup00 lvm2 [279.25 GB / 32.00 MB free] PV /dev/sda2 VG VolGroup00 lvm2 [465.56 GB / 32.00 MB free] Total: 2 [744.81 GB] / in use: 2 [744.81 GB] / in no VG: 0 [0 ] [r...@mutt ~]# lvscan ACTIVE'/dev/VolGroup00/LogVol00' [277.28 GB] inherit ACTIVE'/dev/VolGroup00/LogVol01' [1.94 GB] inherit It looks like the machine can see the second drive and the lvm that's on it /dev/sdb2, but it has the same VolGroup name as /dev/sda2. What I would like to do is twofold: First, and most importantly, I would like to mount it as-is so I can copy my data off of there. Second, I would like to re-format it and add it to the storage capacity that I already have on this machine. Heck, if it's still a good drive I might as well put it to use. So, how can I mount VolGroup00 that's on /dev/sdb2? The vgchange command followed by a simple mount command looks like what I want to do, but what's the syntax? As I said, I really don't want to bugger up my primary hard drive -- MELVILLE THEATRE ~ Melville Sask ~ http://www.melvilletheatre.com __ Get info on the Volume Group (change 00 to 01 for the other volume) vgdisplay -v VolGroup00 Look at the Physical Volumes list; the hard drive partitions are shown individually. That's how you identify with hard drive or partition belongs to what Volume Group. Somewhere in the Logical Volume info it will say: LV Status available To fix inconsistencies, check the filesystem e2fsck -fvy /dev/VolGroup00/LogVol00 To format (make sure to pick the correct one) mkfs.ext3 /dev/VolGroup00/LogVol00 mount as any other filesystem mount /dev/VolGroup00/LogVol00 /mnt/mountpoint Bottom line is you can use /dev/VolGroup00/LogVol00 as you would any hard drive device name such as /dev/hda1. HTH, ~af The problems is he has multiple groups with the same name. This happens as soon as you go with anaconda's defaults twice... Michael -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: copying lvm with the same name
On Wed, 2009-03-18 at 12:26 -0600, Frank Cox wrote: At this point, since the second hard drive seems to be in good condition, I think I would like to re-format it and either add it to the existing volume on sda2 to make one big logical drive, or just reformat it and make a second lvm on it again and add it my directory tree. Which approach would be better? And how do I extend a lvm to cover both drives if that's what I end up doing? Probably most flexible to add the 2nd drive to the existing VG. Use pvcreate to set up the partition(s) as PVs, then use vgextend to add them to the VG. You can then use lvcreate and/or lvextend to create new LVs or extend existing LVs as you see fit. -Chris -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: copying lvm with the same name
On Wed, 18 Mar 2009 12:17:13 -0700 Rick Stevens wrote: Now, back to your question. If you REALLY want to put /dev/sdb2 into a new volume group, first make sure none of its space is being used in existing LVs (check the output of lvdisplay -vm). If it's being used, you'll have to first shrink all the filesystems on the LV to clear the space, then shrink the LV itself using lvreduce and specifying the number of extents that are on /dev/sdb2. I don't understand what lvdisplay -vm is telling me. QUOTE: [r...@mutt ~]# lvdisplay -vm Finding all logical volumes --- Logical volume --- LV Name/dev/VolGroup00/LogVol00 VG NameVolGroup00 LV UUIDyFemKc-s2bo-zZC0-cc7q-50By-4jQM-G1MsQr LV Write Accessread/write LV Status available # open 1 LV Size277.28 GB Current LE 8873 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:0 --- Segments --- Logical extent 0 to 8872: Typelinear Physical volume /dev/sdb2 Physical extents0 to 8872 --- Logical volume --- LV Name/dev/VolGroup00/LogVol01 VG NameVolGroup00 LV UUID6UuO4G-X2dI-LirG-HvVF-zLfz-hrYW-NYZEdN LV Write Accessread/write LV Status available # open 1 LV Size1.94 GB Current LE 62 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:1 --- Segments --- Logical extent 0 to 61: Typelinear Physical volume /dev/sdb2 Physical extents8873 to 8934 END OF QUOTE Notice that it's telling me about sdb2 and says nothing about sda2, which is where my actual in use volume is located. [r...@mutt ~]# pvscan PV /dev/sdb2 VG VolGroup00 lvm2 [279.25 GB / 32.00 MB free] PV /dev/sda2 VG VolGroup00 lvm2 [465.56 GB / 32.00 MB free] Total: 2 [744.81 GB] / in use: 2 [744.81 GB] / in no VG: 0 [0 ] lvdisplay doesn't appear to see sda2. I don't know if this comes back to the fact that the volume names on both sda2 and sdb2 are the same, so it's only showing me the first (or last) one that it finds? I'm wondering if I would be best off to use fdisk to nuke the thing and carry on from there: [r...@mutt ~]# fdisk -l Disk /dev/sda: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x5d7711f1 Device Boot Start End Blocks Id System /dev/sda1 * 1 25 200781 83 Linux /dev/sda2 26 60801 488183220 8e Linux LVM Disk /dev/sdb: 300.0 GB, 300069052416 bytes 255 heads, 63 sectors/track, 36481 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x00041fa1 Device Boot Start End Blocks Id System /dev/sdb1 * 1 25 200781 83 Linux /dev/sdb2 26 36481 292832820 8e Linux LVM In your case it'll probably be free so you can simply remove it from VolGroup00: # vgreduce VolGroup00 /dev/sdb2 Then you can create a new VG and specify /dev/sdb2 as the first PV in the group: # vgcreate VolGroup01 /dev/sdb2 -- MELVILLE THEATRE ~ Melville Sask ~ http://www.melvilletheatre.com -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: copying lvm with the same name
Frank Cox wrote: On Wed, 18 Mar 2009 12:17:13 -0700 Rick Stevens wrote: Now, back to your question. If you REALLY want to put /dev/sdb2 into a new volume group, first make sure none of its space is being used in existing LVs (check the output of lvdisplay -vm). If it's being used, you'll have to first shrink all the filesystems on the LV to clear the space, then shrink the LV itself using lvreduce and specifying the number of extents that are on /dev/sdb2. I don't understand what lvdisplay -vm is telling me. QUOTE: [r...@mutt ~]# lvdisplay -vm Finding all logical volumes --- Logical volume --- LV Name/dev/VolGroup00/LogVol00 VG NameVolGroup00 LV UUIDyFemKc-s2bo-zZC0-cc7q-50By-4jQM-G1MsQr LV Write Accessread/write LV Status available # open 1 LV Size277.28 GB Current LE 8873 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:0 --- Segments --- Logical extent 0 to 8872: Typelinear Physical volume /dev/sdb2 Physical extents0 to 8872 --- Logical volume --- LV Name/dev/VolGroup00/LogVol01 VG NameVolGroup00 LV UUID6UuO4G-X2dI-LirG-HvVF-zLfz-hrYW-NYZEdN LV Write Accessread/write LV Status available # open 1 LV Size1.94 GB Current LE 62 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:1 --- Segments --- Logical extent 0 to 61: Typelinear Physical volume /dev/sdb2 Physical extents8873 to 8934 END OF QUOTE Notice that it's telling me about sdb2 and says nothing about sda2, which is where my actual in use volume is located. Yeah, that is curious. It sure looks like it picked up the correct LV sizes, but the mapping is displaying incorrectly. When I mentioned making sure none of /dev/sdb2 was being used, I was referring to the Segments sections. If an LV spreads across multiple PVs, this is where it'll be shown. The fact you caught this indicates to me that you actually understand it better than you think! :-) [r...@mutt ~]# pvscan PV /dev/sdb2 VG VolGroup00 lvm2 [279.25 GB / 32.00 MB free] PV /dev/sda2 VG VolGroup00 lvm2 [465.56 GB / 32.00 MB free] Total: 2 [744.81 GB] / in use: 2 [744.81 GB] / in no VG: 0 [0 ] lvdisplay doesn't appear to see sda2. I don't know if this comes back to the fact that the volume names on both sda2 and sdb2 are the same, so it's only showing me the first (or last) one that it finds? Uh, I don't think so. Read my comments below. I'm wondering if I would be best off to use fdisk to nuke the thing and carry on from there: [r...@mutt ~]# fdisk -l Disk /dev/sda: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x5d7711f1 Device Boot Start End Blocks Id System /dev/sda1 * 1 25 200781 83 Linux /dev/sda2 26 60801 488183220 8e Linux LVM Disk /dev/sdb: 300.0 GB, 300069052416 bytes 255 heads, 63 sectors/track, 36481 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x00041fa1 Device Boot Start End Blocks Id System /dev/sdb1 * 1 25 200781 83 Linux /dev/sdb2 26 36481 292832820 8e Linux LVM Ah, HAH! Ok, do you want to run off the 300GB drive or the 500GB drive when you're all done? What this is showing us now is that the LVM that's being run now is on the 300GB drive and that is indeed /dev/sdb, so the lvdisplay -vm DOES reflect reality at the moment. Ok, so, here's what I need to know to help you sort this out: 1. Which drive do you want to be active, the 300GB or 500GB? 2. What kind of interface the drives are (IDE, SATA, SCSI)? 3. What are the drive assignments (if IDE, which is master, which is slave, are either or both in cable select mode; if SCSI, which IDs do they occupy, etc.) Perhaps we should take this off-list--I don't know that we want to occupy the list's bandwidth with the back-and-forth of geting this sorted. When it's fixed, we could post a summary on what we did for those who are interested. -- - Rick Stevens, Systems Engineer ri...@nerd.com - - AIM/Skype: therps2ICQ: 22643734Yahoo: origrps2 - -- - The light at the end of the tunnel is really an oncoming train. - -- --
Re: copying lvm with the same name
Rick Stevens wrote: Big Snipolla Perhaps we should take this off-list--I don't know that we want to occupy the list's bandwidth with the back-and-forth of geting this sorted. When it's fixed, we could post a summary on what we did for those who are interested. I, for one, would like you to _leave it on the list_ as I am following and learning. With all the, um, philosophical discussions that spend bandwidth, it is actually refreshing to see the list being used for Community assistance, encouragement, and advice for using Fedora. Regarding the actual problem the OP seems to have, it seems to me (not being an LVM expert) from his output that he has a Volume Group (00) that spans sda2 and sdb2, two LVs that are defined in the VG, both of which sit on sdb2, but no LV defined on sda2. Is this unusual? There also seems to be some confusion between Volume Group and Volume (ie. LV), which is the root of some misunderstanding on the OP's part. Again, I may be all wet on this but that's what his output and comments indicate to me. Dean -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: copying lvm with the same name
On Wed, Mar 18, 2009 at 11:26 AM, Frank Cox thea...@sasktel.net wrote: snip At this point, since the second hard drive seems to be in good condition, I think I would like to re-format it and either add it to the existing volume on sda2 to make one big logical drive, or just reformat it and make a second lvm on it again and add it my directory tree. Which approach would be better? And how do I extend a lvm to cover both drives if that's what I end up doing? How to use the disk is a matter of personal choice. Using the second drive separately is simpler. You could create a Volume Group (VG) using up the entire drive and create one or more Logical Volumes (LV) in it. If you want to add disk space to the first drive, then make the entire second drive a Physical Volume (PV) and add it to the VG in the first drive. Adding a second drive to a an existing VG it's OK, but if the hard drive fail it can get complicated, make sure to have a backup of /etc/lvm. general to use that second drive would be: (a) use pvcreate to mark a disk or partition of disk as PV, use pvs to display results. (b) use vgcreate to create a VG, use vgs to display results (c) use lvcreate to create LVs in the VG, use lvs to display results (d) create a filesystem in the LV. (e) mount the LV. To add a partition (PV) to an existing volume use vgextend myVG /dev/sda10 to add /dev/sda10 to myVG. ~af -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: copying lvm with the same name
On Wed, Mar 18, 2009 at 2:24 PM, Dean S. Messing de...@sharplabs.com wrote: Rick Stevens wrote: Big Snipolla Perhaps we should take this off-list--I don't know that we want to occupy the list's bandwidth with the back-and-forth of geting this sorted. When it's fixed, we could post a summary on what we did for those who are interested. I, for one, would like you to _leave it on the list_ as I am following and learning. With all the, um, philosophical discussions that spend bandwidth, it is actually refreshing to see the list being used for Community assistance, encouragement, and advice for using Fedora. Rick offered to post a summary afterwards. This LVM stuff can get tricky and there could be a lot of posting back and forth. Regarding the actual problem the OP seems to have, it seems to me (not being an LVM expert) from his output that he has a Volume Group (00) that spans sda2 and sdb2, two LVs that are defined in the VG, both of which sit on sdb2, but no LV defined on sda2. Is this unusual? The OP has not added the second drive to the original VG. That's why he has to clearly identify which disk belongs where. There also seems to be some confusion between Volume Group and Volume (ie. LV), which is the root of some misunderstanding on the OP's part. Well, to clarify: a Volume Group (VG) is just available space made up of one or more partitions. Each partition is known as a Physical Volume (PV). You can create Logical Volumes (LV) in a VG. The LVs are not aware of disk partitions, they only know of Physical Extents (PE). Again, I may be all wet on this but that's what his output and comments indicate to me. Dean -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: copying lvm with the same name
On Wed, 18 Mar 2009 13:43:26 -0700 Rick Stevens wrote: Device Boot Start End Blocks Id System /dev/sdb1 * 1 25 200781 83 Linux /dev/sdb2 26 36481 292832820 8e Linux LVM Ah, HAH! Ok, do you want to run off the 300GB drive or the 500GB drive when you're all done? What this is showing us now is that the LVM that's being run now is on the 300GB drive and that is indeed /dev/sdb, so the lvdisplay -vm DOES reflect reality at the moment. Except that the lvm that's being run now is NOT on sdb. Observe: [frank...@mutt ~]$ df -h FilesystemSize Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00 450G 192G 235G 45% / /dev/sda1 190M 22M 159M 13% /boot tmpfs 2.0G 476K 2.0G 1% /dev/shm As you can see, there's a difference between what's being reported and what's actually being used. sda seems to be lost but it's the one that's in use. Since all of my stuff is currently on the 500gb drive, and it's what I'm using right now, I would like to either keep it as-is and set up a new volume that I can actually use on sdb or extend my currently in-use volume to use the space on sdb as well. -- MELVILLE THEATRE ~ Melville Sask ~ http://www.melvilletheatre.com -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: copying lvm with the same name
On Wed, 18 Mar 2009 14:24:12 -0700 (PDT) Dean S. Messing wrote: Regarding the actual problem the OP seems to have, it seems to me (not being an LVM expert) from his output that he has a Volume Group (00) that spans sda2 and sdb2, two LVs that are defined in the VG, both of which sit on sdb2, but no LV defined on sda2. Is this unusual? I actually have two Volume Group 00's, one on each of sda2 and sdb2. sda2 is live in that it's the one that I'm using right this minute. sdb2 is somehow both present and not present, depending on how you look at it, but it doesn't appear to be accessible in its current form. I'm considering using fdisk to remove the partitions on it and re-create something from new but I'm not entirely sure how wise that would be, or exactly what I should create on there. Another approach would be to just forget it and leave everything as-is until such time as I reformat and reinstall Fedora on this box (if that ever happens) at which time I think the installer would automatically do its thing and create a volume that occupies both hard drives. After all, everything is working and this extra drive is neither helping or hurting my activities. But it seems to me that a logical volume, by its nature, should be easily expandable without taking drastic measures. -- MELVILLE THEATRE ~ Melville Sask ~ http://www.melvilletheatre.com -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: copying lvm with the same name
Frank Cox wrote: On Wed, 18 Mar 2009 14:24:12 -0700 (PDT) Dean S. Messing wrote: Regarding the actual problem the OP seems to have, it seems to me (not being an LVM expert) from his output that he has a Volume Group (00) that spans sda2 and sdb2, two LVs that are defined in the VG, both of which sit on sdb2, but no LV defined on sda2. Is this unusual? I actually have two Volume Group 00's, one on each of sda2 and sdb2. From your earlier posted output that was not clear to me (but, again, I'm not an expert). On my F10 system, which LV organisation I hand configured after installing non-lvm on an outboard disk (because I wanted to do stuff I didn't know how to make anaconda do), I have: [r...@neuron ~]# pvscan PV /dev/sdb3 VG vg01 lvm2 [148.17 GB / 0free] PV /dev/sdc3 VG vg01 lvm2 [148.17 GB / 0free] PV /dev/sda2 VG vg00 lvm2 [73.77 GB / 64.00 GB free] Total: 3 [370.11 GB] / in use: 3 [370.11 GB] / in no VG: 0 [0 ] [r...@neuron ~]# vgscan Reading all physical volumes. This may take a while... Found volume group vg01 using metadata type lvm2 Found volume group vg00 using metadata type lvm2 [r...@neuron ~]# lvscan ACTIVE'/dev/vg01/lv00' [117.19 GB] inherit ACTIVE'/dev/vg01/lv01' [19.53 GB] inherit ACTIVE'/dev/vg01/lv02' [19.53 GB] inherit ACTIVE'/dev/vg01/lv03' [140.09 GB] inherit ACTIVE'/dev/vg00/lv00' [9.77 GB] inherit From my pvscan output, one might say that I have two vg01 volume groups. In fact, I have one vg01 VG spanning sdb3 and sdc3 (both of which of identical size on identical disks---I'm running interleaved Logical Extents---similar to RAID 0. The reason I said I thought you might have a misunderstanding is because of this statement from an earlier post of yours: : I don't know if this comes back to the fact that the volume names on both sda2 : and sdb2 are the same, so it's only showing me the first (or last) one that it : finds? I took same volume names as same logical volume names and assumed you were confusing LVs and VGs since I have not seen anything indicating that the actual LV names were the same. But you may have just typed volume group as volume. Haveing said all this, I understand you _do_ still have a problem: sda2 is live in that it's the one that I'm using right this minute. I may have missed it but is sda the drive that's been on the current machine all along? Has it been 465 GB all along? I ask this because I have a machine running F6 that somehow swaps the names sda and sdb. In fstab the sdb disk (according to df) is listed as sda. It's running a hardware (non-fake) RAID, though, so it is not the same situation as yours. sdb2 is somehow both present and not present, depending on how you look at it, Your comment also seems to apply to sda2 since it is present in the df output but not in the lvdisplay -vm output. but it doesn't appear to be accessible in its current form. I'm considering using fdisk to remove the partitions on it and re-create something from new but I'm not entirely sure how wise that would be, or exactly what I should create on there. Well, being a researcher, I'd not do this, but rather figure out exactly what's causing the funning remapping. But you may not be the curious type. :-) Another approach would be to just forget it and leave everything as-is until such time as I reformat and reinstall Fedora on this box (if that ever happens) at which time I think the installer would automatically do its thing and create a volume that occupies both hard drives. After all, everything is working and this extra drive is neither helping or hurting my activities. But it seems to me that a logical volume, by its nature, should be easily expandable without taking drastic measures. Maybe you said this already, but what does the machine report (`lvdisplay -vm' and `vgdisplay -v' in particular), if you remove the added drive (sdb?). Dean -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: copying lvm with the same name
Slip of the brain: Well, being a researcher, I'd not do this, but rather figure out exactly what's causing the funning remapping. But you may not be the ^^^ funny curious type. :-) -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: copying lvm with the same name
Frank Cox wrote: On Wed, 18 Mar 2009 14:24:12 -0700 (PDT) Dean S. Messing wrote: Regarding the actual problem the OP seems to have, it seems to me (not being an LVM expert) from his output that he has a Volume Group (00) that spans sda2 and sdb2, two LVs that are defined in the VG, both of which sit on sdb2, but no LV defined on sda2. Is this unusual? I actually have two Volume Group 00's, one on each of sda2 and sdb2. sda2 is live in that it's the one that I'm using right this minute. sdb2 is somehow both present and not present, depending on how you look at it, but it doesn't appear to be accessible in its current form. I'm considering using fdisk to remove the partitions on it and re-create something from new but I'm not entirely sure how wise that would be, or exactly what I should create on there. Another approach would be to just forget it and leave everything as-is until such time as I reformat and reinstall Fedora on this box (if that ever happens) at which time I think the installer would automatically do its thing and create a volume that occupies both hard drives. After all, everything is working and this extra drive is neither helping or hurting my activities. But it seems to me that a logical volume, by its nature, should be easily expandable without taking drastic measures. I'm being very hesitant here, Frank, as I don't want your system to go completely bonkers. We have a serious conflict here. The df command shows you as on sda, but LVM is reporting sdb. My gut reaction is to have you do a: vgreduce --test VolGroup00 /dev/sdb2 and see if it would be successful. If so, then remove the --test and cross your fingers. It may be possible do some testing in rescue mode. Boot off a DVD to rescue mode and do NOT let the system mount your volumes. From the command prompt, run lvm. From the lvm prompt, try lvm vgreduce VolGroup00 /dev/sdb2 lvm exit Exit from rescue mode and try to boot from the hard drive. If it comes up, then a pvscan should show that /dev/sdb2 does not belong to any VG and you should be fine. If it doesn't boot, bring it back up in rescue mode and: # lvm lvm vgextend VolGroup00 /dev/sdb2 lvm exit # exit And you're back where you were. -- -- - Rick Stevens, Systems Engineer ri...@nerd.com - - AIM/Skype: therps2ICQ: 22643734Yahoo: origrps2 - -- - LOOK OUT!!! BEHIND YOU!!! - -- -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: copying lvm with the same name
On Wed, 18 Mar 2009 17:07:28 -0700 Rick Stevens wrote: We have a serious conflict here. The df command shows you as on sda, but LVM is reporting sdb. My gut reaction is to have you do a: vgreduce --test VolGroup00 /dev/sdb2 and see if it would be successful. If so, then remove the --test and cross your fingers. [r...@mutt temp]# vgreduce --test VolGroup00 /dev/sdb2 Test mode: Metadata will NOT be updated. Physical Volume /dev/sdb2 not found in Volume Group VolGroup00 This is consistent with the fact that the active Volume Group that I'm using is not on /dev/sdb2. It's just the lvdisplay -vm command that shows it as being in use. -- MELVILLE THEATRE ~ Melville Sask ~ http://www.melvilletheatre.com -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: copying lvm with the same name
On Wed, Mar 18, 2009 at 5:14 PM, Frank Cox thea...@sasktel.net wrote: On Wed, 18 Mar 2009 17:07:28 -0700 Rick Stevens wrote: We have a serious conflict here. The df command shows you as on sda, but LVM is reporting sdb. My gut reaction is to have you do a: vgreduce --test VolGroup00 /dev/sdb2 and see if it would be successful. If so, then remove the --test and cross your fingers. [r...@mutt temp]# vgreduce --test VolGroup00 /dev/sdb2 Test mode: Metadata will NOT be updated. Physical Volume /dev/sdb2 not found in Volume Group VolGroup00 This is consistent with the fact that the active Volume Group that I'm using is not on /dev/sdb2. It's just the lvdisplay -vm command that shows it as being in use. -- MELVILLE THEATRE ~ Melville Sask ~ http://www.melvilletheatre.com -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines Perhaps this could be the solution: do man vgrename Rename the VG on the sdb2 to something else other than VolGroup00. vgrename VolGroup00 some_VG_name The idea is to take out the name duplicity out of the equation. Also in your third post I noticed that there is continuity in the Physical Extents as if both LVs (LogVol00 and LogVol01) are in the same VG. First LogVol00 goes from 0 to 8872, then LogVol01 goes from 8873 to 8934. This shows that both seem to be in the same disk space sort of speak. But both LogVol00 and LogVol01 are different as shown by the different UUID. Also the LogVol01 is quite small --about 1.9GB. ~af -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: copying lvm with the same name
On Wed, 18 Mar 2009 17:43:44 -0700 Aldo Foot wrote: Rename the VG on the sdb2 to something else other than VolGroup00. vgrename VolGroup00 some_VG_name Both of the VG's are named VolGroup00. There doesn't appear to be a way to tell it to rename the VG on sdb2 and I don't know what it would rename if I issued the command above. Perhaps the VG that I'm using on sda2? Perhaps both of the VG's? Or something even more interesting -- MELVILLE THEATRE ~ Melville Sask ~ http://www.melvilletheatre.com -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: copying lvm with the same name
Frank Cox wrote: On Wed, 18 Mar 2009 17:43:44 -0700 Aldo Foot wrote: Rename the VG on the sdb2 to something else other than VolGroup00. vgrename VolGroup00 some_VG_name Both of the VG's are named VolGroup00. There doesn't appear to be a way to tell it to rename the VG on sdb2 and I don't know what it would rename if I issued the command above. Perhaps the VG that I'm using on sda2? Perhaps both of the VG's? Or something even more interesting Do the two VG's have the same UUID? If not, you can use the UUID as part of the vgrename command. From the vgrename man page: vgrename Zvlifi-Ep3t-e0Ng-U42h-o0ye-KHu1-nl7Ns4 VolGroup00_tmp Mikkel -- Do not meddle in the affairs of dragons, for thou art crunchy and taste good with Ketchup! signature.asc Description: OpenPGP digital signature -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: copying lvm with the same name
On Mon, 2009-03-16 at 21:28 -0600, Frank Cox wrote: One of my computers died and, of course, there is un-backed-up data on there that I want to recover if I can. The hard drive seems to be in good shape so I took it out of the dead box and installed it on this computer (my main desktop machine.) I have been doing a bunch of reading about logical volumes and some of what I've found is self-contradictory, incomplete and stuff that I just don't really understand (yet.) And, as you can imagine, since this is my main desktop machine I'm not terribly anxious to just start playing around with the lvm configuration without knowing what I'm doing. Here are my findings so far: [r...@mutt ~]# pvscan PV /dev/sdb2 VG VolGroup00 lvm2 [279.25 GB / 32.00 MB free] PV /dev/sda2 VG VolGroup00 lvm2 [465.56 GB / 32.00 MB free] Total: 2 [744.81 GB] / in use: 2 [744.81 GB] / in no VG: 0 [0 ] [r...@mutt ~]# lvscan ACTIVE'/dev/VolGroup00/LogVol00' [277.28 GB] inherit ACTIVE'/dev/VolGroup00/LogVol01' [1.94 GB] inherit It looks like the machine can see the second drive and the lvm that's on it /dev/sdb2, but it has the same VolGroup name as /dev/sda2. What I would like to do is twofold: First, and most importantly, I would like to mount it as-is so I can copy my data off of there. Second, I would like to re-format it and add it to the storage capacity that I already have on this machine. Heck, if it's still a good drive I might as well put it to use. So, how can I mount VolGroup00 that's on /dev/sdb2? The vgchange command followed by a simple mount command looks like what I want to do, but what's the syntax? As I said, I really don't want to bugger up my primary hard drive I wouldn't mess with pv commands at all but rather simply create a mount point and mount the drives. You probably need to figure out what partitions are in the two LV Groups and I think you should be able to do that with the command 'blkid' Craig -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: copying lvm with the same name
Craig White wrote: I wouldn't mess with pv commands at all but rather simply create a mount point and mount the drives. You probably need to figure out what partitions are in the two LV Groups and I think you should be able to do that with the command 'blkid' Doesn't he have to rename the groups to have unique names before he can mount them? Kevin Kofler -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: copying lvm with the same name
On Mon, Mar 16, 2009 at 8:28 PM, Frank Cox thea...@sasktel.net wrote: One of my computers died and, of course, there is un-backed-up data on there that I want to recover if I can. The hard drive seems to be in good shape so I took it out of the dead box and installed it on this computer (my main desktop machine.) I have been doing a bunch of reading about logical volumes and some of what I've found is self-contradictory, incomplete and stuff that I just don't really understand (yet.) And, as you can imagine, since this is my main desktop machine I'm not terribly anxious to just start playing around with the lvm configuration without knowing what I'm doing. Here are my findings so far: [r...@mutt ~]# pvscan PV /dev/sdb2 VG VolGroup00 lvm2 [279.25 GB / 32.00 MB free] PV /dev/sda2 VG VolGroup00 lvm2 [465.56 GB / 32.00 MB free] Total: 2 [744.81 GB] / in use: 2 [744.81 GB] / in no VG: 0 [0 ] [r...@mutt ~]# lvscan ACTIVE '/dev/VolGroup00/LogVol00' [277.28 GB] inherit ACTIVE '/dev/VolGroup00/LogVol01' [1.94 GB] inherit It looks like the machine can see the second drive and the lvm that's on it /dev/sdb2, but it has the same VolGroup name as /dev/sda2. What I would like to do is twofold: First, and most importantly, I would like to mount it as-is so I can copy my data off of there. Second, I would like to re-format it and add it to the storage capacity that I already have on this machine. Heck, if it's still a good drive I might as well put it to use. So, how can I mount VolGroup00 that's on /dev/sdb2? The vgchange command followed by a simple mount command looks like what I want to do, but what's the syntax? As I said, I really don't want to bugger up my primary hard drive -- MELVILLE THEATRE ~ Melville Sask ~ http://www.melvilletheatre.com __ Get info on the Volume Group (change 00 to 01 for the other volume) vgdisplay -v VolGroup00 Look at the Physical Volumes list; the hard drive partitions are shown individually. That's how you identify with hard drive or partition belongs to what Volume Group. Somewhere in the Logical Volume info it will say: LV Status available To fix inconsistencies, check the filesystem e2fsck -fvy /dev/VolGroup00/LogVol00 To format (make sure to pick the correct one) mkfs.ext3 /dev/VolGroup00/LogVol00 mount as any other filesystem mount /dev/VolGroup00/LogVol00 /mnt/mountpoint Bottom line is you can use /dev/VolGroup00/LogVol00 as you would any hard drive device name such as /dev/hda1. HTH, ~af -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines