Is there an option in /etc/exports
that I need to enable for that drive to be removable?
I currently have this:
/media/veracrypt1 192.168.122.0/24(rw,sync,no_root_squash,subtree_check,crossmnt)
$ sudo cryptsetup --debug luksClose veracrypt1
# cryptsetup 2.6.1 processing "cryptsetup --debug luksClose veracrypt1"
# Verifying parameters for command close.
# Running command close.
# Installing SIGINT/SIGTERM handler.
# Unblocking interruption on signal.
# Allocating crypt device context by device veracrypt1.
# Initialising device-mapper backend library.
# dm version [ opencount flush ] [16384] (*1)
# dm versions [ opencount flush ] [16384] (*1)
# Detected dm-ioctl version 4.47.0.
# Detected dm-crypt version 1.24.0.
# Device-mapper backend running with UDEV support enabled.
# dm status veracrypt1 [ opencount noflush ] [16384] (*1)
# Releasing device-mapper backend.
# Trying to open and read device /dev/mapper/veracrypt1_0 with direct-io.
# Trying to open device /dev/mapper/veracrypt1_0 without direct-io.
# Allocating context for crypt device /dev/mapper/veracrypt1_0.
# Trying to open and read device /dev/mapper/veracrypt1_0 with direct-io.
# Trying to open device /dev/mapper/veracrypt1_0 without direct-io.
# Initialising device-mapper backend library.
# Active device has no UUID set, some parameters are not set.
# dm versions [ opencount flush ] [16384] (*1)
# dm table veracrypt1 [ opencount flush securedata ] [16384] (*1)
# dm status (253:1) [ opencount noflush ] [16384] (*1)
# Trying to open and read device /dev/mapper/veracrypt1_0 with direct-io.
# Trying to open device /dev/mapper/veracrypt1_0 without direct-io.
# Deactivating volume veracrypt1.
# dm versions [ opencount flush ] [16384] (*1)
# dm status veracrypt1 [ opencount noflush ] [16384] (*1)
# dm versions [ opencount flush ] [16384] (*1)
# dm table veracrypt1 [ opencount flush securedata ] [16384] (*1)
# dm status (253:1) [ opencount noflush ] [16384] (*1)
# Trying to open and read device /dev/mapper/veracrypt1_0 with direct-io.
# Trying to open device /dev/mapper/veracrypt1_0 without direct-io.
Device veracrypt1 is still in use.
# Releasing crypt device /dev/mapper/veracrypt1_0 context.
# Releasing device-mapper backend.
Command failed with code -5 (device already exists or device is busy).
After stopping nfs-server
and nfs-kernel-server
:
$ sudo cryptsetup --debug close veracrypt1
# cryptsetup 2.6.1 processing "cryptsetup --debug close veracrypt1"
# Verifying parameters for command close.
# Running command close.
# Installing SIGINT/SIGTERM handler.
# Unblocking interruption on signal.
# Allocating crypt device context by device veracrypt1.
# Initialising device-mapper backend library.
# dm version [ opencount flush ] [16384] (*1)
# dm versions [ opencount flush ] [16384] (*1)
# Detected dm-ioctl version 4.47.0.
# Detected dm-crypt version 1.24.0.
# Device-mapper backend running with UDEV support enabled.
# dm status veracrypt1 [ opencount noflush ] [16384] (*1)
# Releasing device-mapper backend.
# Trying to open and read device /dev/mapper/veracrypt1_0 with direct-io.
# Trying to open device /dev/mapper/veracrypt1_0 without direct-io.
# Allocating context for crypt device /dev/mapper/veracrypt1_0.
# Trying to open and read device /dev/mapper/veracrypt1_0 with direct-io.
# Trying to open device /dev/mapper/veracrypt1_0 without direct-io.
# Initialising device-mapper backend library.
# Active device has no UUID set, some parameters are not set.
# dm versions [ opencount flush ] [16384] (*1)
# dm table veracrypt1 [ opencount flush securedata ] [16384] (*1)
# dm status (253:1) [ opencount noflush ] [16384] (*1)
# Trying to open and read device /dev/mapper/veracrypt1_0 with direct-io.
# Trying to open device /dev/mapper/veracrypt1_0 without direct-io.
# Deactivating volume veracrypt1.
# dm versions [ opencount flush ] [16384] (*1)
# dm status veracrypt1 [ opencount noflush ] [16384] (*1)
# dm versions [ opencount flush ] [16384] (*1)
# dm table veracrypt1 [ opencount flush securedata ] [16384] (*1)
# dm status (253:1) [ opencount noflush ] [16384] (*1)
# Trying to open and read device /dev/mapper/veracrypt1_0 with direct-io.
# Trying to open device /dev/mapper/veracrypt1_0 without direct-io.
# dm versions [ opencount flush ] [16384] (*1)
# Udev cookie 0xd4dcb49 (semid 65574) created
# Udev cookie 0xd4dcb49 (semid 65574) incremented to 1
# Udev cookie 0xd4dcb49 (semid 65574) incremented to 2
# Udev cookie 0xd4dcb49 (semid 65574) assigned to REMOVE task(2) with flags DISABLE_LIBRARY_FALLBACK (0x20)
# dm remove veracrypt1 [ opencount flush retryremove ] [16384] (*1)
# Udev cookie 0xd4dcb49 (semid 65574) decremented to 0
# Udev cookie 0xd4dcb49 (semid 65574) waiting for zero
# Udev cookie 0xd4dcb49 (semid 65574) destroyed
# Releasing crypt device /dev/mapper/veracrypt1_0 context.
# Releasing device-mapper backend.
Command successful.