Disk Identification

NASbox

Guru
Joined
May 8, 2012
Messages
650
When I do zpool status (from the shell), my data pools show the disks with gptid/--long guid numer-- with no mention of the device, but freenas-boot shows as ada2p2 with no mention of the gptid. Can someone tell me what causes the data pools to show the guid? I though it might have been a partition label, but I just tried gpart list, and all the partitions show label: (null), so it isn't a partition lablel.

Code:
  pool: TANK
 state: ONLINE
status: Some supported features are not enabled on the pool. The pool can
        still be used, but some features are unavailable.
action: Enable all features using 'zpool upgrade'. Once this is done,
        the pool may no longer be accessible by software that does not support
        the features. See zpool-features(7) for details.
  scan: scrub repaired 0 in 0 days 09:46:49 with 0 errors on Sat Nov 23 10:46:52 2019
config:

        NAME                                            STATE     READ WRITE CKSUM
        TANK                                            ONLINE       0     0     0
          raidz2-0                                      ONLINE       0     0     0
            gptid/77xxxxxx-xxxx-xxxx-xxxx-xxxxxxd2677a  ONLINE       0     0     0
            gptid/79xxxxxx-xxxx-xxxx-xxxx-xxxxxxd2677a  ONLINE       0     0     0
            gptid/7axxxxxx-xxxx-xxxx-xxxx-xxxxxxd2677a  ONLINE       0     0     0
            gptid/7bxxxxxx-xxxx-xxxx-xxxx-xxxxxxd2677a  ONLINE       0     0     0
            gptid/7cxxxxxx-xxxx-xxxx-xxxx-xxxxxxd2677a  ONLINE       0     0     0
            gptid/7cxxxxxx-xxxx-xxxx-xxxx-xxxxxxd2677a  ONLINE       0     0     0
            gptid/56xxxxxx-xxxx-xxxx-xxxx-xxxxxxd2677a  ONLINE       0     0     0
            gptid/81xxxxxx-xxxx-xxxx-xxxx-xxxxxxd2677a  ONLINE       0     0     0

errors: No known data errors

  pool: freenas-boot
 state: ONLINE
  scan: scrub repaired 0 in 0 days 00:00:36 with 0 errors on Mon Dec 30 03:45:36 2019
config:

        NAME        STATE     READ WRITE CKSUM
        freenas-boot  ONLINE       0     0     0
          ada2p2    ONLINE       0     0     0

Why do I care? TLDR; Something happened to a removable volume that used to display the gptid form and now displays adaXp2 format, and I'm trying to fix it.
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
When the FreeNAS middleware creates the storage pool, it partitions the disks with a swap partition and a ZFS partition, then uses the gptid of the ZFS partition to create the pool. The reason the zpool list shows the gptid instead of the adaXp2 number is because the gptid is what was used for pool creation and that number should not change as long as the partition exists.

I think you would find some useful information in this thread:

Cannot eject RDX removable device

https://www.ixsystems.com/community/threads/cannot-eject-rdx-removable-device.68297/#post-468073
 
Last edited:

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
Also, there are some useful commands here:


and here

 

NASbox

Guru
Joined
May 8, 2012
Messages
650
Thanks @Chris Moore
Also, there are some useful commands here:


and here

Thanks there are a couple of useful commands that I was not aware of here.

When the FreeNAS middleware creates the storage pool, it partitions the disks with a swap partition and a ZFS partition, then uses the gptid of the ZFS partition to create the pool. The reason the zpool list shows the gptid instead of the adaXp2 number is because the gptid is what was used for pool creation and that number should not change as long as the partition exists.

I think you would find some useful information in this thread:

Cannot eject RDX removable device

https://www.ixsystems.com/community/threads/cannot-eject-rdx-removable-device.68297/#post-468073
I had a look at the thread you quoted, and I can remember following it as the thread was created since I was doing something very similar.

