zpool import hangs when out of space - Was: zfs pool import hangs on [tx->tx_sync_done_cv]

Mark Martinec Mark.Martinec+freebsd at ijs.si
Tue Oct 14 11:27:00 UTC 2014


On 10/14/2014 10:14, Steven Hartland wrote:

>>> Yer zfs list only shows around 2-3GB used too but zpool list
>>> shows the pool is out of space. Cant rule out an accounting
>>> issue though.
>>
>> What is using the extra space in the pool? Is there an unmounted
>> dataset or snapshot? Do you know how to easily tell? Unlike txg and
>> zio processing I don't have the luxury of having just read that part
>> of the codebase.
>
> Its not clear but I believe it could just be fragmention even though
> its ashift=9.
>
> I sent the last snapshot to another pool of the same size and it
> resulted in:
> NAME       SIZE  ALLOC   FREE   FRAG  EXPANDSZ    CAP  DEDUP  HEALTH
> ALTROOT
> sys1boot  3.97G  3.97G   190K     0%         -    99%  1.00x  ONLINE  -
> sys1copy  3.97G  3.47G   512M    72%         -    87%  1.00x  ONLINE  -

Yes, that's it! Fragmentation.

> I believe FRAG is 0% as the feature wasn't enabled for the lifetime of
> the pool hence its simply not showing a valid value.

Indeed. The pool has a long lifetime and the feature was only recently
made available.

> zfs list -t all -r sys1boot
> NAME                                  USED  AVAIL  REFER  MOUNTPOINT
> sys1boot                             1.76G  2.08G    11K  /sys1boot
> sys1boot/ROOT                        1.72G  2.08G  1.20G  /sys1boot/ROOT
> sys1boot/ROOT at auto-2014-08-16_04.00     1K      -  1.19G  -
> sys1boot/ROOT at auto-2014-08-17_04.00     1K      -  1.19G  -
> sys1boot/ROOT at auto-2014-08-19_04.00     1K      -  1.19G  -
 > [...]
> sys1boot/ROOT at auto-2014-09-19_22.20     1K      -  1.20G  -
> sys1boot/ROOT at auto-2014-09-19_22.30      0      -  1.20G  -

So snapshots were not consuming much, it was fragmentation.

Thanks!
   Mark



More information about the freebsd-stable mailing list