ZFS ZFS boot problems/disks are named differently

Hi folks,

I was asked by a friend to look after a older server (HP Microserver Gen8), actually running FreeBSD 13.0-RELEASE-p5. Disks are 3 x WD Red Plus 3TB in a raidz1-0 config.

This machine had (some time ago) problems booting, giving "zio_read error 97". After switching the onboard-SATA controller from "ACPI" to "Legacy" the machine started. It was subsequently upgraded to 13.0. I checked "zpool status":

Code:
  pool: zroot
 state: ONLINE
config:

        NAME                               STATE     READ WRITE CKSUM
        zroot                              ONLINE       0     0     0
          raidz1-0                         ONLINE       0     0     0
            ada0p3                         ONLINE       0     0     0
            diskid/DISK-WD-WCC4N1KD0YCRp3  ONLINE       0     0     0
            diskid/DISK-WD-WCC4N4VLZVAEp3  ONLINE       0     0     0

errors: No known data errors

gpart show gives this:

Code:
=>        40  5860533088  ada0  GPT  (2.7T)
          40        1024     1  freebsd-boot  (512K)
        1064         984        - free -  (492K)
        2048     4194304     2  freebsd-swap  (2.0G)
     4196352  5856335872     3  freebsd-zfs  (2.7T)
  5860532224         904        - free -  (452K)

=>        40  5860533088  diskid/DISK-WD-WCC4N4VLZVAE  GPT  (2.7T)
          40        1024                            1  freebsd-boot  (512K)
        1064         984                               - free -  (492K)
        2048     4194304                            2  freebsd-swap  (2.0G)
     4196352  5856335872                            3  freebsd-zfs  (2.7T)
  5860532224         904                               - free -  (452K)

=>        40  5860533088  diskid/DISK-WD-WCC4N1KD0YCR  GPT  (2.7T)
          40        1024                            1  freebsd-boot  (512K)
        1064         984                               - free -  (492K)
        2048     4194304                            2  freebsd-swap  (2.0G)
     4196352  5856335872                            3  freebsd-zfs  (2.7T)
  5860532224         904                               - free -  (452K)

My questions: why is one disk named "ada0" and the other two "diskid/<...>"? How can I change that? Is it possible that the boot problems are related to this? I read a forum thread that the HP Microserver Gen8 in ACPI-mode boots from the first disk ONLY, but the Legacy-mode doesn't...

Thank you for any hints.

Martin
 
grep kern.geom.label. /boot/loader.conf

What's returned?



Here:

Code:
% grep kern.geom.label. /boot/loader.conf
kern.geom.label.disk_ident.enable="0"
kern.geom.label.gptid.enable="0"
%

The zeros are expected. Context:


Here – not directly comparable to your friend's setup, although it might help you to visualise things:

Code:
% zpool status -v Transcend
  pool: Transcend
 state: ONLINE
  scan: scrub repaired 0B in 01:32:30 with 0 errors on Sun Dec 12 16:25:35 2021
config:

        NAME                   STATE     READ WRITE CKSUM
        Transcend              ONLINE       0     0     0
          gpt/Transcend        ONLINE       0     0     0
        cache
          gpt/cache-transcend  ONLINE       0     0     0

errors: No known data errors
% lsblk
DEVICE         MAJ:MIN SIZE TYPE                                          LABEL MOUNT
ada0             0:123 932G GPT                                               - -
  ada0p1         0:125 260M efi                                    gpt/efiboot0 -
  <FREE>         -:-   1.0M -                                                 - -
  ada0p2         0:127  16G freebsd-swap                              gpt/swap0 SWAP
  ada0p2.eli     2:53   16G freebsd-swap                                      - SWAP
  ada0p3         0:129 915G freebsd-zfs                                gpt/zfs0 <ZFS>
  ada0p3.eli     0:137 915G -                                                 - -
  <FREE>         -:-   708K -                                                 - -
cd1              2:73   10M cd9660                    iso9660/ONEPLUS%20DRIVERS -
da0              0:169  29G GPT                                               - -
  da0p1          0:170  29G freebsd-zfs                        gpt/cache-august <ZFS>
da1              0:183 466G GPT                                               - -
  <FREE>         -:-   1.0M -                                                 - -
  da1p1          0:184 466G freebsd-zfs                           gpt/Transcend <ZFS>
da2              0:196  15G GPT                                               - -
  <FREE>         -:-   1.0M -                                                 - -
  da2p1          0:197  15G freebsd-zfs                            gpt/duracell <ZFS>
da3              2:83   14G GPT                                               - -
  <FREE>         -:-   1.0M -                                                 - -
  da3p1          2:84   14G freebsd-zfs                     gpt/cache-transcend <ZFS>
% geom part show da1 && geom part show da3
=>       34  976773101  da1  GPT  (466G)
         34       2014       - free -  (1.0M)
       2048  976771087    1  freebsd-zfs  (466G)

=>      34  30310333  da3  GPT  (14G)
        34      2014       - free -  (1.0M)
      2048  30308319    1  freebsd-zfs  (14G)

