recently I realized that the snapshots of my NextCloudPi are not working anmyore. When I try to create a snapshot manually by running sudo ncp-config and navigating to BACKUPS -> nc-snapshot, the resulting error message says something about a bus error and such:
Running nc-snapshot
Maintenance mode enabled
Nextcloud is in maintenance mode - no apps have been loaded
/usr/local/bin/btrfs-snp: line 18: 31247 Bus error btrfs subvolume show "$DIR" &> /dev/null
/media/myCloudDrive/ncdata is not a BTRFS mountpoint or snapshot
Maintenance mode disabled
Done. Press any key...
… where “$DIR” is /media/myCloudDrive/ncdata because the hourly cron file looks like:
… /dev/sda1 is the btrfs partition mounted as volume /media/myCloudDrive where ALL THE data lies.
And this is the output of /var/log/ncp.log when I try to take a new snapshot:
[ nc-snapshot ] (Fr 12. Feb 21:00:11 CET 2021)
Maintenance mode enabled
Nextcloud is in maintenance mode - no apps have been loaded
/usr/local/bin/btrfs-snp: line 18: 19295 Bus error btrfs subvolume show "$DIR" &> /dev/null
/media/myCloudDrive/ncdata is not a BTRFS mountpoint or snapshot
Maintenance mode disabled
This is interesting. Here you can see the snapshots stopped working in January, which I can confirm. However, I can’t tell what could have happened back then.
$ sudo btrfs subvolume list /media/myCloudDrive
ID 257 gen 143234 top level 5 path ncdata
ID 7197 gen 53778 top level 5 path ncp-snapshots/monthly_2020-02-05_191702
ID 7889 gen 57954 top level 5 path ncp-snapshots/monthly_2020-03-06_191703
ID 8609 gen 64527 top level 5 path ncp-snapshots/monthly_2020-04-05_211702
ID 9413 gen 73822 top level 5 path ncp-snapshots/monthly_2020-05-05_211702
ID 10106 gen 81519 top level 5 path ncp-snapshots/monthly_2020-06-04_211702
ID 10815 gen 89768 top level 5 path ncp-snapshots/monthly_2020-07-04_211702
ID 11502 gen 96810 top level 5 path ncp-snapshots/monthly_2020-08-03_211702
ID 12240 gen 104060 top level 5 path ncp-snapshots/monthly_2020-09-02_211702
ID 12941 gen 109928 top level 5 path ncp-snapshots/monthly_2020-10-02_211702
ID 13646 gen 116768 top level 5 path ncp-snapshots/monthly_2020-11-01_201703
ID 14533 gen 125126 top level 5 path ncp-snapshots/monthly_2020-12-01_211702
ID 15232 gen 133044 top level 5 path ncp-snapshots/weekly_2020-12-27_081702
ID 15342 gen 134290 top level 5 path ncp-snapshots/monthly_2020-12-31_221702
ID 15402 gen 134744 top level 5 path ncp-snapshots/weekly_2021-01-03_081702
ID 15569 gen 135987 top level 5 path ncp-snapshots/weekly_2021-01-10_081702
ID 15906 gen 138019 top level 5 path ncp-snapshots/weekly_2021-01-17_081702
Addendum: Maybe I do remember what happened in January… Back then I tried to sync data that would have exceeded 1 TB. So, my cloud was full and could not sync data anymore. I didn’t know what to do. Although, I deleted the data I wanted to be synced, the space would not free up automatically, because it was taken by the snapshots made during running full, I suppose.
That’s why I decided to delete some of the newest snapshots until enough free space was available again for the cloud to work again. The commands I used to free up space (I googled them, because I’m no btrfs expert) were: