Eu tenho um zpool do ZFS no linux no kernel 2.6.32-431.11.2.el6.x86_64 que possui um único vdev. O vdev é um dispositivo SAN. Expandi o tamanho da SAN e, apesar do zpool ter autoexpand
definido on
, mesmo após a reinicialização da máquina, exportar / importar o pool e usá-lo zpool online -e
, não consegui fazer com que o pool se expandisse. Estou certo de que o vdev é maior porque fdisk
mostra que aumentou de 215GiB para 250 GiB. Aqui está uma amostra do que eu fiz:
[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
Como posso expandir esse zpool?
zpool online -e pool vdb
é o comando que faz o truque. Agora estou usando ZFS-on-Linux em um número de servidores libvirt e que funciona para mim (sem partprobe)