% geom part show -l da1 && geom part show -l da3
=>       34  976773101  da1  GPT  (466G)
         34       2014       - free -  (1.0M)
       2048  976771087    1  Transcend  (466G)

=>      34  30310333  da3  GPT  (14G)
        34      2014       - free -  (1.0M)
      2048  30308319    1  cache-transcend  (14G)

% zfs --version
zfs-2.1.99-FreeBSD_gf291fa658
zfs-kmod-2.1.99-FreeBSD_gf291fa658
% uname -iKrsU
FreeBSD 14.0-CURRENT GENERIC-NODEBUG 1400046 1400046
%

sysutils/lsblk helps to visualise the labels.
 
Thank you for your reply. It's getting interesting...

I just read about the need to update the bootloader after a upgrade. I admit to never have done this before... usually the machines I work with are installed new with FreeBSD X.<early> and retired after getting upgraded to X+1.<last> a few years later, so this never bit me.

To update the bootloader looks useful, so I just ssh'd into a customer machine and found this:


Code:
  pool: zroot
 state: DEGRADED
status: One or more devices are faulted in response to persistent errors.
    Sufficient replicas exist for the pool to continue functioning in a
    degraded state.
action: Replace the faulted device, or use 'zpool clear' to mark the device
    repaired.
  scan: scrub repaired 0B in 213503982334601 days 05:09:52 with 0 errors on Sat Oct  9 10:23:47 2021
config:

    NAME        STATE     READ WRITE CKSUM
    zroot       DEGRADED     0     0     0
      raidz2-0  DEGRADED     0     0     0
        ada0p3  ONLINE       0     0     0
        ada1p3  ONLINE       0     0     0
        ada2p3  FAULTED      1     0     0  too many errors
        ada3    ONLINE       0     0     0

errors: No known data errors

Obviously disk ada2 failed. There is no /dev/diskid on this machine, and no ada3p1 to update the bootloader.... It's getting weird.

A second, similar machine (both Dell 1HE servers with 4 * SATA disks) shows this:

Code:
zpool status
  pool: zroot
 state: ONLINE
config:

    NAME        STATE     READ WRITE CKSUM
    zroot       ONLINE       0     0     0
      raidz2-0  ONLINE       0     0     0
        da0p3   ONLINE       0     0     0
        da1p3   ONLINE       0     0     0
        da2p3   ONLINE       0     0     0
        da3p3   ONLINE       0     0     0

errors: No known data errors

So, this renaming has something to do with failing disks and replacing/resilvering them. I check this out...

To answer your question, the /boot/loader.conf of the machine in my first question looks like this:

Code:
zfs_load="YES"
vboxdrv_load="YES"
 
I read through this threads. If I understand correctly, applying this will remove the /dev/diskid-devices an I have probably need to adjust /etc/fstab entries.

However, the machine from above (with the defective drive) already has this two parameters set to "0"...

Code:
# sysctl -a|grep geom.label
kern.features.geom_label: 1
kern.geom.label.disk_ident.enable: 0
kern.geom.label.gptid.enable: 0
kern.geom.label.gpt.enable: 1

# ls -l /dev/ada*
crw-r-----  1 root  operator  0x76 Jan 11 08:30 /dev/ada0
crw-r-----  1 root  operator  0x8f Jan 11 08:30 /dev/ada0p1
crw-r-----  1 root  operator  0x91 Jan 11 09:30 /dev/ada0p2
crw-r-----  1 root  operator  0x93 Jan 11 08:30 /dev/ada0p3
crw-r-----  1 root  operator  0x78 Jan 11 08:30 /dev/ada1
crw-r-----  1 root  operator  0x95 Jan 11 08:30 /dev/ada1p1
crw-r-----  1 root  operator  0x97 Jan 11 08:30 /dev/ada1p2
crw-r-----  1 root  operator  0x99 Jan 11 08:30 /dev/ada1p3
crw-r-----  1 root  operator  0x8b Jan 11 08:30 /dev/ada2
crw-r-----  1 root  operator  0x8d Jan 11 08:30 /dev/ada3

# 
#gpart show
=>        40  1953525088  ada0  GPT  (932G)
          40        1024     1  freebsd-boot  (512K)
        1064         984        - free -  (492K)
        2048     4194304     2  freebsd-swap  (2.0G)
     4196352  1949327360     3  freebsd-zfs  (930G)
  1953523712        1416        - free -  (708K)

=>        40  1953525088  ada1  GPT  (932G)
          40        1024     1  freebsd-boot  (512K)
        1064         984        - free -  (492K)
        2048     4194304     2  freebsd-swap  (2.0G)
     4196352  1949327360     3  freebsd-zfs  (930G)
  1953523712        1416        - free -  (708K)

Why do the ada0 and ada1 show up with p1..p3 and ada2 and ada3 without (or not at all with gpart)? IIRC ada3 was replaced and resilvered some time ago...
 
Back
Top