I created BACKUP02 with the WebGUI and then exported it, and then deleted the swap partition (I kept sceen scrape w/notes so I would know how to do it again when I needed to):
Code:
#>zpool export BACKUP02
#>gpart delete -i 1 ada3
gpart: Device busy
#>camcontrol eject ada3 -v
Error received from stop unit command
(pass11:ahcich5:0:0:0): START STOP UNIT. CDB: 1b 00 00 00 02 00
(pass11:ahcich5:0:0:0): CAM status: CCB request was invalid
#>gpart delete -i 1 ada3 
gpart: Device busy
(Drive had to be ejected and powered off and then back on)
#>gpart delete -i 1 ada3
ada3p1 deleted
This pool functioned as expected for about 8 months until I screwed it up by a careless unmount.

Can you please elaborate on this: then uses the gptid of the ZFS partition to create the pool.
because my problem is:
The reason the zpool list shows the gptid instead of the adaXp2 number is because the gptid is what was used for pool creation and that number should not change as long as the partition exists. is not true-I somehow managed to reset that name (careless forgot to eject and did a reboot/upgarde, and removed the drive part way through the process). At the end of all this I somehow reattached the pool, but ended up resetting the id -- all the data is 100% intact.

Somewhere there is a piece of meta data that that has been wiped/overwritten/reset - What meta data on the disk is responsible for gptid/73xxxxxx-xxxx-xxxx-xxxx-xxxxxxd2677a?

I suspect that this behaviour hold the clue for what is happening.

Code:
#>glabel status                       # Check initial status
                                      Name  Status  Components
[Other disks remove/Not relevant]
gptid/73xxxxxx-xxxx-xxxx-xxxx-xxxxxxd2677a     N/A  ada3p2

#>zpool import BACKUP02               # Import single disk pool
#>glabel status                       # Recheck status
                                      Name  Status  Components
[Other disks remove/Not relevant]
---ada3p2: Disappeared from status output
           Pool imported successfully/functions as expected

#>zpool export BACKUP02               # Export the pool
#>glabel status                       # Recheck status
                                      Name  Status  Components
[Other disks remove/Not relevant]
gptid/73xxxxxx-xxxx-xxxx-xxxx-xxxxxxd2677a     N/A  ada3p2
 

NASbox

Guru
Joined
May 8, 2012
Messages
650
@jgreco - I pulled this out of the other post and put it where it belongs tok keep the forum "tidy".

So your question there is.... what? The GPT is somehow screwed up? That's what it sounds like.

What happens when you do

# glabel list ada3p1

Which might not show up since it sounds like you wiped the swap partition? Or

# glabel list ada3p2

Which you should be able to compare side-by-side with other entries such as maybe ada2p2.

Is the kernel throwing errors when you do any of this, like the always delightful "the {primary,secondary} GPT table is corrupt" message? Because normally if it is P.O.'ed at you it will tell you. There's a lot of soft probing that you can do with glabel to zero in on what's going on.
As expected the first command says that the partiton doesn't exist--no surprise. The second command also works as expected as does the volume EXCEPT for the behaviour in zpool import/zpool status.

The problem is that I have a script that depends on the behaviour of zpool import. (See below BACKUP01/BACKUP02)

BACKUP01, and BACKUP02 were both created using the FreeNAS WebUI, and then stripped of the swap partition so as to prevent problems with mounting/unmounting as they are removable volumes. BACKUP02 functions correctly except the gptid doesn't display.

The problem with BACKUP02 was caused by it being left in indavertently when I began my upgrade from 11.1U7->11.2U7. I removed the drive during the first reboot. (A careless accident). Somehow it stripped out some metadata, and I don't even know what meta data so I can put it back.

Any ideas?

Code:
#>zpool import
   pool: BACKUP01
     id: 5978781716510586925
  state: ONLINE
status: Some supported features are not enabled on the pool.
action: The pool can be imported using its name or numeric identifier, though
        some features will not be available without an explicit 'zpool upgrade'.
config:

        BACKUP01                                      ONLINE
          gptid/8d86xxxx-xxxx-xxxx-xxxx-xxxxxxxx677a  ONLINE
#>glabel list ada3p2
Geom name: ada3p2
Providers:
1. Name: gptid/8d86xxxx-xxxx-xxxx-xxxx-xxxxxxxx677a
   Mediasize: 7999415648256 (7.3T)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r0w0e0
   secoffset: 0
   offset: 0
   seclength: 15623858688
   length: 7999415648256
   index: 0
