* [linux-lvm] vgexport usage
@ 2011-03-17 17:32 Males, Jess
2011-03-21 14:33 ` Anderson Kaiser
0 siblings, 1 reply; 3+ messages in thread
From: Males, Jess @ 2011-03-17 17:32 UTC (permalink / raw)
To: linux-lvm@redhat.com
From 'man 8 vgexport':
vgexport allows you to make the inactive VolumeGroupName(s) unknown to the system.
By 'unknown to the system' I would expect it would not appear in vg listings such as vgs (shown below) or vgdisplay.
[root@icarus lvm]# vgcreate junk /dev/loop1 /dev/loop2 /dev/loop3
Volume group "junk" successfully created
[root@icarus lvm]# vgs
VG #PV #LV #SN Attr VSize VFree
junk 3 0 0 wz--n- 48.00M 48.00M
[root@icarus lvm]# vgchange junk -a n
0 logical volume(s) in volume group "junk" now active
[root@icarus lvm]# vgs
VG #PV #LV #SN Attr VSize VFree
junk 3 0 0 wz--n- 48.00M 48.00M
[root@icarus lvm]# vgexport junk
Volume group "junk" successfully exported
[root@icarus lvm]# vgs
VG #PV #LV #SN Attr VSize VFree
junk 3 0 0 wzx-n- 48.00M 48.00M
However, more disturbing is that if I remove one of the disks, lvm complains about a missing item.
[root@icarus lvm]# losetup -d /dev/loop2
[root@icarus lvm]# vgs
Couldn't find device with uuid 1gNBDl-dOqI-OQid-TIcq-8Lp2-qUa2-PwdvnB.
VG #PV #LV #SN Attr VSize VFree
junk 3 0 0 wzxpn- 48.00M 48.00M
Am I expecting the wrong things from this command?
Thanks,
-- Jess Males
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-lvm] vgexport usage
2011-03-17 17:32 [linux-lvm] vgexport usage Males, Jess
@ 2011-03-21 14:33 ` Anderson Kaiser
2011-03-31 0:41 ` Males, Jess
0 siblings, 1 reply; 3+ messages in thread
From: Anderson Kaiser @ 2011-03-21 14:33 UTC (permalink / raw)
To: linux-lvm
On 03/17/2011 02:32 PM, Males, Jess wrote:
> > From 'man 8 vgexport':
> vgexport allows you to make the inactive VolumeGroupName(s) unknown to the system.
>
> By 'unknown to the system' I would expect it would not appear in vg listings such as vgs (shown below) or vgdisplay.
>
> [root@icarus lvm]# vgcreate junk /dev/loop1 /dev/loop2 /dev/loop3
> Volume group "junk" successfully created
> [root@icarus lvm]# vgs
> VG #PV #LV #SN Attr VSize VFree
> junk 3 0 0 wz--n- 48.00M 48.00M
> [root@icarus lvm]# vgchange junk -a n
> 0 logical volume(s) in volume group "junk" now active
> [root@icarus lvm]# vgs
> VG #PV #LV #SN Attr VSize VFree
> junk 3 0 0 wz--n- 48.00M 48.00M
> [root@icarus lvm]# vgexport junk
> Volume group "junk" successfully exported
> [root@icarus lvm]# vgs
> VG #PV #LV #SN Attr VSize VFree
> junk 3 0 0 wzx-n- 48.00M 48.00M
>
>
> However, more disturbing is that if I remove one of the disks, lvm complains about a missing item.
>
> [root@icarus lvm]# losetup -d /dev/loop2
> [root@icarus lvm]# vgs
> Couldn't find device with uuid 1gNBDl-dOqI-OQid-TIcq-8Lp2-qUa2-PwdvnB.
> VG #PV #LV #SN Attr VSize VFree
> junk 3 0 0 wzxpn- 48.00M 48.00M
>
>
> Am I expecting the wrong things from this command?
>
>
> Thanks,
>
> -- Jess Males
>
>
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
Maybe "unknown" is the wrong word in this case. You will be able to
see this VG using vgs, vgdisplay and so on. But you can't remove when
you try a vgremove.
You have to import it back (vgimport VolumeGroup) to change it again.
I think that unknown means more like "unchangeable".
[]'s
--
Anderson Kaiser (RHCE, RHCVA)
Red Hat Brasil - Global Support Services
akaiser@redhat.com
+55 11 3529-6000
Direct: +55 11 3529-6093
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-lvm] vgexport usage
2011-03-21 14:33 ` Anderson Kaiser
@ 2011-03-31 0:41 ` Males, Jess
0 siblings, 0 replies; 3+ messages in thread
From: Males, Jess @ 2011-03-31 0:41 UTC (permalink / raw)
To: akaiser@redhat.com, LVM general discussion and development; +Cc: Griswold, Doug
Maybe "unknown" is the wrong word in this case. You will be able to
see this VG using vgs, vgdisplay and so on. But you can't remove when
you try a vgremove.
You have to import it back (vgimport VolumeGroup) to change it again.
I think that unknown means more like "unchangeable".
[]'s
--
Anderson Kaiser (RHCE, RHCVA)
Red Hat Brasil - Global Support Services
akaiser@redhat.com
+55 11 3529-6000
Direct: +55 11 3529-6093
_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
-----
Thanks for the response, Anderson.
the use case I'm imagining is the export of a set of disks from one machine (VG intact) and the subsequent import into another machine. The command works perfectly in such a scenario. I can vgexport, yank the disks from one machine, insert into another, scan the scsi bus, vgscan, vgimport, vgchange, mount the lv, and use all my data. However, after doing all this and going back to the original system that created the VG, not only do I see the VG in vgdisplay or vgs, but I get errors from the missing disk.
And in typing all this up, it occurrs to me to try a vgscan on the original system. <pause> voila!
I still got disk complaints, but I unlinked /dev/sdb1 and /dev/sdb and now we're clean; no complaints anywhere about previously used disks or VGs.
Thanks,
-- Jess Males
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-03-31 0:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-17 17:32 [linux-lvm] vgexport usage Males, Jess
2011-03-21 14:33 ` Anderson Kaiser
2011-03-31 0:41 ` Males, Jess
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).