Skip to content

Instantly share code, notes, and snippets.

@dentarg
Last active February 20, 2020 14:59
Show Gist options
  • Select an option

  • Save dentarg/c5ea3365f800e9e7ab3072f111fe4e03 to your computer and use it in GitHub Desktop.

Select an option

Save dentarg/c5ea3365f800e9e7ab3072f111fe4e03 to your computer and use it in GitHub Desktop.
ZFS mirror pool expand
vagrant-mysql% grep ada /var/run/dmesg.boot
ada0 at ata0 bus 0 scbus0 target 0 lun 0
ada0: <VBOX HARDDISK 1.0> ATA-6 device
ada0: Serial Number VB95af0d4a-496c8996
ada0: 33.300MB/s transfers (UDMA2, PIO 65536bytes)
ada0: 65536MB (134217728 512 byte sectors)
ada1 at ahcich0 bus 0 scbus2 target 0 lun 0
ada1: <VBOX HARDDISK 1.0> ATA-6 SATA 2.x device
ada1: Serial Number VB31616783-08bbc3fa
ada1: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
ada1: Command Queueing enabled
ada1: 20480MB (41943040 512 byte sectors)
ada2 at ahcich1 bus 0 scbus3 target 0 lun 0
ada2: <VBOX HARDDISK 1.0> ATA-6 SATA 2.x device
ada2: Serial Number VBa6ca8771-d3f69f51
ada2: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
ada2: Command Queueing enabled
ada2: 20480MB (41943040 512 byte sectors)
ada3 at ahcich2 bus 0 scbus4 target 0 lun 0
ada3: <VBOX HARDDISK 1.0> ATA-6 SATA 2.x device
ada3: Serial Number VBef5c1f88-005ce8d3
ada3: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
ada3: Command Queueing enabled
ada3: 10240MB (20971520 512 byte sectors)
ada4 at ahcich3 bus 0 scbus5 target 0 lun 0
ada4: <VBOX HARDDISK 1.0> ATA-6 SATA 2.x device
ada4: Serial Number VB7167e618-b180411f
ada4: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
ada4: Command Queueing enabled
ada4: 10240MB (20971520 512 byte sectors)
ada5 at ahcich4 bus 0 scbus6 target 0 lun 0
ada5: <VBOX HARDDISK 1.0> ATA-6 SATA 2.x device
ada5: Serial Number VBff168068-dfa6ed2b
ada5: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
ada5: Command Queueing enabled
ada5: 20480MB (41943040 512 byte sectors)
ada6 at ahcich5 bus 0 scbus7 target 0 lun 0
ada6: <VBOX HARDDISK 1.0> ATA-6 SATA 2.x device
ada6: Serial Number VBa7f121ee-f62415c3
ada6: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
ada6: Command Queueing enabled
ada6: 20480MB (41943040 512 byte sectors)
vagrant-mysql% sudo -s
vagrant-mysql# zpool list mypool
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
mypool 29G 14.2G 14.8G - - 31% 49% 1.00x ONLINE -
vagrant-mysql# zpool status mypool
pool: mypool
state: ONLINE
scan: resilvered 7.12G in 0 days 00:00:31 with 0 errors on Thu Feb 20 13:39:41 2020
config:
NAME STATE READ WRITE CKSUM
mypool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ada1 ONLINE 0 0 0
ada2 ONLINE 0 0 0
mirror-1 ONLINE 0 0 0
ada3 ONLINE 0 0 0
ada4 ONLINE 0 0 0
errors: No known data errors
vagrant-mysql# zpool detach mypool ada3
vagrant-mysql# zpool list mypool
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
mypool 29G 14.2G 14.8G - - 31% 49% 1.00x ONLINE -
vagrant-mysql# zpool status mypool
pool: mypool
state: ONLINE
scan: resilvered 7.12G in 0 days 00:00:31 with 0 errors on Thu Feb 20 13:39:41 2020
config:
NAME STATE READ WRITE CKSUM
mypool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ada1 ONLINE 0 0 0
ada2 ONLINE 0 0 0
ada4 ONLINE 0 0 0
errors: No known data errors
vagrant-mysql# grep ada5 /var/run/dmesg.boot
ada5 at ahcich4 bus 0 scbus6 target 0 lun 0
ada5: <VBOX HARDDISK 1.0> ATA-6 SATA 2.x device
ada5: Serial Number VBff168068-dfa6ed2b
ada5: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
ada5: Command Queueing enabled
ada5: 20480MB (41943040 512 byte sectors)
vagrant-mysql# zpool attach mypool ada4 ada5
vagrant-mysql# zpool list mypool
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
mypool 29G 14.2G 14.8G - - 31% 49% 1.00x ONLINE -
vagrant-mysql# zpool status mypool
pool: mypool
state: ONLINE
status: One or more devices is currently being resilvered. The pool will
continue to function, possibly in a degraded state.
action: Wait for the resilver to complete.
scan: resilver in progress since Thu Feb 20 14:03:31 2020
14.2G scanned at 1.09G/s, 10.3G issued at 812M/s, 14.2G total
3.18G resilvered, 72.41% done, 0 days 00:00:04 to go
config:
NAME STATE READ WRITE CKSUM
mypool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ada1 ONLINE 0 0 0
ada2 ONLINE 0 0 0
mirror-1 ONLINE 0 0 0
ada4 ONLINE 0 0 0
ada5 ONLINE 0 0 0
errors: No known data errors
vagrant-mysql# zpool status mypool
pool: mypool
state: ONLINE
scan: resilvered 7.11G in 0 days 00:00:30 with 0 errors on Thu Feb 20 14:04:01 2020
config:
NAME STATE READ WRITE CKSUM
mypool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ada1 ONLINE 0 0 0
ada2 ONLINE 0 0 0
mirror-1 ONLINE 0 0 0
ada4 ONLINE 0 0 0
ada5 ONLINE 0 0 0
errors: No known data errors
vagrant-mysql# zpool detach mypool ada4
vagrant-mysql# zpool list mypool
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
mypool 29G 14.2G 14.8G - - 31% 49% 1.00x ONLINE -
vagrant-mysql# zpool status mypool
pool: mypool
state: ONLINE
scan: resilvered 7.11G in 0 days 00:00:30 with 0 errors on Thu Feb 20 14:04:01 2020
config:
NAME STATE READ WRITE CKSUM
mypool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ada1 ONLINE 0 0 0
ada2 ONLINE 0 0 0
ada5 ONLINE 0 0 0
errors: No known data errors
vagrant-mysql# grep ada6 /var/run/dmesg.boot
ada6 at ahcich5 bus 0 scbus7 target 0 lun 0
ada6: <VBOX HARDDISK 1.0> ATA-6 SATA 2.x device
ada6: Serial Number VBa7f121ee-f62415c3
ada6: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
ada6: Command Queueing enabled
ada6: 20480MB (41943040 512 byte sectors)
vagrant-mysql# zpool attach mypool ada5 ada6
vagrant-mysql# zpool list mypool
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
mypool 29G 14.2G 14.8G - - 31% 49% 1.00x ONLINE -
vagrant-mysql# zpool status mypool
pool: mypool
state: ONLINE
status: One or more devices is currently being resilvered. The pool will
continue to function, possibly in a degraded state.
action: Wait for the resilver to complete.
scan: resilver in progress since Thu Feb 20 14:04:53 2020
14.2G scanned at 857M/s, 11.1G issued at 670M/s, 14.2G total
3.99G resilvered, 78.12% done, 0 days 00:00:04 to go
config:
NAME STATE READ WRITE CKSUM
mypool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ada1 ONLINE 0 0 0
ada2 ONLINE 0 0 0
mirror-1 ONLINE 0 0 0
ada5 ONLINE 0 0 0
ada6 ONLINE 0 0 0
errors: No known data errors
vagrant-mysql# zpool status mypool
pool: mypool
state: ONLINE
scan: resilvered 7.11G in 0 days 00:00:31 with 0 errors on Thu Feb 20 14:05:24 2020
config:
NAME STATE READ WRITE CKSUM
mypool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ada1 ONLINE 0 0 0
ada2 ONLINE 0 0 0
mirror-1 ONLINE 0 0 0
ada5 ONLINE 0 0 0
ada6 ONLINE 0 0 0
errors: No known data errors
vagrant-mysql# zpool list mypool
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
mypool 29G 14.2G 14.8G - - 31% 49% 1.00x ONLINE -
vagrant-mysql# zpool online -e mypool ada5 ada6
vagrant-mysql# zpool list mypool
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
mypool 39G 14.2G 24.8G - - 23% 36% 1.00x ONLINE -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment