Re: Looking for confirmation as I enter the acceptance stage. -- SOLVED
Michael Kjörling <[email protected]> Fri, 28 Jul 2023 18:50:03 +0000
| Newsgroups | dev.linux.lists.cryptsetup |
|---|---|
| Message-ID | <[email protected]> |
On 28 Jul 2023 11:23 -0400, from [email protected] (blobfish): > Anyway, I have made it through and have successfully mounted my filesystem! > First look through an looks good. Congratulations! > just a little more hand holding, I promise: > should I get btrfs involved before the copy? like: > btrfs check > btrfs check --repair > as far as the copy I was just going to 'cp -avr'. Is there a better command > for what I am doing? I'm only superficially familiar with Btrfs, so do take this with a pitcher of salt, but if it's similar to ZFS (on which I believe much of its behavior was initially modeled) in this regard, simply reading each file in full should be sufficient to know that they are uncorrupted, and should get you repaired data if something is corrupted but repairable. Therefore a prior file system check shouldn't be necessary. I would suggest using something like `rsync -aAHX` (see the rsync man page; you may or may not want -S as well) to get as accurate a copy as possible along with restartability, but really, whichever file copying tool feels good to you is probably good enough. Redirect its stderr to a file so that once the copying finishes you'll hopefully have a list of any files which couldn't be copied and you can decide on a case-by-case basis what to do with those. Once the copying finishes you _can_ run a check (on the copy that you're copying from) if you want to and then re-run the copy to the temporary storage (this is where restartability comes in) to catch anything that the repair caused to become visible. I don't know whether or not that will actually be meaningful or useful. Then once you're through all that and have confirmed that everything is working as it should, don't forget to set up for backups going forward. :-) I'm taking the liberty of adding SOLVED to the subject line since you're now in a position that you can access the file system within the container. Any further questions will probably be more along the lines of how to deal with the Btrfs file system within, which is off topic on the cryptsetup mailing list. -- Michael Kjörling 🔗 https://michael.kjorling.se “Remember when, on the Internet, nobody cared that you were a dog?”