B-tree file system (btrfs) Snapper config not found
This document (7012012) is provided subject to the disclaimer at the end of this document.
Environment
B-tree Filesystem (btrfs)
Situation
# snapper list-configs
Config | Subvolume
-------+------------
bsmall | /bsmall
bbig | /bbig
one | /bbig/one
heart | /bbig/heart
However, /etc/sysconfig/snapper shows: SNAPPER_CONFIGS="bsmall bbig fry one heart". In this case the "fry" configuration is missing.
# ls /etc/snapper/configs
bbig bsmall heart one
Attempting to list the fry configuration fails:
# snapper -c fry list
Config 'fry' not found.
Attempting to create the fry configuration again fails:
# snapper -c fry create-config /bsmall/fry
Creating config failed (config already exists).
The /var/log/snapper.log shows the following errors:
WARNING libsnapper(10649) AsciiFile.cc(AsciiFileReader):55 - open for '/etc/snapper/configs/fry' failed
ERROR libsnapper(10649) Snapper.cc(getConfigs):536 - config 'fry' not found
Resolution
NOTE: In this example the snapper config name we need to restore is "fry"
1. cp /etc/snapper/config-templates/default /etc/snapper/configs/fry
2. Make sure you know which subvolume the "fry" configuration is maintaining. In this case /bsmall/fry is the path.
# btrfs subvolume list /bsmall
ID 256 top level 5 path @
ID 258 top level 5 path @/fry
ID 259 top level 5 path @/.snapshots
ID 260 top level 5 path @/fry/.snapshots
ID 261 top level 5 path @/.snapshots/1/snapshot
ID 262 top level 5 path @/fry/.snapshots/1/snapshot
ID 263 top level 5 path @/.snapshots/2/snapshot
ID 264 top level 5 path @/.snapshots/3/snapshot
ID 265 top level 5 path @/.snapshots/4/snapshot
ID 266 top level 5 path @/fry/.snapshots/2/snapshot
3. Edit /etc/snapper/configs/fry
4. Replace SUBVOLUME="/" with SUBVOLUME="/bsmall/fry"
5. Save and exit /etc/snapper/configs/fry
6. Run snapper list-configs and snapper -c fry list to test.
Cause
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:7012012
- Creation Date: 22-Mar-2013
- Modified Date:03-Mar-2020
-
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com