The idea of using ZFS to manage process core dumps begs to be expanded to at least crash dumps. This also enters into the realm of Live Upgrade as it eliminates the need to sync potentially a lot of data on activation of a new BE!
Previously I created a ZFS file system in the root pool, and mounted it on /var/cores.
The same purpose would be even better served with a generic ZFS file system which can be mounted on any currently active Live-Upgrade boot environment. The discussion here suggests the use of a ZFS file system rpool/var_shared, mounted under /var/shared. Directories such as /var/crash and /var/cores can then be moved into this shared file system.
So:
/ $ pfexec ksh -o vi |
View my handiwork:
/ $ ls -l /var/shared |
Just to review the current settings for saving crash dumps:
/ $ dumpadm |
Set it to use the new path I made above:
/ $ dumpadm -s /var/shared/crash/`hostname` |
Similarly I update the process core dump settings:
/ $ coreadm -g /var/shared/cores/core.%z.%f.%u.%t |
And finally, some cleaning up:
/ $ zfs destroy rpool/export/cores |
As previously, the above soft link is just in case somewhere there is a naughty script or tool with a hard coded path to /var/crash/`hostname`. I don't expect to find something like that in oficially released Sun software, but I do some times use programs not officially released or supported by Sun.
This makes me wonder what else can I make it do! I'm looking forward to my next Live Upgrade to see how well it preserves my configuration before I attempt to move any of the spool directories from /var to /var/shared!
No comments:
Post a Comment