I've set up a file server several months ago using the click-to-deploy method on Google Cloud Launcher (https://cloud.google.com/launcher/docs/single-node-fileserver). This created a ZFS server in a VM and a 500 GB persistent disk.
I have updated the size of the disk using the GUI (to 1 TB). Now I'd like to grow this disk on the file server, but I can't manage to get it working.
Here is my config:
$ sudo lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 10G 0 disk
└─sda1 8:1 0 10G 0 part /
sdb 8:16 0 1000G 0 disk
├─sdb1 8:17 0 500G 0 part
└─sdb9 8:25 0 8M 0 part
I tried to use resize2fs
on both the disk and first partition but it shows an error:
$ sudo resize2fs /dev/sdb
resize2fs 1.42.12 (29-Aug-2014)
resize2fs: Device or resource busy while trying to open /dev/sdb
Couldn't find valid filesystem superblock.
$ sudo resize2fs /dev/sdb1
resize2fs 1.42.12 (29-Aug-2014)
resize2fs: Device or resource busy while trying to open /dev/sdb1
Couldn't find valid filesystem superblock.
The zpool
is configured to have an autoexpand=ON
and I have tried to reboot the VM several times but it's still not working:
$ sudo zpool list
NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
data 496G 478G 18.2G - 72% 96% 1.00x ONLINE -
However, when I type fdisk -l
it seems that the sdb1 partition is 1000GB:
$ sudo fdisk -l
Disk /dev/sdb: 1000 GiB, 1073741824000 bytes, 2097152000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 07109AC6-344C-4641-95AD-2B14EA1A24F8
Device Start End Sectors Size Type
/dev/sdb1 2048 2097133567 2097131520 1000G Solaris /usr & Apple ZFS
/dev/sdb9 2097133568 2097149951 16384 8M Solaris reserved 1
Disk /dev/sda: 10 GiB, 10737418240 bytes, 20971520 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xac97f178
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 4096 20971519 20967424 10G 83 Linux
Is there anybody that can help me?
(I should add that I am not a professional sysadmin and that took me several hours to get there :/ )
EDIT
The status of zpool
:
$ sudo zpool status
pool: data
state: ONLINE
scan: none requested
config:
NAME STATE READ WRITE CKSUM
data ONLINE 0 0 0
sdb ONLINE 0 0 0
errors: No known data errors