1

I was playing around with CoreStorage on a test disk and used the undocumented commands cs addDisk and cs removeDisk. The addDisk command worked just fine and was able to expand a logical volume group. When I ran removeDisk, the disk was removed from the LVG and made into a normal partition, but the reference to it in CoreStorage remained.

+-- Logical Volume Group 1B650141-2BB6-4643-93AE-BFE5CB900B2A
=========================================================
Name:         Test
Status:       Offline
Size:         80020942848 B (80.0 GB)
Free Space:   -none-
|
+-< Physical Volume E9A820CA-7C76-424E-8372-C29D944996B2
|   ----------------------------------------------------
|   Index:    0
|   Disk:     disk3s2
|   Status:   Checking
|   Size:     80020942848 B (80.0 GB)
|
+-< Physical Volume 4FEE6022-ED01-4928-A517-150C11D1B378
    ----------------------------------------------------
    (No properties)

The last physical volume was the one I ran removeDisk on. Attempting to run it again says it does not exist. This completely messes up the LVG and it has to be destroyed in order to work again.

My question is: is there some way of manually telling CoreStorage that the volume is no longer needed and should be removed? Is there a command somewhere like gdisk that can edit the raw Core Storage information?

All of this was done on a test disk just to see how well these commands worked.

  • Did you remove any logical volume (if you had one) before removing the physical volume? – klanomath Feb 28 '15 at 9:06
  • I did not since the idea was to be able to remove a disk without losing data. I figured the removeDisk command would move all data on that disk to another in the LVG. The removeDisk command would/should fail if there is not enough space to do so. I don't completely understand the underlying CS details so maybe this doesn't even make sense. Edit: It still doesn't remove the reference when a logical volume is never even created, i.e., running removeDisk right after creating the CS LVG. – RagglesX Feb 28 '15 at 9:12

You must log in to answer this question.

Browse other questions tagged .