morey-tech / homelab

0 stars 0 forks source link

Add vdev with 4x 10TB drives to `storage-mass` zpool #38

Closed morey-tech closed 2 months ago

morey-tech commented 2 months ago

Current pool status:

root@helios:~# zpool status storage-mass
  pool: storage-mass
 state: ONLINE
status: Some supported and requested 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: resilvered 1.74M in 00:00:01 with 0 errors on Tue May 28 08:51:41 2024
config:

        NAME                                    STATE     READ WRITE CKSUM
        storage-mass                            ONLINE       0     0     0
          raidz2-0                              ONLINE       0     0     0
            ata-WDC_WD101EMAZ-11G7DA0_VCG9YGZM  ONLINE       0     0     0
            ata-WDC_WD101EMAZ-11G7DA0_VCGAM7KM  ONLINE       0     0     0
            ata-WDC_WD101EMAZ-11G7DA0_VCGSDUGN  ONLINE       0     0     0
            ata-WDC_WD101EMAZ-11G7DA0_VCH2NUVP  ONLINE       0     0     0

errors: No known data errors

Expand with the 4x 10TB drives directly below the existing 4 in das2. Add a new raidz2 zdev to the pool.

morey-tech commented 2 months ago

Hard drives:

root@helios:~# ls -l /dev/disk/by-id/ | grep -i 3B7NP
lrwxrwxrwx 1 root root  9 May 28 08:48 ata-WDC_WD101EMAZ-11G7DA0_VCH3B7NP -> ../../sdz
lrwxrwxrwx 1 root root 10 May 28 08:48 ata-WDC_WD101EMAZ-11G7DA0_VCH3B7NP-part1 -> ../../sdz1
lrwxrwxrwx 1 root root 10 May 28 08:48 ata-WDC_WD101EMAZ-11G7DA0_VCH3B7NP-part9 -> ../../sdz9
root@helios:~# ls -l /dev/disk/by-id/ | grep -i V78HP
lrwxrwxrwx 1 root root  9 May 28 08:48 ata-WDC_WD101EMAZ-11G7DA0_VCGV78HP -> ../../sdv
lrwxrwxrwx 1 root root 10 May 28 08:48 ata-WDC_WD101EMAZ-11G7DA0_VCGV78HP-part1 -> ../../sdv1
lrwxrwxrwx 1 root root 10 May 28 08:48 ata-WDC_WD101EMAZ-11G7DA0_VCGV78HP-part2 -> ../../sdv2
root@helios:~# ls -l /dev/disk/by-id/ | grep -i PK5XP
lrwxrwxrwx 1 root root  9 May 28 08:48 ata-WDC_WD101EMAZ-11G7DA0_VCGPK5XP -> ../../sdy
lrwxrwxrwx 1 root root 10 May 28 08:48 ata-WDC_WD101EMAZ-11G7DA0_VCGPK5XP-part1 -> ../../sdy1
lrwxrwxrwx 1 root root 10 May 28 08:48 ata-WDC_WD101EMAZ-11G7DA0_VCGPK5XP-part2 -> ../../sdy2
root@helios:~# ls -l /dev/disk/by-id/ | grep -i V47VP
lrwxrwxrwx 1 root root  9 May 28 08:48 ata-WDC_WD101EMAZ-11G7DA0_VCGV47VP -> ../../sdt
lrwxrwxrwx 1 root root 10 May 28 08:48 ata-WDC_WD101EMAZ-11G7DA0_VCGV47VP-part1 -> ../../sdt1
lrwxrwxrwx 1 root root 10 May 28 08:48 ata-WDC_WD101EMAZ-11G7DA0_VCGV47VP-part2 -> ../../sdt2
morey-tech commented 2 months ago

Command to add the drives:

zpool add storage-mass raidz2 -f \
    ata-WDC_WD101EMAZ-11G7DA0_VCH3B7NP \
    ata-WDC_WD101EMAZ-11G7DA0_VCGV78HP \
    ata-WDC_WD101EMAZ-11G7DA0_VCGPK5XP \
    ata-WDC_WD101EMAZ-11G7DA0_VCGV47VP

Test of the command (using -n for dry-run):

