ZFS Why gpt/diskX device in pool made up of daXpY devices?

bplipschitz2

New Member

Reaction score: 3
Messages: 6

Running 11.2-RELEASE amd64, recent install with ZFS boot on an array of 6 SCSI disks. Here's my zpool status:

Code:
  pool: zroot
  state: ONLINE
  scan: resilvered 5.41M in 0h0m with 0 errors on Mon Dec 31 09:11:39 2018
config:

    NAME           STATE     READ WRITE CKSUM
    zroot          ONLINE       0     0     0
      raidz1-0     ONLINE       0     0     0
        da0p2      ONLINE       0     0     0
        da1p2      ONLINE       0     0     0
        gpt/disk2  ONLINE       0     0     0
        da3p2      ONLINE       0     0     0
        da4p2      ONLINE       0     0     0
        da5p2      ONLINE       0     0     0
errors: No known data errors
Was gibt'sWhat's up with the gpt/disk2 device? Why is it not da2p2 (the way I configured it)? I re-read through my install script that I used, and everything looks correct, and to my knowledge, da2 *should* have been added to the pool as da2p2. Is this gpt/disk2 normal, expected behavior? Is it a non-problem that I can ignore? Is this a dumb question that I should just ignore because I'm at work on NYE?

Thanks.
 
Last edited by a moderator:

matthewearl

New Member

Reaction score: 1
Messages: 6

I have a similar issue. I had a drive fail as unavailable. I removed the drive physically and put in a new drive. I offlined the unavailable drive. I copied over the exact partition information using gpt backup and restore. I then did a zpool replace of the drive (for example as da2 instead of da2p3). The drive resilvered and now I have a da2 listed in zpool show instead of da2p3. I believe this is a similar outcome. Is there a way to make it uniform with the others just as the op's issue? I am using 11.1. raidz3
 

Phishfry

Son of Beastie

Reaction score: 1,287
Messages: 3,778

Is this gpt/disk2 normal, expected behavior?
The device node of gpt/disk2 leads me to believe that disk2 is a disk label.
Perhaps you had a disk label on this drive from a prior installation?
Disk labels are not assigned by default so you probably previously labeled the disk.
 
OP
OP
B

bplipschitz2

New Member

Reaction score: 3
Messages: 6

The device node of gpt/disk2 leads me to believe that disk2 is a disk label.
Perhaps you had a disk label on this drive from a prior installation?
Disk labels are not assigned by default so you probably previously labeled the disk.
Is it something that I need to correct, or just let the system go along its merry way?
Thanks.
 

Bobi B.

Well-Known Member

Reaction score: 142
Messages: 335

Depending on sysctl(8) switches, each device/partition could be initially exported under several labels (glabel(8)). da0p2 is partition with index 2 on device da0; gpt/disk2 is GPT partition's label ( gpart add -t freebsd-zfs -l disk2 da2); that is, gpt/disk2 is another name for da2p2.

If you prefer to stick to one kind of labels everywhere you can export the pool, than import it giving -d command-line parameter to zpool(8): zpool export zroot, then zpool import -d /dev or zpool import -d /dev/gpt. Well, if that is your root pool you'll probably have to boot from a live disc first.

Such mixes usually happen when you replace a vdev device or when you reorder disks or their cables, therefore changing their names.
 
Top