fix(backups/RemoteAdapter#_getPartition): mount with norecovery option

This commit is contained in:
Julien Fontanet 2022-09-15 11:06:59 +02:00
parent 8fd10bace7
commit ad02700b51
2 changed files with 4 additions and 2 deletions

View File

@ -128,7 +128,9 @@ class RemoteAdapter {
}
async *_getPartition(devicePath, partition) {
const options = ['loop', 'ro']
// the norecovery option is necessary because if the partition is dirty,
// mount will try to fix it which is impossible if because the device is read-only
const options = ['loop', 'ro', 'norecovery']
if (partition !== undefined) {
const { size, start } = partition

View File

@ -89,7 +89,7 @@ When logical volume no longer necessary:
```
> mkdir /tmp/block-mount
> mount --options=loop,ro,offset=$(($START * 512)),sizelimit=$(($SIZE)) --source=/tmp/vhd-mount/vhdi2 --target=/tmp/block-mount
> mount --options=loop,ro,norecovery,offset=$(($START * 512)),sizelimit=$(($SIZE)) --source=/tmp/vhd-mount/vhdi2 --target=/tmp/block-mount
> ls /tmp/block-mount
bin boot dev etc home lib lib64 lost+found media mnt opt proc root run sbin srv sys @System.solv tmp usr var
```