Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I had a 4-disk mdraid of 8.12TB with zfsonlinux's ZFS:

# zpool status
  pool: tank
 state: ONLINE
  scan: none requested

    NAME                  STATE     READ WRITE CKSUM
    tank                  ONLINE       0     0     0
      md-name-ubuntu:md2  ONLINE       0     0     0

To which I added two more disks:

# mdadm --add /dev/md2 /dev/sde /dev/sdf
# mdadm --grow /dev/md2 -n 6

This finished successfully:

# mdadm --detail /dev/md2
        Version : 1.2
  Creation Time : Thu Jan 16 01:53:23 2014
     Raid Level : raid5
     Array Size : 14597903360 (13921.65 GiB 14948.25 GB)
  Used Dev Size : 2919580672 (2784.33 GiB 2989.65 GB)
   Raid Devices : 6
  Total Devices : 6
    Persistence : Superblock is persistent

During resizing, the ZFS was unmounted but not exported. It still reports its old size:

# zpool list
tank  8.12T  7.78T   349G    95%  1.04x  ONLINE  -

Now I tried each of these steps to expand it, all of which somebody somewhere claimed would work:

# zpool set autoexpand=on
# zpool export tank
# zpool import tank

Did nothing.

# zpool export tank
# zpool import -o autoexpand=on tank

Did nothing.

# zpool export tank
# zpool import -o expand=on tank

Did nothing.

# zpool online -e tank md-name-ubuntu:md2

Did nothing. It's not a problem with the weird name either, I also tried

# zpool export tank
# zpool import -d /dev/ tank
# zpool online -e tank md2

Except, a few minutes later as I'm writing this post, the partition table seems to have been updated (no idea which of the commands I tried caused this)

# gdisk -l /dev/md2
Found valid GPT with protective MBR; using GPT.
Disk /dev/md2: 29195806720 sectors, 13.6 TiB

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048     29195788287   13.6 TiB    BF01  zfs
   9     29195788288     29195804671   8.0 MiB     BF07

Still no change here though:

# zpool list
tank  8.12T  7.78T   349G    95%  1.04x  ONLINE  -

Does the resizing take a while? I can't see anything reporting an ongoing operation.

The relevant zfsonlinux issue has been resolved two years ago (notice the comment claiming two of the methods I failed with here worked).

Using zfsutils zfs-dkms Version: 0.6.2-1~saucy

share|improve this question

1 Answer 1

up vote 1 down vote accepted

You will need to either unload the ZFS module and reinsert it or just reboot.

Following that, you can run zpool online -e devicename and see the new zpool size.

However, I should add that I often use ZFS atop hardware RAID... But using it on top of MD software RAID doesn't make much sense unless you have some other constraints.

share|improve this answer
I would have used raidz, if it had allowed me to resize the array... –  pascal Jan 25 at 0:48
so: zpool export; modprobe -r zfs; modprobe zfs; zpool import; zpool online -e tank md2 didn't change anything either –  pascal Jan 25 at 0:51
Reboot your system. –  ewwhite Jan 25 at 1:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.