root@helios:~# zpool add storage-mass raidz2 ata-WDC_WD101EMAZ-11G7DA0_VCH3B7NP ata-WDC_WD101EMAZ-11G7DA0_VCGV78HP ata-WDC_WD101EMAZ-11G7DA0_VCGPK5XP ata-WDC_WD101EMAZ-11G7DA0_VCGV47VP -n
invalid vdev specification
use '-f' to override the following errors:
/dev/disk/by-id/ata-WDC_WD101EMAZ-11G7DA0_VCH3B7NP-part1 is part of potentially active pool 'Media'
/dev/disk/by-id/ata-WDC_WD101EMAZ-11G7DA0_VCGV78HP-part2 is part of potentially active pool 'Media'
/dev/disk/by-id/ata-WDC_WD101EMAZ-11G7DA0_VCGPK5XP-part2 is part of potentially active pool 'Media'
/dev/disk/by-id/ata-WDC_WD101EMAZ-11G7DA0_VCGV47VP-part2 is part of potentially active pool 'Media'
root@helios:~# zpool add storage-mass raidz2 ata-WDC_WD101EMAZ-11G7DA0_VCH3B7NP ata-WDC_WD101EMAZ-11G7DA0_VCGV78HP ata-WDC_WD101EMAZ-11G7DA0_VCGPK5XP ata-WDC_WD101EMAZ-11G7DA0_VCGV47VP -n -f
would update 'storage-mass' to the following configuration:

        storage-mass
          raidz2-0
            ata-WDC_WD101EMAZ-11G7DA0_VCG9YGZM
            ata-WDC_WD101EMAZ-11G7DA0_VCGAM7KM
            ata-WDC_WD101EMAZ-11G7DA0_VCGSDUGN
            ata-WDC_WD101EMAZ-11G7DA0_VCH2NUVP
          raidz2
            ata-WDC_WD101EMAZ-11G7DA0_VCH3B7NP
            ata-WDC_WD101EMAZ-11G7DA0_VCGV78HP
            ata-WDC_WD101EMAZ-11G7DA0_VCGPK5XP
            ata-WDC_WD101EMAZ-11G7DA0_VCGV47VP

The warning about pool Media is caused by the old ZFS configuration that these drives were apart of. The Media pool is no longer in use and is unrelated to the in-use storage-media pool. Due to this, the -f must be used (alternatively, the drives could be wiped).

root@helios:~# zpool list
NAME            SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP    HEALTH  ALTROOT
storage-mass   36.4T  10.1T  26.3T        -         -     2%    27%  1.00x    ONLINE  -
storage-media  72.8T  26.5T  46.2T        -         -     0%    36%  1.00x    ONLINE  -
morey-tech commented 2 months ago
root@helios:~# zpool add storage-mass raidz2 -f \
    ata-WDC_WD101EMAZ-11G7DA0_VCH3B7NP \
    ata-WDC_WD101EMAZ-11G7DA0_VCGV78HP \
    ata-WDC_WD101EMAZ-11G7DA0_VCGPK5XP \
    ata-WDC_WD101EMAZ-11G7DA0_VCGV47VP
root@helios:~# zpool status storage-mass
  pool: storage-mass
 state: ONLINE
status: Some supported and requested 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: resilvered 1.74M in 00:00:01 with 0 errors on Tue May 28 08:51:41 2024
config:

        NAME                                    STATE     READ WRITE CKSUM
        storage-mass                            ONLINE       0     0     0
          raidz2-0                              ONLINE       0     0     0
            ata-WDC_WD101EMAZ-11G7DA0_VCG9YGZM  ONLINE       0     0     0
            ata-WDC_WD101EMAZ-11G7DA0_VCGAM7KM  ONLINE       0     0     0
            ata-WDC_WD101EMAZ-11G7DA0_VCGSDUGN  ONLINE       0     0     0
            ata-WDC_WD101EMAZ-11G7DA0_VCH2NUVP  ONLINE       0     0     0
          raidz2-1                              ONLINE       0     0     0
            ata-WDC_WD101EMAZ-11G7DA0_VCH3B7NP  ONLINE       0     0     0
            ata-WDC_WD101EMAZ-11G7DA0_VCGV78HP  ONLINE       0     0     0
            ata-WDC_WD101EMAZ-11G7DA0_VCGPK5XP  ONLINE       0     0     0
            ata-WDC_WD101EMAZ-11G7DA0_VCGV47VP  ONLINE       0     0     0

errors: No known data errors
root@helios:~# zpool list storage-mass
NAME           SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP    HEALTH  ALTROOT
storage-mass  72.8T  10.1T  62.7T        -         -     1%    13%  1.00x    ONLINE  -
morey-tech commented 2 months ago
Xnapper-2024-05-28-18 02 47