On Fri, Jan 8, 2021 at 9:59 AM Chris Murphy <lists@xxxxxxxxxxxxxxxxx> wrote: > > Sorry I missed you on IRC. No problem. I apologize for hounding you on both IRC and this mailing list. But I don't have any other option, no one knows what to do here. > > The Btrfs dev has been doing this with a devel branch, it's not in the > released version of btrfs-progs yet. And it needed further enhancement > for this case, because a whole bunch of writes in a commit just didn't > get to stable media. This fsck enhancement is still being tested, but > should be ready soon, and when it is I'll get it built in copr. > Ok, I am confused. Is there an fsck fix available for my problem ? Can my filesystem be fixed? Or do I have to erase everything and do a reinstall ? Also is the fix for my particular problem being worked on by the devs at the particular moment ? Are we living that close to the edge ? > > Try adding -i and remove -D. The -D means files aren't restored. And > -m and -x require files to be restored first or you get additional > errors. > Yeah I just wanted to see what happens in the dry run. > However, note that the -s option restores the contents of all > snapshots, and puts them into directories as independent (not deduped) > files in the restore destination. So if you have a file in 50 > snapshots, that file gets replicated 50 times. So while you get all > your files out of the snapshots, it's not really putting Humpty Dumpty > back together again in terms of the original organization. I did not know that. I guess that makes sense since snapshot subvolumes don't make much sense outside the context of BTRFS. > > You might prefer just getting all the files out of a particular > snapshot. That's the -r option. But *sigh* it only takes subvolids. > Since you can't mount, you can't use 'btrfs sub list' to get a listing > of names to ids. There is another way to do it: > > sudo btrfs inspect-internal dump-tree -t 1 /dev/sdXY | grep -A1 'ROOT_REF' > > That'll produce something like this, maybe many lines if you have many > snapshots. > > item 4 key (FS_TREE ROOT_REF 268) itemoff 14921 itemsize 28 > root ref key dirid 256 sequence 5 name home > item 5 key (FS_TREE ROOT_REF 525) itemoff 14899 itemsize 22 > root ref key dirid 256 sequence 33 name root > > Above, the first item is the subvolume "home" and its ID is 268. The > second is the subvolume "root" and its ID is 525. Snapshots appear in > this same list with the same scheme. If I want to pull out just the > files in "home" I do this: > > # btrfs restore -v -i -r 268 /dev/sdXY /path/to/restore/to > I will try this out. > You could add -x -m to this if you want. > Wait didn't you just say -x and -m will give errors. I don't understand what you mean by "-m and -x require files to be restored first or you get additional errors." > There is more here, in case I'm not around again, but hopefully we'll > figure out an overlap time on IRC. > https://btrfs.wiki.kernel.org/index.php/Restore > If you want I am available on US time but only if you let me know in advance. -- Regards, Sreyan Chakravarty _______________________________________________ users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx