glabel and real disk IDs

Marius Nünnerich marius at nuenneri.ch
Thu Jul 9 13:33:59 UTC 2009


On Thu, Jul 9, 2009 at 13:52, Ivan Voras<ivoras at freebsd.org> wrote:
> Hi,
>
> I've been working with glabels for a time and just remembered that ATA (ad)
> drives do in fact export the drive ID, for example:
>
> # diskinfo -v ad4
> ad4
>        512             # sectorsize
>        320072933376    # mediasize in bytes (298G)
>        625142448       # mediasize in sectors
>        620181          # Cylinders according to firmware.
>        16              # Heads according to firmware.
>        63              # Sectors according to firmware.
>        ad:9QF4H15Y     # Disk ident.
>
> # diskinfo -v ad6
> ad6
>        512             # sectorsize
>        320072933376    # mediasize in bytes (298G)
>        625142448       # mediasize in sectors
>        620181          # Cylinders according to firmware.
>        16              # Heads according to firmware.
>        63              # Sectors according to firmware.
>        ad:9QF4EP7A     # Disk ident.
>
> # diskinfo -v ad8
> ad8
>        512             # sectorsize
>        320072933376    # mediasize in bytes (298G)
>        625142448       # mediasize in sectors
>        620181          # Cylinders according to firmware.
>        16              # Heads according to firmware.
>        63              # Sectors according to firmware.
>        ad:9QF4H16L     # Disk ident.
>
> I don't think it would be hard to add a label parser to gather this
> information and export it as a label.
>
> The purpose of this would be to have a unique disk ID without explicitly
> setting a label (e.g. as is commonly advised for ZFS and drive swapping).
>
> Any objections?

I like the idea. If one should use it in which situation is something different.


More information about the freebsd-geom mailing list