162306a36Sopenharmony_ciWhat: /sys/fs/pstore/... 262306a36Sopenharmony_ciWhat: /dev/pstore/... 362306a36Sopenharmony_ciDate: March 2011 462306a36Sopenharmony_ciKernelVersion: 2.6.39 562306a36Sopenharmony_ciContact: tony.luck@intel.com 662306a36Sopenharmony_ciDescription: Generic interface to platform dependent persistent storage. 762306a36Sopenharmony_ci 862306a36Sopenharmony_ci Platforms that provide a mechanism to preserve some data 962306a36Sopenharmony_ci across system reboots can register with this driver to 1062306a36Sopenharmony_ci provide a generic interface to show records captured in 1162306a36Sopenharmony_ci the dying moments. In the case of a panic the last part 1262306a36Sopenharmony_ci of the console log is captured, but other interesting 1362306a36Sopenharmony_ci data can also be saved:: 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ci # mount -t pstore -o kmsg_bytes=8000 - /sys/fs/pstore 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ci $ ls -l /sys/fs/pstore/ 1862306a36Sopenharmony_ci total 0 1962306a36Sopenharmony_ci -r--r--r-- 1 root root 7896 Nov 30 15:38 dmesg-erst-1 2062306a36Sopenharmony_ci 2162306a36Sopenharmony_ci Different users of this interface will result in different 2262306a36Sopenharmony_ci filename prefixes. Currently two are defined: 2362306a36Sopenharmony_ci 2462306a36Sopenharmony_ci - "dmesg" - saved console log 2562306a36Sopenharmony_ci - "mce" - architecture dependent data from fatal h/w error 2662306a36Sopenharmony_ci 2762306a36Sopenharmony_ci Once the information in a file has been read, removing 2862306a36Sopenharmony_ci the file will signal to the underlying persistent storage 2962306a36Sopenharmony_ci device that it can reclaim the space for later re-use:: 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_ci $ rm /sys/fs/pstore/dmesg-erst-1 3262306a36Sopenharmony_ci 3362306a36Sopenharmony_ci The expectation is that all files in /sys/fs/pstore/ 3462306a36Sopenharmony_ci will be saved elsewhere and erased from persistent store 3562306a36Sopenharmony_ci soon after boot to free up space ready for the next 3662306a36Sopenharmony_ci catastrophe. 3762306a36Sopenharmony_ci 3862306a36Sopenharmony_ci The 'kmsg_bytes' mount option changes the target amount of 3962306a36Sopenharmony_ci data saved on each oops/panic. Pstore saves (possibly 4062306a36Sopenharmony_ci multiple) files based on the record size of the underlying 4162306a36Sopenharmony_ci persistent storage until at least this amount is reached. 4262306a36Sopenharmony_ci Default is 10 Kbytes. 4362306a36Sopenharmony_ci 4462306a36Sopenharmony_ci Pstore only supports one backend at a time. If multiple 4562306a36Sopenharmony_ci backends are available, the preferred backend may be 4662306a36Sopenharmony_ci set by passing the pstore.backend= argument to the kernel at 4762306a36Sopenharmony_ci boot time. 48