Oracle Linux lvm and device id

Mikmikmikmik

New Member
Joined
Nov 23, 2018
Messages
9
Reaction score
1
Credits
72
Hi,
In hyper v today, I created a 4TB vdisk as 2nd disk / powered up OL7.9VM, saw it as /dev/sdb in lsblk / powered down vm / deleted the 4TB vdisk and saved settings.
I then recreated it in hyperv settings as the 2nd disk again.
Powered up VM
Now this 4TB disk is /dev/sda and the OS disk is /dev/sdb.

How can I make sure that if I create 4x1TB partitions on the 4TB gpt disk, that when I do pvcreate on each partition and add the PVs into one or more volume groups, that upon next reboot and the device ID for the 4TB changes again, that I will not lose the VGs or the LVs where the PVs were used in?
I hope the above is understandable.

Thanks.
 


I own it. I am experimenting and this happened yesterday before I got as far as pvcreate and I was just wondering if everything would be ok with LVM and fstab etc if the /dev/sd? changed.
I have read the LVM puts its own UUIDs on the disk/partitions and searches for these after a reboot to recreate the volume information for the OS, and again shows up properly for lsblk / fstab, but I don't know if that is true information.

A bit more searching has found what I believe I am looking for.
"At startup, the vgscan command is run to scan the block devices on the system looking for LVM labels, to determine which of them are physical volumes and to read the metadata and build up a list of volume groups. "

No need to answer.
Thank you.
 
Last edited:
I own it. I am experimenting and this happened yesterday before I got as far as pvcreate and I was just wondering if everything would be ok with LVM and fstab etc if the /dev/sd? changed.
I have read the LVM puts its own UUIDs on the disk/partitions and searches for these after a reboot to recreate the volume information for the OS, and again shows up properly for lsblk / fstab, but I don't know if that is true information.

A bit more searching has found what I believe I am looking for.
"At startup, the vgscan command is run to scan the block devices on the system looking for LVM labels, to determine which of them are physical volumes and to read the metadata and build up a list of volume groups. "

No need to answer.
Thank you.
You're welcome:-
 

Members online


Latest posts

Top