* [linux-lvm] Mirrored LVM volumes and UUID
@ 2013-09-20 11:30 Alessandro MACUZ
2013-09-23 7:39 ` Peter Rajnoha
0 siblings, 1 reply; 3+ messages in thread
From: Alessandro MACUZ @ 2013-09-20 11:30 UTC (permalink / raw)
To: LVM general discussion and development
[-- Attachment #1: Type: text/plain, Size: 723 bytes --]
Hi all,
I can't seem to find such answer on the net.
I use mirrored volumes and blkid returns the same UUID for the "raid"
volume and the underlying volumes
/dev/mapper/lvm01-root_mimage_0:
UUID="0b88ad6f-34ed-46d6-abe3-eca0d235b353" TYPE="ext4"
/dev/mapper/lvm01-root_mimage_1:
UUID="0b88ad6f-34ed-46d6-abe3-eca0d235b353" TYPE="ext4"
/dev/mapper/lvm01-root: UUID="0b88ad6f-34ed-46d6-abe3-eca0d235b353"
TYPE="ext4"
Then such ID is used in fstab to mount root based... on UUID.
I wonder how fstab knows that it must use /dev/mapper/lvm01-root and not
the others since the three of them share the same UUID, and if by accident
the others can be erroneusly used/mounted.
Has anyone thought of it? Or it's just me?
Alex
[-- Attachment #2: Type: text/html, Size: 1018 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-lvm] Mirrored LVM volumes and UUID
2013-09-20 11:30 [linux-lvm] Mirrored LVM volumes and UUID Alessandro MACUZ
@ 2013-09-23 7:39 ` Peter Rajnoha
2013-09-25 0:24 ` Alessandro MACUZ
0 siblings, 1 reply; 3+ messages in thread
From: Peter Rajnoha @ 2013-09-23 7:39 UTC (permalink / raw)
To: LVM general discussion and development; +Cc: Alessandro MACUZ
On 09/20/2013 01:30 PM, Alessandro MACUZ wrote:
> I use mirrored volumes and blkid returns the same UUID for the "raid"
> volume and the underlying volumes
>
> /dev/mapper/lvm01-root_mimage_0:
> UUID="0b88ad6f-34ed-46d6-abe3-eca0d235b353" TYPE="ext4"
> /dev/mapper/lvm01-root_mimage_1:
> UUID="0b88ad6f-34ed-46d6-abe3-eca0d235b353" TYPE="ext4"
> /dev/mapper/lvm01-root: UUID="0b88ad6f-34ed-46d6-abe3-eca0d235b353"
> TYPE="ext4"
>
> Then such ID is used in fstab to mount root based... on UUID.
>
> I wonder how fstab knows that it must use /dev/mapper/lvm01-root and not
> the others since the three of them share the same UUID, and if by
> accident the others can be erroneusly used/mounted.
When the mirror volume is activated, only top-level volumes are scanned
by blkid in udev rules (it's coordinated by 11-dm-lvm.rules and 13-dm-disk.rules
which are in /lib/udev/rules.d). In this case, it's the lvm01-root only that
is scanned by blkid within udev processing, not the *_mimage devices. Then we
end up with a symlink created only for the top-level volume in /dev/disk/by-uuid
directory. And this is what is being looked for at boot...
The similar situation happens with snapshot volumes which would end up with
same FS UUID for the origin and all its snapshots. In this case, we always give
priority to the origin volume.
Peter
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [linux-lvm] Mirrored LVM volumes and UUID
2013-09-23 7:39 ` Peter Rajnoha
@ 2013-09-25 0:24 ` Alessandro MACUZ
0 siblings, 0 replies; 3+ messages in thread
From: Alessandro MACUZ @ 2013-09-25 0:24 UTC (permalink / raw)
To: Peter Rajnoha; +Cc: LVM general discussion and development
[-- Attachment #1: Type: text/plain, Size: 748 bytes --]
When the mirror volume is activated, only top-level volumes are scanned
> by blkid in udev rules (it's coordinated by 11-dm-lvm.rules and
> 13-dm-disk.rules
> which are in /lib/udev/rules.d). In this case, it's the lvm01-root only
> that
> is scanned by blkid within udev processing, not the *_mimage devices. Then
> we
> end up with a symlink created only for the top-level volume in
> /dev/disk/by-uuid
> directory. And this is what is being looked for at boot...
>
> The similar situation happens with snapshot volumes which would end up with
> same FS UUID for the origin and all its snapshots. In this case, we always
> give
> priority to the origin volume.
>
> Peter
>
Many thanks Peter for your explanation,
I'll have a look at it.
Alex
[-- Attachment #2: Type: text/html, Size: 1107 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-09-25 0:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-20 11:30 [linux-lvm] Mirrored LVM volumes and UUID Alessandro MACUZ
2013-09-23 7:39 ` Peter Rajnoha
2013-09-25 0:24 ` Alessandro MACUZ
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).