Consumers:
1. Name: ada3p2
   Mediasize: 7999415648256 (7.3T)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r0w0e0
--------------------------------------------------------------------------------
#>zpool import
   pool: BACKUP02
     id: 8430597905561431551
  state: ONLINE
status: Some supported features are not enabled on the pool.
action: The pool can be imported using its name or numeric identifier, though
        some features will not be available without an explicit 'zpool upgrade'.
config:

        BACKUP02    ONLINE
          ada3p2    ONLINE
#>glabel list ada3p2
Geom name: ada3p2
Providers:
1. Name: gptid/735dxxxx-xxxx-xxxx-xxxx-xxxxxxxx677a
   Mediasize: 9998683774976 (9.1T)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r0w0e0
   secoffset: 0
   offset: 0
   seclength: 19528679248
   length: 9998683774976
   index: 0
Consumers:
1. Name: ada3p2
   Mediasize: 9998683774976 (9.1T)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r0w0e0


What other commands can I use to proble/compare?
 

NASbox

Guru
Joined
May 8, 2012
Messages
650
Can anyone suggest what other commands I can use to compare disks to determine what the source of the difference is?

What does FreeNAS do so that zpool import or staus displays the disks in a form like gptid/73xxxxxx-xxxx-xxxx-xxxx-xxxxxxd2677a rather than ada3p2 as per the example?
Code:
#>zpool import
   pool: BACKUP01
     id: 5978781716510586925
  state: ONLINE
status: Some supported features are not enabled on the pool.
action: The pool can be imported using its name or numeric identifier, though
        some features will not be available without an explicit 'zpool upgrade'.
config:

        BACKUP01                                      ONLINE
          gptid/8d86xxxx-xxxx-xxxx-xxxx-xxxxxxxx677a  ONLINE
#>glabel list ada3p2
Geom name: ada3p2
Providers:
1. Name: gptid/8d86xxxx-xxxx-xxxx-xxxx-xxxxxxxx677a
   Mediasize: 7999415648256 (7.3T)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r0w0e0
   secoffset: 0
   offset: 0
   seclength: 15623858688
   length: 7999415648256
   index: 0
Consumers:
1. Name: ada3p2
   Mediasize: 7999415648256 (7.3T)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r0w0e0
--------------------------------------------------------------------------------
#>zpool import
   pool: BACKUP02
     id: 8430597905561431551
  state: ONLINE
status: Some supported features are not enabled on the pool.
action: The pool can be imported using its name or numeric identifier, though
        some features will not be available without an explicit 'zpool upgrade'.
config:

        BACKUP02    ONLINE
          ada3p2    ONLINE
#>glabel list ada3p2
Geom name: ada3p2
Providers:
1. Name: gptid/735dxxxx-xxxx-xxxx-xxxx-xxxxxxxx677a
   Mediasize: 9998683774976 (9.1T)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r0w0e0
   secoffset: 0
   offset: 0
   seclength: 19528679248
   length: 9998683774976
   index: 0
Consumers:
1. Name: ada3p2
   Mediasize: 9998683774976 (9.1T)
   Sectorsize: 512
   Stripesize: 4096
   Stripeoffset: 0
   Mode: r0w0e0
Even knowing if this behaviour is a FreeNAS thing or FreeBSD would help. Does anyone use FreeBSD on the desktop? If so what does zpool status look like.... do you get gpt/xxxxxxxxxxxxxxxxxx or adaXpY? If this is a FreeBSD thing, then maybe I need to go to a FreeBSD forrum/rredit. Any suggestions would be very much appreciated.

I really don't want to have to blow away the volume and recreate it since it takes about a day to do.
 

NASbox

Guru
Joined
May 8, 2012
Messages
650
Even knowing if this behaviour is a FreeNAS thing or FreeBSD would help. If this is a general FreeBSD question, maybe there is another forum I could take it to. As things stand, I have no idea what else to do to resolve this issue.
 
Top