jcoglan / vault

Generates safe passwords so you never need to remember them
https://getvau.lt
471 stars 65 forks source link

[ERROR] EXDEV: cross-device link not permitted, rename '/home/yala/.vault' -> '/tmp/vault-backup-3f000c8d20e6' #41

Open almereyda opened 2 years ago

almereyda commented 2 years ago

When converting a ~/.vault file from the old to the new format, an error is thrown, if separate user directory ZFS datasets or BTRFS subvolumes are used, as default on Ubuntu ZFS and Fedora.

$ vault -c -l 32 credentials

It looks as though your config file (/home/yala/.vault) was created with an old version
of Vault. In order to continue, it needs to be converted to a new format.

Would you like Vault to perform this conversion now? (y/n): y

========================================================================
[INFO] reading input file: /home/yala/.vault
[INFO] attempting to parse the v0.3 file format
[INFO] parsing IV, payload and signature from the file contents
[INFO] checking password
[INFO] deriving an encryption key and signing key
[INFO] checking HMAC signature
[INFO] decrypting file contents
[INFO] creating new storage target: /tmp/vault-convert-57455ddac903
[INFO] wrote setting: /global
[INFO] wrote setting: /services/Schlüsselbund
[INFO] wrote setting: /services/ecobytes-credentials
[INFO] moving old file: /home/yala/.vault -> /tmp/vault-backup-3f000c8d20e6
[ERROR] EXDEV: cross-device link not permitted, rename '/home/yala/.vault' -> '/tmp/vault-backup-3f000c8d20e6'

Pardon, this one is actually about a tmpfs being used for /tmp, and not about user CoW volumes:

$ df -h /tmp
Dateisystem    Größe Benutzt Verf. Verw% Eingehängt auf
tmpfs           7,8G     68K  7,8G    1% /tmp

$ df -h /home/yala
Dateisystem                                           Größe Benutzt Verf. Verw% Eingehängt auf
/dev/mapper/luks-bd0b22d4-b88f-4c0c-be3d-927c1e9ba6f9  953G    801G  151G   85% /home

In cases where a symlink is not available, an "advanced" copying strategy may be preferred.

almereyda commented 2 years ago

This also results in the backup file disappearing, and old versions not being able to use the ~/.vault file anymore.

$ ls /tmp/vault-backup-* | wc -l
zsh: no matches found: /tmp/vault-backup-*
0

$ vault -c -l 32 credentials
EISDIR: illegal operation on a directory, open '/home/yala/.vault'