Diskutil eject does not 're-lock' Filevault encrypted volumes on external drive
Man documentation for diskutil...
http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/ man8/diskutil.8
... states that the diskutil eject command can be used to "re-lock" a corestorage volume that has been previously unlocked:
"To 're-lock' the volume, make it offline again by ejecting it, e.g. with diskutil eject."
I have an external hard drive with several Filevault 2 encrypted partitions (OSX 10.8.3) . Once a volume is unlocked using diskutil corestorage unlockVolume, when the volume is subsequently ejected using diskutil eject, it shows the disk as unlocked after ejecting. After ejecting, I can look with diskutil corestorage list and find:
| Encryption status: Unlocked
Indeed, after ejecting, the disk can be re-mounted and the files accessed without re-entering the Filevault password for the volume.
The only means I have for restoring the disk to the locked status is to restart the machine.
What is the correct way to "re-lock" a corestorage volume?
Below is the output for the drive using diskutil corestorage list after unlocking with diskutil corestorage unlockVolume and then ejecting with diskutil eject.
+-- Logical Volume Group ####
| =========================================================
| Name: ####
| Status: Online
| Size: 498058510336 B (498.1 GB)
| Free Space: 0 B (0 B)
| |
| +-< Physical Volume ####
| | ----------------------------------------------------
| | Index: 0
| | Disk: disk1s4
| | Status: Online
| | Size: 498058510336 B (498.1 GB)
| |
| +-> Logical Volume Family ####
| ----------------------------------------------------------
| Encryption Status: Unlocked
| Encryption Type: AES-XTS
| Conversion Status: Complete
| Conversion Direction: -none-
| Has Encrypted Extents: Yes
| Fully Secure: Yes
| Passphrase Required: Yes
| |
| +-> Logical Volume ####
| ---------------------------------------------------
| Disk: disk2
| Status: Online
| Size (Total): 497739735040 B (497.7 GB)
| Size (Converted): -none-
| Revertible: No
| LV Name: ####
| Volume Name: ####
| Content Hint: Apple_HFS
Mac mini, OS X Mountain Lion (10.8.3)