glabel and real disk IDs

Pawel Jakub Dawidek pjd at FreeBSD.org
Thu Jul 9 20:00:58 UTC 2009


On Thu, Jul 09, 2009 at 01:52:53PM +0200, Ivan Voras wrote:
> Hi,
> 
> I've been working with glabels for a time [...]

You should stop, really. We have enough labels in /dev/ as it is.

> [...] 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.

It was proposed in the past and the consensus was not to do it.
One of the reasons was polution of /dev/, another one was that the way
of getting SCSI disks IDs was not perfect.

> 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).

I guess you advice that? There is no such need when it comes to ZFS. ZFS
can find his components just fine without using their names. Disk IDs
were added for ZFS in the past, but now they serve no purpose, I'd
prefer to remove them altogether or just leave them for informational
purpose as they exist now.

-- 
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd at FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-geom/attachments/20090709/37d25f0f/attachment.pgp


More information about the freebsd-geom mailing list