Updated: see below.
I encrypted a 500 GB partition on an external 1TB drive on OS X Lion. The other 500 GB was not used yet and I want to create another partition on the external drive now. Disk utility will not let me do this and refers to the command line utility diskutil
, noting that the drive contains CoreStorage physical volumes.
I have looked around in the utility diskutil
but so far I haven't found anything useful:
diskutil cs createVolume
does not work because I first have to resize the Logical Volume Group, apparently.diskutil resizeVolume
might work, but this does not work on CoreStorage volumes, so I'm afraid I might break things (i.e. my encrypted volume occupies disk2s1, disk2s2 and disk2s3 at the same time) (see mydiskutil
output)
Some background info is given in an Ars Technica review, but this provides little information on how to proceed. This Macworld article instructs how to resize a volume, but I don't think this is applicable to CoreStorage volumes.
My diskutil list
output:
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *500.1 GB disk0
1: EFI 209.7 MB disk0s1
2: Apple_CoreStorage 499.2 GB disk0s2
3: Apple_Boot Recovery HD 650.0 MB disk0s3
/dev/disk1
#: TYPE NAME SIZE IDENTIFIER
0: Apple_HFS OSX *498.9 GB disk1
/dev/disk2
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *1.0 TB disk2
1: EFI 209.7 MB disk2s1
2: Apple_CoreStorage 499.8 GB disk2s2
3: Apple_Boot Boot OS X 134.2 MB disk2s3
/dev/disk3
#: TYPE NAME SIZE IDENTIFIER
0: Apple_HFS TimeMachine disk *499.5 GB disk3
my diskutil cs list
output here:
CoreStorage logical volume groups (2 found)
|
+-- Logical Volume Group UUID1
| =========================================================
| Name: OSX
| Sequence: 1
| Free Space: 0 B (0 B)
| |
| +-< Physical Volume UUID1.1
| | ----------------------------------------------------
| | Index: 0
| | Disk: disk0s2
| | Status: Online
| | Size: 499248103424 B (499.2 GB)
| |
| +-> Logical Volume Family UUID1.2
| ----------------------------------------------------------
| Sequence: 8
| Encryption Status: Unlocked
| Encryption Type: AES-XTS
| Encryption Context: Present
| Conversion Status: Complete
| Has Encrypted Extents: Yes
| Conversion Direction: -none-
| |
| +-> Logical Volume UUID1.2.1
| ---------------------------------------------------
| Disk: disk1
| Status: Online
| Sequence: 4
| Size (Total): 498929332224 B (498.9 GB)
| Size (Converted): -none-
| Revertible: Yes (unlock and decryption required)
| LV Name: OSX
| Volume Name: OSX
| Content Hint: Apple_HFS
|
+-- Logical Volume Group UUID2
=========================================================
Name: TimeMachine disk
Sequence: 1
Free Space: 0 B (0 B)
|
+-< Physical Volume UUID2.1
| ----------------------------------------------------
| Index: 0
| Disk: disk2s2
| Status: Online
| Size: 499796238336 B (499.8 GB)
|
+-> Logical Volume Family UUID2.2
----------------------------------------------------------
Sequence: 9
Encryption Status: Unlocked
Encryption Type: AES-XTS
Encryption Context: Present
Conversion Status: Complete
Has Encrypted Extents: Yes
Conversion Direction: -none-
|
+-> Logical Volume UUID2.2.1
---------------------------------------------------
Disk: disk3
Status: Online
Sequence: 4
Size (Total): 499477467136 B (499.5 GB)
Size (Converted): -none-
Revertible: Yes (unlock and decryption required)
LV Name: TimeMachine disk
Volume Name: TimeMachine disk
Content Hint: Apple_HFS
Update:
After looking around for more information it seems that currently CoreStorage volumes are not so flexible. There is a useful blogpost listing some undocumented features, but still resizing a CoreStorage volume does not seem to work.
Using the old diskutil commands do not solve the problem:
diskutil resizeVolume disk2s2 R
is not possible because it is a CoreStorage partition/volumediskutil resizeVolume disk3 R
is the samediskutil partitionDisk
does not work because it deletes all volumes first
Using CoreStorage routines also runs into trouble
diskutil cs resizeDisk
does not work because the CoreStorage physical volume is bound to the limits of the regular partition disk2s2diskutil cs addDisk
is not possible because I cannot repartition disk2 without destroying itdiskutil cs resizeVolume
does not work because the logical volume group is not big enough
In the end I am now reverting the encryption and will re-partition the drive non-destructively with Disk Utility after that is complete.