You are not logged in.
So my arch system was installed on btrfs as recommended with root as a subvolume. I kept it simple and only had one root subvolume (nothing seperate for /home and the like).
I have taken a few snapshots by mounting the btrfs root (subvolid=0) and then running this simple command "btrfs subvolume snapshot archroot archroot_snapshot_`date +%F`".
Now today, I deleted a lot of stuff on my arch install such as /var and /home and completely messed it up so it would not boot. Then in recovery I set one of the snapshots to be default and made sure the kernel boot lines in grub used that snapshot subvolume. Booted into it and to my surprise it had many failed services on boot. The snapshot should have been a working snapshot. I found that /var was now empty and upon checking all the other snapshots which were not even touched, they all had an empty /var as well.
Does anyone know what I did wrong and why /var was apparently erased in all snapshots when I removed it in the original? My understanding was that snapshots should not be effected by any other snapshots.
Last edited by xamindar (2015-02-17 19:28:54)
Offline
Not a Sysadmin issue, moving to NC...
Offline
This does indeed sound weird. Can you check `btrfs subvolume list /` to make sure you only have the snapshots as subvolumes?
Offline
This does indeed sound weird. Can you check `btrfs subvolume list /` to make sure you only have the snapshots as subvolumes?
I am already reinstalling it fresh but to answer your question, 'btrfs subvolume list /mnt/btrfs' did list all the snapshots as subvolumes (mnt/btrfs is where I mounted the root of btrfs when making snapshots).
EDIT: I think I had tried to change the default subvolume as well which I was not supposed to do. Would that have caused this somehow?
Last edited by xamindar (2015-02-18 01:27:42)
Offline
It seems like /var was either on another partition; or was actually a subvolume itself. Since snapshots are 'non-recursive' (they don't snapshot other subvolumes that you mounted) it would explain your issue. The fact that 'subvoilume list' lists the snapshots is obvious, but are you sure it didn't list other subvolume (such as /var) as well?
Offline
It seems like /var was either on another partition; or was actually a subvolume itself. Since snapshots are 'non-recursive' (they don't snapshot other subvolumes that you mounted) it would explain your issue. The fact that 'subvoilume list' lists the snapshots is obvious, but are you sure it didn't list other subvolume (such as /var) as well?
So if I had the root subvolume as "archroot" and another subvolume under that as "archroot/var", this would explain my issue. Any snapshotting of "archroot" would not include the var subvolume under the archroot subvolume. Did I understand that right?
That is a possibility. It was my first time using btrfs and any snapshotting type filesystem so it is possible I may have created another subvolume for var in my testing.
Thanks for the explanation.
Offline