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" ''
|
||||
#!/usr/bin/env bash
|
||||
set -xe
|
||||
sudo umount -R ${mntRootVol}
|
||||
set -x
|
||||
sudo umount -Rl ${mntRootVol}
|
||||
sudo rmdir ${mntRootVol}
|
||||
sudo vgchange -an ${ownLib.disk.volumeGroup diskId}
|
||||
sudo cryptsetup luksClose ${ownLib.disk.luksName diskId}
|
||||
sudo cryptsetup close ${ownLib.disk.luksName diskId}
|
||||
sync
|
||||
'';
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue