`zpool attach` ignores `-o ashift=13`
glibg10b opened this issue · comments
System information
Type | Version/Name |
---|---|
Distribution Name | Ubuntu |
Distribution Version | 23.10.03 |
Kernel Version | 6.5.0-41-generic |
Architecture | AMD64 |
OpenZFS Version | zfs-2.2.0-0ubuntu1~23.10.3 |
Describe the problem you're observing
After zpool attach
ing a device to a single disk vdev and passing -o ashift=13
, zfs get
still reports an ashift of 9.
Describe how to reproduce the problem
# zpool attach pool wwn-0x5000c5008c3199e1 wwn-0x50000394e5c052a9 -o ashift=13
$ zpool get all pool wwn-0x50000394e5c052a9 | grep ashift
wwn-0x50000394e5c052a9 ashift 9 -
Include any warning/errors/backtraces from the system logs
None
Additional information
The output of zpool status
afterwards:
$ zpool status
pool: pool
state: ONLINE
scan: resilvered 26.1G in 00:16:28 with 0 errors on Sun Jun 23 07:28:12 2024
remove: Removal of vdev 2 copied 19.5G in 0h3m, completed on Sun Jun 23 00:13:08 2024
49.6K memory used for removed device mappings
config:
NAME STATE READ WRITE CKSUM
pool ONLINE 0 0 0
wwn-0x50014ee212b682c4 ONLINE 0 0 0
usb-TOSHIBA_MQ01ABD100_1311220002196741-0:0 ONLINE 0 0 0
mirror-3 ONLINE 0 0 0
wwn-0x5000c5008c3199e1 ONLINE 0 0 0
wwn-0x50000394e5c052a9 ONLINE 0 0 0
errors: No known data errors
The other disk in the mirror correctly has ashift=13.
I actually tried reattaching the device twice (zfs remove
ing the device in between, of course). Maybe the fact that I was able to remove it after the first zfs attach
indicates that ashift wasn't actually 9 as reported by zpool get
? If it would help, I can try removing it a second time and see if ZFS lets me.
ashift
is per top-level vdev, and immutable after the vdev is created.