dyne / tomb

the Crypto Undertaker
https://dyne.org/software/tomb
GNU General Public License v3.0
1.32k stars 150 forks source link

btrfs on small tombs #448

Closed chri2 closed 1 year ago

chri2 commented 1 year ago

Using --filesystem btrfs it's possible to format the tomb using btrfs. This results in an error if the resulting disk size of the loopback device is not at least 45MB.

For resulting sizes of the loopback device between 16MB and 45MB when using btrfs the filesystem could be created in mixed mode automatically.

Small sizes are typically used with pass-tomb.

Using pass-tomb with the git functionality offered by pass users run into the issue that on an ext4 formatted tomb of the pass standard size of 10MB they run out of inodes (only 2048 with the default values used for ext4).

This could be avoided by using btrfs in pass-tomb. A pass-tomb with a minimum size of 45MB makes syncing somewhat less effective if the closed tomb is supposed to be synced whereas 16MB for the gain in functionality wouldn't look too bad for me.

I successfully formatted a 30MB tomb used by pass-tomb using mkfs.btrfs -M and am using it. It seems to work fine.

jaromil commented 1 year ago

@chri2 hi again @chri2 !! you are very welcome to produce a PR for this, sounds useful and we love pass-tom. thanks!!

jaromil commented 1 year ago

Fixed in #450 - planning a new 2.10.0 release to include that and facilitate pass-tomb.