1ca01d6ddSTony LuckWhere: /dev/pstore/... 2366f7e7aSLuck, TonyDate: March 2011 3366f7e7aSLuck, TonyKernel Version: 2.6.39 4ca01d6ddSTony LuckContact: tony.luck@intel.com 5ca01d6ddSTony LuckDescription: Generic interface to platform dependent persistent storage. 6ca01d6ddSTony Luck 7ca01d6ddSTony Luck Platforms that provide a mechanism to preserve some data 8ca01d6ddSTony Luck across system reboots can register with this driver to 9ca01d6ddSTony Luck provide a generic interface to show records captured in 10ca01d6ddSTony Luck the dying moments. In the case of a panic the last part 11ca01d6ddSTony Luck of the console log is captured, but other interesting 12ca01d6ddSTony Luck data can also be saved. 13ca01d6ddSTony Luck 14366f7e7aSLuck, Tony # mount -t pstore -o kmsg_bytes=8000 - /dev/pstore 15ca01d6ddSTony Luck 16ca01d6ddSTony Luck $ ls -l /dev/pstore 17ca01d6ddSTony Luck total 0 18ca01d6ddSTony Luck -r--r--r-- 1 root root 7896 Nov 30 15:38 dmesg-erst-1 19ca01d6ddSTony Luck 20ca01d6ddSTony Luck Different users of this interface will result in different 21ca01d6ddSTony Luck filename prefixes. Currently two are defined: 22ca01d6ddSTony Luck 23ca01d6ddSTony Luck "dmesg" - saved console log 24ca01d6ddSTony Luck "mce" - architecture dependent data from fatal h/w error 25ca01d6ddSTony Luck 26ca01d6ddSTony Luck Once the information in a file has been read, removing 27ca01d6ddSTony Luck the file will signal to the underlying persistent storage 28ca01d6ddSTony Luck device that it can reclaim the space for later re-use. 29ca01d6ddSTony Luck 30ca01d6ddSTony Luck $ rm /dev/pstore/dmesg-erst-1 31ca01d6ddSTony Luck 32ca01d6ddSTony Luck The expectation is that all files in /dev/pstore 33ca01d6ddSTony Luck will be saved elsewhere and erased from persistent store 34ca01d6ddSTony Luck soon after boot to free up space ready for the next 35ca01d6ddSTony Luck catastrophe. 36366f7e7aSLuck, Tony 37366f7e7aSLuck, Tony The 'kmsg_bytes' mount option changes the target amount of 38366f7e7aSLuck, Tony data saved on each oops/panic. Pstore saves (possibly 39366f7e7aSLuck, Tony multiple) files based on the record size of the underlying 40366f7e7aSLuck, Tony persistent storage until at least this amount is reached. 41366f7e7aSLuck, Tony Default is 10 Kbytes. 42*dee28e72SMatthew Garrett 43*dee28e72SMatthew Garrett Pstore only supports one backend at a time. If multiple 44*dee28e72SMatthew Garrett backends are available, the preferred backend may be 45*dee28e72SMatthew Garrett set by passing the pstore.backend= argument to the kernel at 46*dee28e72SMatthew Garrett boot time. 47*dee28e72SMatthew Garrett 48