Comments (8)
  • Add a Comment
  • Edit
  • More Actions v
  • Quarantine this Entry

1 cggibbo commented Permalink

Nice write up Anthony. Now, I wonder if there is a way to remove a dump? Just say my system dumped and I'd like to remove the dump from the dump LV. How can I do this? <div>&nbsp;</div> l488pp020_pub[/var/adm/ras] &gt; sysdumpdev -L <br /> 0453-039 <div>&nbsp;</div> Device name: /dev/lg_dumplv <br /> Major device number: 10 <br /> Minor device number: 11 <br /> Size: 281851392 bytes <br /> Uncompressed Size: 1619882283 bytes <br /> Date/Time: Mon Dec 12 18:43:25 CST 2011 <br /> Dump status: 0 <br /> Type of dump: traditional <br /> dump completed successfully <br /> Dump copy filename: /var/adm/ras/vmcore.2.BZ <div>&nbsp;</div> I've not found a way to do this.....other than rebooting the LPAR! <div>&nbsp;</div> Cheers. <div>&nbsp;</div> Chris

2 AnthonyEnglish commented Permalink

I haven't tried removing a dump, Chris, but I take it that rm fails and fuser -u points to some dump process. Have you tried setting the dump device to /dev/sysdumpnull, or even pointing to a new directory for the system dump temporarily?

3 cggibbo commented Permalink

I have tried both approaches but with no joy. <div>&nbsp;</div> The reason I ask is that I've worked with some customers that found that /tmp was filling whenever their daily snap script was run. The capture of a previous dump image was taking up a lot of space in /tmp. They wanted to know if there was an official way of clearing a dump image (apart from rebooting). <div>&nbsp;</div> Eventually I came up with my own "method". Completely unsupported and ugly! :) If are you interested, I'll send you my notes.

4 AnthonyEnglish commented Permalink

If I'm understanding it correctly, then even if you can remove the dump copy in /var/adm/ras, you still get the dump copied from the primary dump device. <div>&nbsp;</div> Is the file in /tmp produced by the snap command? If so, they could always use snap without the -D option (or -a), so as not to collect a previous dump. For that matter, as you know, snap has an option to use an alternate directory (-d) where you might have more space, and it also has a cleanup option (-r). I take it you've tried this: <br /> # Disable dump <br /> sysdumpdev -Pp/dev/sysdumpnull <br /> # run snap script <br /> # Enable dump device again <div>&nbsp;</div> I looked in /etc/rc to find out what the reboot does to clear the dump device, but I couldn't see anything helpful. <div>&nbsp;</div> As for your "ugly" workaround I'd love to see it, but then I'll bet a few readers would as well! How about you send it just to me and you can decide whether it is better to leave readers to die of curiosity or to scandalise them by showing them something ugly. I think I prefer the curiosity - there's too much ugliness in the world already. <br />

5 cggibbo commented Permalink

Thanks for the suggestions. <div>&nbsp;</div> And yes, redirecting the dump devices to sysdumpnull doesn't help. <div>&nbsp;</div> snap -a collects dump information. They would rather not re-engineer their snap script or redirect the snap to a location other than /tmp.

6 AnthonyEnglish commented Permalink

Fair enough. I would never change a standard AIX command such as snap. There are other workarounds you could use, such as reducing the dump LV size to something small and creating a small dump (even if it fails), but they're just ugly. <div>&nbsp;</div> Wouldn't it be nice if the sysdumpdev command had a flag to clear the last dump?

7 cggibbo commented Permalink

That's what I was thinking. Although it does appear to be a fairly simple thing to implement....I wonder if there are valid reasons why this hasn't been introduced in the past?

8 AnthonyEnglish commented Permalink

I see on AIX 7.1 the sysdumpdev command has a flag (-z) which determines if a new dump is present. If there is a new dump, it shows the size of it. No new dump returns nothing. But most interestingly, the documentation says: <div>&nbsp;</div> After the sysdumpdev -z command is run on an existing system dump, the dump will no longer be considered recent. <div>&nbsp;</div> <div>&nbsp;</div> Would that have the desired effect of not capturing the latest dump in the snap command? Should be easy to test.