* [linux-lvm] Allocation maps of a mirrored LV?
@ 2009-01-13 10:09 Lupe Christoph
2009-01-14 20:58 ` David Robinson
0 siblings, 1 reply; 5+ messages in thread
From: Lupe Christoph @ 2009-01-13 10:09 UTC (permalink / raw)
To: linux-lvm
Hi!
I'm about to integrate support for LVM mirrors into the configuration
management system I'm maintaining for a client. This system has a "scan"
function that retrieves the current configuration and compares it
against a database.
My problem is that I'm unable to get the allocation info for the parts
of a mirrored volume under SLES 10 (lvm2 RPM is at 2.02.17, even
OpenSuSE 10.3 has only lvm2 2.02.25).
lvdisplay --maps only gives me:
--- Segments ---
Logical extent 0 to 24:
Type mirror
Mirrors 2
Mirror size 25
Mirror log volume testlv0_mlog
Mirror region size 512.00 KB
Mirror original:
Logical volume testlv0_mimage_0
Logical extents 0 to 24
Mirror destinations:
Logical volume testlv0_mimage_1
Logical extents 0 to 24
This is lacking the names of the PVs. (Has this been implemented in the
meantime? It would be useful - nudge, nudge...)
BTW, a simple volume *has* this information:
--- Segments ---
Logical extent 0 to 31:
Type linear
Physical volume /dev/sda3
Physical extents 1261 to 1292
I'm unable to convince lvdisplay to give me any information on, e.g.,
testlv0_mimage_0. And pvdisplay --maps does not display allocation maps
up to 2.02.27, AFAIK.
So does anybody have a way to find out on which PV the mirror parts are?
Short of installing our own lvm2 RPM, of course. Or parsing the raw LVM
config info on the disks...
Thanks for any hint,
Lupe Christoph
--
| There is no substitute for bad design except worse design. |
| /me |
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] Allocation maps of a mirrored LV?
2009-01-13 10:09 [linux-lvm] Allocation maps of a mirrored LV? Lupe Christoph
@ 2009-01-14 20:58 ` David Robinson
2009-01-15 8:36 ` Lupe Christoph
0 siblings, 1 reply; 5+ messages in thread
From: David Robinson @ 2009-01-14 20:58 UTC (permalink / raw)
To: LVM general discussion and development
On Tue, Jan 13, 2009 at 10:09 AM, Lupe Christoph <lupe@lupe-christoph.de> wrote:
> Hi!
>
> I'm about to integrate support for LVM mirrors into the configuration
> management system I'm maintaining for a client. This system has a "scan"
> function that retrieves the current configuration and compares it
> against a database.
>
> My problem is that I'm unable to get the allocation info for the parts
> of a mirrored volume under SLES 10 (lvm2 RPM is at 2.02.17, even
> OpenSuSE 10.3 has only lvm2 2.02.25).
>
> lvdisplay --maps only gives me:
Try pvs/vgs/lvs instead (and use -o to get the details you want):
# pvs --segments
PV VG Fmt Attr PSize PFree Start SSize
/dev/dm-0 laptop lvm2 a- 55.69G 32.00M 0 250
/dev/dm-0 laptop lvm2 a- 55.69G 32.00M 250 1499
/dev/dm-0 laptop lvm2 a- 55.69G 32.00M 1749 32
/dev/dm-0 laptop lvm2 a- 55.69G 32.00M 1781 1
--Dave
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] Allocation maps of a mirrored LV?
2009-01-14 20:58 ` David Robinson
@ 2009-01-15 8:36 ` Lupe Christoph
2009-01-15 9:30 ` Jaroslav Stava
0 siblings, 1 reply; 5+ messages in thread
From: Lupe Christoph @ 2009-01-15 8:36 UTC (permalink / raw)
To: linux-lvm
On Wednesday, 2009-01-14 at 20:58:28 +0000, David Robinson wrote:
> On Tue, Jan 13, 2009 at 10:09 AM, Lupe Christoph <lupe@lupe-christoph.de> wrote:
> > I'm about to integrate support for LVM mirrors into the configuration
> > management system I'm maintaining for a client. This system has a "scan"
> > function that retrieves the current configuration and compares it
> > against a database.
> > My problem is that I'm unable to get the allocation info for the parts
> > of a mirrored volume under SLES 10 (lvm2 RPM is at 2.02.17, even
> > OpenSuSE 10.3 has only lvm2 2.02.25).
> > lvdisplay --maps only gives me:
> Try pvs/vgs/lvs instead (and use -o to get the details you want):
> # pvs --segments
> PV VG Fmt Attr PSize PFree Start SSize
> /dev/dm-0 laptop lvm2 a- 55.69G 32.00M 0 250
> /dev/dm-0 laptop lvm2 a- 55.69G 32.00M 250 1499
> /dev/dm-0 laptop lvm2 a- 55.69G 32.00M 1749 32
> /dev/dm-0 laptop lvm2 a- 55.69G 32.00M 1781 1
OK, let me show you. I created an LV with:
lvcreate --name testlv0 --size 100m --mirror 1 testvg
lvs -o +devices
LV VG Attr LSize Origin Snap% Move Log Copy% Devices
testlv0 testvg mwi-a- 100.00M testlv0_mlog 100.00 testlv0_mimage_0(0),testlv0_mimage_1(0)
Any other suggestion for a -o option? I tried stripes, segtype, seg_start,
seg_size, seg_tags, regionsize, mirror_log and lvs --segments.
I can't find an option for pvs that prints the allocation map, nor for
vgs. Any suggestions?
Lupe Christoph
--
| There is no substitute for bad design except worse design. |
| /me |
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] Allocation maps of a mirrored LV?
2009-01-15 8:36 ` Lupe Christoph
@ 2009-01-15 9:30 ` Jaroslav Stava
2009-01-15 10:03 ` Lupe Christoph
0 siblings, 1 reply; 5+ messages in thread
From: Jaroslav Stava @ 2009-01-15 9:30 UTC (permalink / raw)
To: LVM general discussion and development
Lupe Christoph wrote:
> I can't find an option for pvs that prints the allocation map, nor for
> vgs. Any suggestions?
>
Try
lvs VG -a --segments -o +devices
that should print all the information you need.
Regards,
Jaroslav Stava
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [linux-lvm] Allocation maps of a mirrored LV?
2009-01-15 9:30 ` Jaroslav Stava
@ 2009-01-15 10:03 ` Lupe Christoph
0 siblings, 0 replies; 5+ messages in thread
From: Lupe Christoph @ 2009-01-15 10:03 UTC (permalink / raw)
To: linux-lvm
On Thursday, 2009-01-15 at 10:30:27 +0100, Jaroslav Stava wrote:
> Lupe Christoph wrote:
>> I can't find an option for pvs that prints the allocation map, nor for
>> vgs. Any suggestions?
> Try
> lvs VG -a --segments -o +devices
> that should print all the information you need.
<hug>Jaroslav, you're right!</hug>
Actually, I don't need segment information, so I can omit --segment. The
command that gives me what I can use is
lvs testvg --separator : --noheadings --all -o +devices
The "-a" or "--all" option is the key. Thanks a lot for this! Now that I
know what to look for, I find it in lvs --help. But not in the manpages.
Guess where I looked :-(
Lupe Christoph
--
| There is no substitute for bad design except worse design. |
| /me |
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-01-15 10:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-13 10:09 [linux-lvm] Allocation maps of a mirrored LV? Lupe Christoph
2009-01-14 20:58 ` David Robinson
2009-01-15 8:36 ` Lupe Christoph
2009-01-15 9:30 ` Jaroslav Stava
2009-01-15 10:03 ` Lupe Christoph
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox