Re: Disk identifiers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[...]

> I was referring to what fdisk -l calls "disk
> identifier". [...]

That's not a very fruitful approach :-). The real disk
identifiers are the serial number or WWN.

What 'fdisk' reports is the identifier of the "label" (called by
'fdisk' "Disklabel", which is a metadata block which usually
contains the partition table, and of which there are several
types).

For MBR/DOS type labels that is a pretty obscure field at offset
0x1B8 on the disk, and it is a 32b field. I personally use it
to store 4 characters, but it can be any 32-bit value.

That value matters a lot more to MS-Windows than to GNU/Linux,
which basically ignores it. I find that value used under
'/dev/disk/by-partuuid/' where it is used to prefix the number
of the partition for DOS/MBR labeled disks. BTW the entries
under '/dev/disk/' seem to me a "legacy" mess.

GPT/EFI labels instead have 128b fields which are usually filled
with UUID-structured random values, and those are not ignored
and usually appear under '/dev/disk/by-uuid'.

For MD raid sets I like to use GPT labels and refer to RAID set
members by partition name, where I give those partitions
meaningful proper-name prefixes. But that's another story.



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux