ZFS出现告警4096Bnative
原创大约 2 分钟
ZFS出现告警4096Bnative
背景
某天发现
zfs status -v
出现
zpool status
pool: data
state: ONLINE
status: One or more devices has experienced an unrecoverable error. An
attempt was made to correct the error. Applications are unaffected.
action: Determine if the device needs to be replaced, and clear the errors
using 'zpool clear' or replace the device with 'zpool replace'.
see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-9P
scan: resilvered 10.4M in 00:00:05 with 0 errors on Sat Oct 26 13:40:01 2024
config:
NAME STATE READ WRITE CKSUM
data ONLINE 0 0 0
raidz1-0 ONLINE 0 0 0
sdd1 ONLINE 0 0 0 block size: 512B configured, 4096B native
sdd2 ONLINE 0 0 3 block size: 512B configured, 4096B native
sdb ONLINE 0 0 0
说是性能下降,没什么影响。 彻底解决需要重建zpool
用到的命令
查询当前存储在block ashift
ashift: 9
zdb -C data
MOS Configuration:
version: 5000
name: 'data'
state: 0
txg: 969432
pool_guid: 9703812300654
errata: 0
hostid: 42024
hostname: 'xxxx'
com.delphix:has_per_vdev_zaps
vdev_children: 1
vdev_tree:
type: 'root'
id: 0
guid: 9703812300654
create_txg: 4
com.klarasystems:vdev_zap_root: 129
children[0]:
type: 'raidz'
id: 0
guid: 87843789
nparity: 1
metaslab_array: 256
metaslab_shift: 33
ashift: 9
asize: 3000569954304
is_log: 0
create_txg: 4
com.delphix:vdev_zap_top: 130
children[0]:
type: 'disk'
id: 0
guid: 95667849871
path: '/dev/sdd1'
whole_disk: 0
DTL: 140
create_txg: 4
com.delphix:vdev_zap_leaf: 138
children[1]:
type: 'disk'
id: 1
guid: 693540761
path: '/dev/sdd2'
whole_disk: 0
DTL: 1319
create_txg: 4
com.delphix:vdev_zap_leaf: 1317
faulted: 1
children[2]:
type: 'disk'
id: 2
guid: 876549683
path: '/dev/sdb1'
devid: ''
phys_path: 'pci-0000:00:14.0-0:1:1.0-scsi-0:0:0:0'
whole_disk: 1
DTL: 888
create_txg: 4
com.delphix:vdev_zap_leaf: 886
features_for_read:
com.delphix:hole_birth
com.delphix:embedded_data
com.klarasystems:vdev_zaps_v2
查询磁盘的物理设备快大小和逻辑设备块大小
lsblk -o NAME,PHY-SEC,LOG-SEC,SIZE
NAME PHY-SEC LOG-SEC SIZE
sda 512 512 931.5G
└─sda1 512 512 931.5G
sdb 512 512 931.5G
├─sdb1 512 512 931.5G
└─sdb9 512 512 8M
sdc 4096 512 3.6T
├─sdc1 4096 512 3.6T
└─sdc9 4096 512 8M
sdd 4096 512 3.6T
├─sdd1 4096 512 1.8T
└─sdd2 4096 512 1.8T
nvme0n1 512 512 931.5G
├─nvme0n1p1 512 512 1007K
重新创建存储池
zpool create -o ashift=12 data raidz1 sdd1 sdd2 sdb