VDEV Properties
Date: November 8, 2021
Speakers:
Allan Jude, CTO @ Klara Inc. � Mark Maybee @ Delphix
Motivation
What Properties?
What Can You Set?
What Can I Read?
What Does It Look Like
# zpool get all pool0 all-vdevs
NAME PROPERTY VALUE SOURCE
sdb capacity 64% -
sdb state ONLINE -
sdb ashift 9 -
sdb size 15.9G -
sdb free 5.69G -
sdb allocated 10.2G -
sdb comment - default
sdb parity 0 -
sdb path /dev/sdb1 -
sdb devid ata-VBOX_HARDDISK_VBe8a6b5f3-3cfbe0e8-part1 -
sdb physpath pci-0000:00:0d.0-ata-2.0 -
sdb parent pool0 -
sdb children - default
sdb numchildren 0 -
sdb read_errors 0 -
sdb write_errors 0 -
sdb checksum_errors 0 -
sdb read_ops 505 -
sdb write_ops 813 -
sdb free_ops 0 -
sdb claim_ops 0 -
sdb trim_ops 0 -
sdb read_bytes 2.43M -
sdb write_bytes 5.10M -
sdb free_bytes 0 -
sdb claim_bytes 0 -
sdb trim_bytes 0 -
sdb removing off -
sdb allocating on default
Implementation
Allocating Property
Allocating vdev Property
Primary use Case: Device Removal
Device Removal Example
Replace Two Drives (without property)
Two new drives added to config
Copy data from drive A
A
B
Remove drive A
Copy data from drive B
Remove drive B
Request drive A removal
Request drive B removal
Replace Two Drives (without property)
zpool add tank devC
devB
devA
devC
Replace Two Drives (without property)
zpool remove tank devA
devB
devA
devC
Data copied = 2TB
Replace Two Drives (without property)
One drive removed
devB
devC
Replace Two Drives (without property)
zpool remove tank devB
devB
devC
Data copied = 3TB
Replace Two Drives (without property)
FINISHED
Total data copied = 5TB
devC
Replace Two Drives (using property)
zpool add tank devC
devB
devA
devC
Replace Two Drives (using property)
zpool set allocating=off tank devA devB
devB
devA
devC
Replace Two Drives (using property)
zpool remove tank devA
devB
devA
devC
Data copied = 2TB
Replace Two Drives (using property)
zpool remove tank devB
devB
devC
Data copied = 2TB
Replace Two Drives (using property)
FINISHED
Total data copied = 4TB
devC
Replace Two Drives (using property)
Two new drives added to config
Copy data from drive A
Copy data from drive B
Remove drive A
Remove drive B
Request drive A removal
Request drive B removal
Why “allocating” instead of “read-only”?
What Else Could We Do?
Closing Thoughts
Let’s stay in touch!
Questions?