2

The ZFS dump device is used only for debugging problems. In this case, I have decided the risk vs reward is such that I should delete the dump device to make room for other storage.

I am able to disable save-core (copy from dump device to /var/crash) using dumpadm -n, but when I run zfs destroy rpool/dump, I still get
cannot destroy 'rpool/dump': dataset is busy, indicating that dumpadm -n was insufficient.

How can I disable and remove this dedicated dump device?

700 Software
  • 2,233
  • 10
  • 49
  • 77

3 Answers3

2

Specify another location for dumpadm to use crash dumps instead of just disabling them.

dumpadm -d swap

Source: http://comments.gmane.org/gmane.os.solaris.opensolaris.zfs/19529

notpeter
  • 3,515
  • 2
  • 26
  • 44
  • This won't work for me because I removed the swap device to save disk space. There was so much free RAM that swap could not have improved performance. – 700 Software Apr 22 '13 at 20:24
  • I haven't tried this myself, but if you read the link it suggest that even you don't have a suitable swap device, telling it to use swap will set it to 'none' so it's no longer using your dump device. Can't hurt to try. – notpeter Apr 26 '13 at 02:36
  • I already tried. It didn't work. – 700 Software Apr 26 '13 at 12:47
  • 1
    Since you're just trying to reclaim the space, can you resize the dump volume to something silly small like `zfs set volsize=1M rpool/dump`? – notpeter Apr 26 '13 at 16:50
  • Yep. That silly solution seems to be the best I can do. – 700 Software Apr 26 '13 at 20:59
  • If 1M doesn't work (out of space), try a larger value like 8M, which worked for me on OmniOS/Illumos. – 700 Software Jan 29 '17 at 01:51
0

According to: http://www.en.sysadmin-cookbook.net/zfs/#toc-gen-14

zdb -d tank | grep rpool/dump

and now zfs destroy found datasets.

  • I might give it a try next time I'm working on a staging server, but at first glance it looks like the linked page is solving `dataset already exists`, while my question is about `dataset is busy`. So maybe it will work and maybe it won't... – 700 Software Jun 11 '14 at 21:57
  • This looks like a very helpful command. I have an idea on how `zdb` could make my reporting scripts more accurate. – 700 Software Jun 11 '14 at 21:59
  • Doesn't seem to work. No results output from the command. – 700 Software Dec 03 '14 at 01:37
0

Create a new ZFS volume something like:

zfs create -V 2G rpool/dump1

Using the dumpadm utility change the directory to rpool/dump1, e.g.:

dumpadm -d /dev/zvol/dsk/rpool/dump1

Then you can destroy the rpool/dump without any issues.

zfs destroy rpool/dump

Hope this helps to resize your dump devices or destroy dump devices without dataset busy error.

kenorb
  • 6,499
  • 2
  • 46
  • 54