리눅스에서 커널 v. 2.6.32-431.11.2.el6.x86_64 아래에 ZFS zpool이 있습니다. vdev는 SAN 장치입니다. SAN의 크기를 확장했으며 zpool이으로 autoexpand
설정 되었음에도 불구하고 on
머신을 재부팅하고 풀을 내보내거나 가져온 후에도 zpool online -e
풀을 확장 할 수 없었습니다. vdev가 fdisk
215GiB에서 250GiB로 증가 했으므로 vdev가 더 큽니다 . 다음은 내가 한 일의 샘플입니다.
[root@timestandstill ~]# zpool list
NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT
dfbackup 214G 207G 7.49G 96% 1.00x ONLINE -
[root@timestandstill ~]# zpool import -d /dev/disk/by-id/
pool: dfbackup
id: 12129781223864362535
state: ONLINE
action: The pool can be imported using its name or numeric identifier.
config:
dfbackup ONLINE
virtio-sbs-XLPH83 ONLINE
[root@timestandstill ~]# zpool import -d /dev/disk/by-id/ dfbackup
[root@timestandstill ~]# zpool list
NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT
dfbackup 214G 207G 7.49G 96% 1.00x ONLINE -
venuebackup 248G 244G 3.87G 98% 1.00x ONLINE -
[root@timestandstill ~]# zpool get autoexpand dfbackup
NAME PROPERTY VALUE SOURCE
dfbackup autoexpand on local
[root@timestandstill ~]# zpool set autoexpand=off dfbackup
[root@timestandstill ~]# zpool set autoexpand=on dfbackup
[root@timestandstill ~]# zpool list
NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT
dfbackup 214G 207G 7.49G 96% 1.00x ONLINE -
venuebackup 248G 244G 3.87G 98% 1.00x ONLINE -
[root@timestandstill ~]# zpool status -v dfbackup
pool: dfbackup
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
dfbackup ONLINE 0 0 0
virtio-sbs-XLPH83 ONLINE 0 0 0
errors: No known data errors
[root@timestandstill ~]# fdisk /dev/disk/by-id/virtio-sbs-XLPH83
WARNING: GPT (GUID Partition Table) detected on '/dev/disk/by-id/virtio-sbs-XLPH83'! The util fdisk doesn't support GPT. Use GNU Parted.
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): p
Disk /dev/disk/by-id/virtio-sbs-XLPH83: 268.4 GB, 268435456000 bytes
256 heads, 63 sectors/track, 32507 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/disk/by-id/virtio-sbs-XLPH83-part1 1 27957 225443839+ ee GPT
Command (m for help): q
[root@timestandstill ~]# zpool online -e dfbackup /dev/disk/by-id/virtio-sbs-XLPH83
[root@timestandstill ~]# zpool list
NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT
dfbackup 214G 207G 7.49G 96% 1.00x ONLINE -
venuebackup 248G 244G 3.87G 98% 1.00x ONLINE -
[root@timestandstill ~]# zpool status -v dfbackup
pool: dfbackup
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
dfbackup ONLINE 0 0 0
virtio-sbs-XLPH83 ONLINE 0 0 0
errors: No known data errors
이 zpool을 어떻게 확장 할 수 있습니까?
zpool online -e pool vdb
트릭을 수행하는 명령입니다. 저는 현재 여러 libvirt 서버에서 ZFS-on-Linux를 사용하고 있으며 (probe없이) 저에게 효과적입니다