nix/os/devices/disk: try lazy unmount
This commit is contained in:
parent
105945ed30
commit
6bea703f6d
1 changed files with 3 additions and 3 deletions
|
@ -28,11 +28,11 @@ in rec {
|
||||||
|
|
||||||
diskUmount = pkgs.writeScript "script" ''
|
diskUmount = pkgs.writeScript "script" ''
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -xe
|
set -x
|
||||||
sudo umount -R ${mntRootVol}
|
sudo umount -Rl ${mntRootVol}
|
||||||
sudo rmdir ${mntRootVol}
|
sudo rmdir ${mntRootVol}
|
||||||
sudo vgchange -an ${ownLib.disk.volumeGroup diskId}
|
sudo vgchange -an ${ownLib.disk.volumeGroup diskId}
|
||||||
sudo cryptsetup luksClose ${ownLib.disk.luksName diskId}
|
sudo cryptsetup close ${ownLib.disk.luksName diskId}
|
||||||
sync
|
sync
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue