4

I'm trying to delete a bunch of old ZFS snapshots but I get errors saying that the datasets are busy:

[root@pool-01 ~]# zfs list -t snapshot -o name -S creation | grep ^pool/nfs/public/mydir | xargs -n 1 zfs destroy -vr
will destroy pool/nfs/public/mydir@autosnap_2019-02-24_03:13:17_hourly
will reclaim 408M
cannot destroy snapshot pool/nfs/public/mydir@autosnap_2019-02-24_03:13:17_hourly: dataset is busy
will destroy pool/nfs/public/mydir@autosnap_2019-02-24_02:13:17_hourly
will reclaim 409M
 cannot destroy snapshot pool/nfs/public/mydir@autosnap_2019-02-24_02:13:17_hourly: dataset is busy
will destroy pool/nfs/public/mydir@autosnap_2019-02-24_01:13:18_hourly will reclaim 394M

Running lsof shows no processes accessing these snapshots:

[root@pool-01 ~]# lsof | grep pool/nfs/public/mydir

There also appears to be no holds on any of the snapshots:

[root@pool-01 ~]# zfs holds pool/nfs/public/mydir@autosnap_2019-02-24_03:13:17_hourly
NAME                                                              TAG  TIMESTAMP

Is there anything else I should look out for? Anything else I can do besides a reoot?

1

This appears to be unintended behavior on ZoL, I left the ZFS box alone for a few days and finally gave up and rebooted the said box, and I was able to destroy those snapshots after reboot.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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