Here is the situation...
I have established an encypted partition on a drive in my server (Ubuntu 12.04 server) using cryptsetup. It seems to work OK. When I wish to access the partition I invoke the following script on the server via ssh from my PC
Code:
#!/bin/bash
sudo cryptsetup luksOpen /dev/sdb1 sdb1
sudo mount /dev/mapper/sdb1 /crypt
echo Partition Attached - press enter
read nothing
and provided I enter the correct passphrase the contents of the encryped partition appear under /crypt
I have the mount point /crypt exported to my PC, and my PC only with nfs. The line in /etc/exports reads
Quote:
/crypt 192.168.0.112(rw,async,no_root_squash)
|
This also works fine. I can mount the exported /crypt on my PC (CentOS 6) and see the contents of the encrypted partition on the server.
However, the problem comes when I attempt to umount the mount point on the server.
If I do thus:
mount the encrypted partition on the server
mount the exported directory on the PC
umount the exported directory on the PC
I can umount the mount on the server.
If I do thus:
mount the encrypted partition on the server
mount the exported directory on the PC
access - even to read - the exported directory (using the PC)
umount the exported directory on the PC
Attempt to umount the mount point on the server
I get the following error
Quote:
ken@taylor14:~$ sudo umount /crypt
umount: /crypt: device is busy.
(In some cases useful info about processes that use
the device is found by lsof(8) or fuser(1))
|
I have tried lsof and fuse and studied their man pages and examples on-line but I cannot find any guilt suspects holding files in /crypt.
I am at a loss as to what to try next. Can anyone make any suggestions?
TIA,
Ken