Disk list shows incorrect values (potentially dangerous)

Rapper_skull

Dabbler
Joined
Sep 18, 2019
Messages
13
Hi, I set up some device hints via FreeNAS tunables, but found out that FreeNAS still keeps track of the old device names, as shown below. I'm not completely sure that this issue is related to the hints.

This is the output of geom disk list:
Code:
Geom name: cd0

Providers:

1. Name: cd0

   Mediasize: 0 (0B)

   Sectorsize: 2048

   Mode: r0w0e0

   descr: PLDS DVD-ROM DH-16D6S

   ident: (null)

   rotationrate: unknown

   fwsectors: 0

   fwheads: 0


Geom name: cd1

Providers:

1. Name: cd1

   Mediasize: 0 (0B)

   Sectorsize: 2048

   Mode: r0w0e0

   descr: iDRAC Virtual CD

   ident: (null)

   rotationrate: unknown

   fwsectors: 0

   fwheads: 0


Geom name: ada0

Providers:

1. Name: ada0

   Mediasize: 160041885696 (149G)

   Sectorsize: 512

   Mode: r1w1e2

   descr: Hitachi HDT721016SLA380

   lunid: 5000cca345cd39f9

   ident: STA1L5MA0Y2ZLB

   rotationrate: 7200

   fwsectors: 63

   fwheads: 16


Geom name: da3

Providers:

1. Name: da3

   Mediasize: 2000398934016 (1.8T)

   Sectorsize: 512

   Stripesize: 4096

   Stripeoffset: 0

   Mode: r1w1e3

   descr: ATA ST2000DM006-2DM1

   lunid: 5000c5009289c9d3

   ident: Z4Z6BT26

   rotationrate: 7200

   fwsectors: 63

   fwheads: 255


Geom name: da2

Providers:

1. Name: da2

   Mediasize: 2000398934016 (1.8T)

   Sectorsize: 512

   Mode: r1w1e3

   descr: ATA WD2000FYYX

   lunid: 50014ee25d8c0d48

   ident: WCC1P0143716

   rotationrate: 7200

   fwsectors: 63

   fwheads: 255


Geom name: da1

Providers:

1. Name: da1

   Mediasize: 450098159616 (419G)

   Sectorsize: 512

   Mode: r1w1e3

   descr: HITACHI HUS156045VLS600

   lunid: 5000cca01facd420

   ident: J1Y21JRN

   rotationrate: 15000

   fwsectors: 63

   fwheads: 255


Geom name: da0

Providers:

1. Name: da0

   Mediasize: 450098159616 (419G)

   Sectorsize: 512

   Mode: r1w1e3

   descr: HITACHI HUS156045VLS600

   lunid: 5000cca02a50d9e8

   ident: LWWEGE5M

   rotationrate: 15000

   fwsectors: 63

   fwheads: 255


Geom name: da6

Providers:

1. Name: da6

   Mediasize: 2000398934016 (1.8T)

   Sectorsize: 512

   Mode: r1w1e3

   descr: ATA WD2000FYYX

   lunid: 50014ee2b2e0d243

   ident: WCC1P0141959

   rotationrate: 7200

   fwsectors: 63

   fwheads: 255


Geom name: da5

Providers:

1. Name: da5

   Mediasize: 1000204886016 (932G)

   Sectorsize: 512

   Mode: r1w1e3

   descr: ATA ST31000524NS

   lunid: 5000c50026a136b3

   ident: 9WK0YS72

   rotationrate: 7200

   fwsectors: 63

   fwheads: 255


Geom name: da4

Providers:

1. Name: da4

   Mediasize: 1000204886016 (932G)

   Sectorsize: 512

   Mode: r1w1e3

   descr: ATA ST31000524NS

   lunid: 5000c50026a131c8

   ident: 9WK0YS6Y

   rotationrate: 7200

   fwsectors: 63

   fwheads: 255


Geom name: da8

Providers:

1. Name: da8

   Mediasize: 0 (0B)

   Sectorsize: 512

   Mode: r0w0e0

   descr: iDRAC LCDRIVE

   ident: (null)

   rotationrate: unknown

   fwsectors: 0

   fwheads: 0


Geom name: da9

Providers:

1. Name: da9

   Mediasize: 15483273216 (14G)

   Sectorsize: 512

   Mode: r1w1e2

   descr: Kingston DataTraveler 2.0

   ident: 1C1B0D03C47BB341B92F2062

   rotationrate: unknown

   fwsectors: 63

   fwheads: 255


And this is a screenshot from FreeNAS:
FreeNAS_disks.png


As you can see da3 is seen by FreeNAS as da0, da2 as da1, da1 as da2, da0 as da3, da4 as da6, da5 is correct (because I have only 3 disks on the second port) and finally da6 as da4.
 

Rapper_skull

Dabbler
Joined
Sep 18, 2019
Messages
13
Apparently using device hints for da devices is not enough, you also need them for the corresponding pass device. I don't know if this is to be considered an issue with FreeNAS or not.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I don't know if this is to be considered an issue with FreeNAS or not
It is not an issue.

FreeNAS/ZFS addresses the disks by GPTID to locate members of a pool, so can't be confused by any other device labelling.

Those numbers can change at boot or on hardware swaps at any time and FreeNAS/ZFS won't miss a beat.

Pay attention to the serial numbers in the disks view when replacing disks and make sure you pull the right disk(s). Otherwise trust the system to handle the disks properly.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
da numbers are randomly set at boot by freebsd. No guarantees they will be the same after a reboot.
 
Last edited:

Rapper_skull

Dabbler
Joined
Sep 18, 2019
Messages
13
da numbers are randomly set at boot by freebsd. No guarantees they will be there same after a reboot.
Actually, using device hints it's possible. The problem is not that though. The problem is that a name that's supposed to be unique on the system is really not, meaning two different things in FreeBSD and FreeNAS.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Actually, using device hints it's possible. The problem is not that though. The problem is that a name that's supposed to be unique on the system is really not, meaning two different things in FreeBSD and FreeNAS.
They are unique they just don't seem to work the way your expect them to.
 
Top