Skip to contentSkip to conversation

readonly snapshots of LVM on same machine

DISCUSSION George Shuklin 2 participants 3 messages Mar 2, 2012 – Mar 23, 2012 Device mapper

lore
Share & tools
lore
#0 lore raw

Good day.

If I attach a readonly snapshot of same disk as system disk, I'm getting message of duplicate ID (obvious, huh). But snapshot is in readonly, so there is no way to rename it or change ID. Changing ID of system LVM is not really good idea.

Is any way to get filesystem from snapshoted LVM? Snapshots created by external storage system.

Thanks.

#1 lore raw
Quoted 4 lines · George Shuklin

If I attach a readonly snapshot of same disk as system disk, I'm getting message of duplicate ID (obvious, huh). But snapshot is in readonly, so there is no way to rename it or change ID. Changing ID of system LVM is not really good idea.

All you can do then is set up filters so each cmd only sees the disks you want it to see.

Temporarily, --config lets you do this on each cmdline.

For a permanent setup, another option is to use a separate lvm.conf by setting LVM_SYSTEM_DIR in the environment.

Alasdair

#2 lore raw
Quoted 5 lines · Alasdair G Kergon
Quoted 4 lines · George Shuklin

If I attach a readonly snapshot of same disk as system disk, I'm getting message of duplicate ID (obvious, huh). But snapshot is in readonly, so there is no way to rename it or change ID. Changing ID of system LVM is not really good idea.

Quoted 8 lines

All you can do then is set up filters so each cmd only sees the disks you want it to see.

Temporarily, --config lets you do this on each cmdline.

For a permanent setup, another option is to use a separate lvm.conf by setting LVM_SYSTEM_DIR in the environment.

Good day.

I've check this, but found it ignores new VG with same name.

I've filter system disk out, attach snapshot, allow only snapshot device to be scanned. Pvscan found pv, vgscan, vgchange -a y all them works without complains, but no any new /dev/dm* devices appears (and no any messages in udevadm monitor).

So problem is the same: how to LVM volumes on readonly snapshot on same machine as original disk.