On Fri, 11 Feb 2022, Galen Seitz wrote:

Wait! I think you are missing an important point. UUIDs are used for many
things on a modern Linux system. There will typically be *multiple* UUIDs
used for multiple purposes. Here is some trimmed output from an Ubuntu
system that has three physical disks. sda is the disk that contains the
root filesystem, along with some others. sdb and sdc are part of a raid1
array that contains a filesystem that is mounted under /backups

Galen,

Yes, I know there are different UUIDs and I have no idea now which to use
where/when.

Thanks for the longer explanation. I'll study it.

Whenever I have set up a raid1 array, it has been at distribution install
time, so the Ubuntu or CentOS tools have done it for me.  That said, I
think you should be able create the raid array using the partition names
(e.g. /dev/sdxN, /dev/sdyM, etc.), and then find the array UUID using
mdadm --examine.  Once you have the array UUID, you can drop it into
mdadm.conf.  This should make your raid array independent of any sdxN
naming.  Then you can create a filesystem on mdx.  This will create
a filesystem UUID, which you then put into fstab in order to mount
the filesystem.

Okay. This answered a couple of my questions.

Note that if you were using LVM, there would also be UUIDs associated
with that as well.

Well, yes, I'm using LVM2 here.

Now mdadm is working on the two disks, /dev/sde and /dev/sdf, as they have
no partitions. The output of blkid is:
/dev/sda1: UUID="5796-13DB" TYPE="vfat" 
PARTUUID="b365f0f1-77a8-459b-926a-d0fd9c05b985"
/dev/sda2: UUID="b7a5a639-e9b5-43c9-b528-77d6bb592899" TYPE="swap" 
PARTUUID="625ed36c-e115-4c18-ac17-287d0c857aa6"
/dev/sda3: UUID="c2286937-c658-40ee-b73d-0c80fcaa2a6b" TYPE="ext4" 
PARTUUID="2f06e476-a8fc-471d-b396-422959d37bcd"
/dev/sdb1: UUID="1debabd0-e753-468d-b119-0e76a1e4e5df" TYPE="ext4" 
PARTUUID="d7922ff2-5cd8-43fa-824f-4459fc42ae53"
/dev/sdb2: UUID="98cb2b46-092e-4dc4-94cc-f4e54b946bae" TYPE="ext4" 
PARTUUID="1aee0055-0517-4cd4-8937-2bafea640f26"
/dev/sdb3: UUID="093ae060-fd8d-48d2-9f77-acc5dab0fc56" TYPE="ext4" 
PARTUUID="4d318c80-a3b5-4515-8cbe-40eb60e5da76"
/dev/sdd: UUID="08b2a158-a57b-4833-b6d8-9b69dfcf673b" TYPE="ext4"
/dev/sde: UUID="4b4d01a7-f5d3-af65-c47f-6a39752be335" 
UUID_SUB="7372c801-036f-17d9-2c73-0fe708eeba88" LABEL="salmo:0" TYPE="linux_raid_member"
/dev/sdf: UUID="4b4d01a7-f5d3-af65-c47f-6a39752be335" 
UUID_SUB="0d6921f9-b6fc-ad2d-d2cd-2f30a3766f19" LABEL="salmo:0" TYPE="linux_raid_member"
/dev/md0: UUID="0b4ee898-1506-4264-be91-f698cbdcda52" TYPE="ext4"
/dev/sdc: UUID="8f53ff0f-08cd-4bc1-888d-f6a38de11973" TYPE="ext4"

and I want to use /dev/sdc and /dev/sdd for the LV.

Thanks,

Rich

Reply via email to