Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

out of inodes #41

Open
chri2 opened this issue Oct 17, 2022 · 7 comments
Open

out of inodes #41

chri2 opened this issue Oct 17, 2022 · 7 comments

Comments

@chri2
Copy link

chri2 commented Oct 17, 2022

I generated a pass-tomb using the default values and imported the passwords from my firefox and from password safe. I ended up with 936 passwords:

$ find .password-store | wc -l
936

Then I wanted to add git:

$ pass git init
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint: 
hint: 	git config --global init.defaultBranch <name>
hint: 
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint: 
hint: 	git branch -m <name>
Initialized empty Git repository in .password-store/.git/
error: unable to create temporary file: No space left on device
error: unable to create temporary file: No space left on device
error: Error building trees
/usr/bin/pass: line 638: .password-store/.gitattributes: No space left on device
fatal: Unable to create '.password-store/.git/index.lock': No space left on device
error: could not lock config file .git/config: No space left on device
error: could not lock config file .git/config: No space left on device

The filesystem had been generated with 10MB, but with 2048 inodes only.

$ df .password-store
Filesystem                                                                                        1K-blocks  Used Available Use% Mounted on
/dev/mapper/tomb..password.25a458f4b45f7041a9407b6f2d0c1b49bfb3824a0e9e588bddc47fda0c1b87c3.loop9      6844  2170      4102  35% .password-store
$ df -i .password-store
Filesystem                                                                                        Inodes IUsed IFree IUse% Mounted on
/dev/mapper/tomb..password.25a458f4b45f7041a9407b6f2d0c1b49bfb3824a0e9e588bddc47fda0c1b87c3.loop9   2048  2048     0  100% .password-store

Since it is to be expected that there'd be small files in the pass-tomb, I'd suggest to generate the filesystem with a higher count of inodes.

@chri2
Copy link
Author

chri2 commented Oct 17, 2022

Hm, just found out that it is not possible to have more inodes using ext4. Trying btrfs.

Edit: Misinterpreted the man page. It is possible and manually one can format the luks device of the tomb using one inode per block mkfs.ext4 -i 1024 resulting in one inode per 1024 byte, resulting in 8192 inodes in a 10MB tomb.

This is already way better, but tomb doesn't offer any way of setting options for mkfs.ext4 to increase the number of available inodes.

@roddhjav
Copy link
Owner

Just increase the size of the tomb that will increase the number of inodes.

@chri2
Copy link
Author

chri2 commented Oct 17, 2022

Yes, I did that, but found that it would be nice to have the option to use the space. I read that tomb can handle btrfs as well and it seems to work well.

Edit: tomb supports btrfs only on filesystems of 45MB or bigger disk size until know - even though it could be used on a minimum disk size of 16MB in mixed mode.

@chri2
Copy link
Author

chri2 commented Oct 20, 2022

dyne/Tomb#448

@chri2
Copy link
Author

chri2 commented Oct 21, 2022

Would it be a good compromise to improve the situation to make 18MB the default tomb size and have tomb format it with btrfs in mixed mode?

And if the increased tomb size isn't an option would it be an option to add an option to make an btrfs tomb (by default if no size is given as small as possible)?

@roddhjav
Copy link
Owner

roddhjav commented Oct 21, 2022

Yes, both are possible:

  • set the default size to 18MB
  • add an option to make btrfs tomb

PR are welcome

@chri2
Copy link
Author

chri2 commented Oct 29, 2022

O.k., I guess I can build on this MR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants