How to extend ZFS on FreeBSD
zpool set autoexpand=on zroot
Current size:
zpool list
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
zroot 29.5G 24.6G 4.90G - - 52% 83% 1.00x ONLINE -
power off and change VM size 38G -> 48G
gpart show
=> 40 100663223 da0 GPT (48G)
40 1024 1 freebsd-boot (512K)
1064 984 - free - (492K)
2048 16777216 2 freebsd-swap (8.0G)
16779264 62910464 3 freebsd-zfs (30G)
79689728 20973535 - free - (10G)
gpart resize -i 3 /dev/da0
da0p3 resized
gpart show
=> 40 100663223 da0 GPT (48G)
40 1024 1 freebsd-boot (512K)
1064 984 - free - (492K)
2048 16777216 2 freebsd-swap (8.0G)
16779264 83883999 3 freebsd-zfs (40G)
zpool list
NAME SIZE ALLOC FREE CKPOINT EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
zroot 39.5G 24.6G 14.9G - - 39% 62% 1.00x ONLINE -
How to extend ext4 on Ubuntu using LVM (Linux Volume Group)
growpart /dev/sda 1
resize2fs /dev/sda1
partx -u /dev/sda
pvresize /dev/sda3
lvextend -r /dev/ubuntu-vg/ubuntu-lv /dev/sda3