Giving a Core Storage logical volume to ZEVO

Moderators: jhartley, MSR734, nola

Giving a Core Storage logical volume to ZEVO

Post by grahamperrin » Fri Mar 29, 2013 7:50 am

Spun off from viewtopic.php?p=4433#p4433

raattgift wrote:… the only stable approach i've found (and used) is to create a composite disk lvg with corestorage, then create an LV inside that, and give the LV to a zpool create / zpool add command line.


From my point of view (encrypted Core Storage underlying my ZEVO home directory since mid-2012): I'm not yet convinced that it's stable in all situations. Off the top of my head, just one possible caution: http://apple.stackexchange.com/question ... 1844_52920 – that's not a discouragement from combining the two pool technologies, just a hint to expect the unexpected in edge cases.

… the composite disk is just a concatenation, though; except in one special case, writes will go to the first physical volume until that fills, then to the second physical volume. (the special case is if the first PV is a solid state disk and your particular kernel supports fusion drives; not all 10.8.2 or 10.8.3 kernels do).


That's most useful. Do we have authoritative references?

(I have read Infiltrate the Vault: Security Analysis and Decryption of Lion Full Disk Encryption (Choudary, Gröbert and Metz, 2012) (Cryptology ePrint Archive: Report 2012/374), but I have not yet read the 2013-02 edition 0.0.6 of FileVault Drive Encryption (FVDE) (Choudary and Metz, first published in 2012). This post and nearby for links.)
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

Creating a composite LVG with Core Storage

Post by grahamperrin » Sat Mar 30, 2013 7:13 am

An example, with disposable USB flash drives at disk11 and disk13:

Code: Select all
macbookpro08-centrim:~ gjp22$ diskutil list | grep HFS
   2:                  Apple_HFS swap                    32.0 GB    disk0s2
   3:                  Apple_HFS disk0s3                 536.9 MB   disk0s3
   4:                  Apple_HFS spare                   671.1 MB   disk0s4
   0:                  Apple_HFS OS                     *99.2 GB    disk1
   2:                  Apple_HFS AppleSeed               295.3 GB   disk10s2
   2:                  Apple_HFS Untitled                3.7 GB     disk11s2
   2:                  Apple_HFS hgst                    3.7 GB     disk13s2


Creation:

Code: Select all
macbookpro08-centrim:~ gjp22$ diskutil coreStorage createLVG Core\ Storage\ concatenation /dev/disk11s2 /dev/disk13s2
Started CoreStorage operation
Unmounting disk11s2
Touching partition type on disk11s2
Adding disk11s2 to Logical Volume Group
Unmounting disk13s2
Touching partition type on disk13s2
Adding disk13s2 to Logical Volume Group
Creating Core Storage Logical Volume Group
Switching disk11s2 to Core Storage
Switching disk13s2 to Core Storage
Waiting for Logical Volume Group to appear
Discovered new Logical Volume Group "5755B367-41A1-48C9-B442-DDF889F2F8B5"
Core Storage LVG UUID: 5755B367-41A1-48C9-B442-DDF889F2F8B5
Finished CoreStorage operation
macbookpro08-centrim:~ gjp22$ clear


Core Storage world, the concatenation currently at its tail:

Code: Select all
macbookpro08-centrim:~ gjp22$ date
Sat 30 Mar 2013 11:51:19 GMT
macbookpro08-centrim:~ gjp22$ diskutil cs list
CoreStorage logical volume groups (3 found)
|
+-- Logical Volume Group 902434C9-0131-4E3A-AE15-2B8B938087AD
|   =========================================================
|   Name:         gjp22-cs
|   Status:       Online
|   Size:         616336003072 B (616.3 GB)
|   Free Space:   0 B (0 B)
|   |
|   +-< Physical Volume 179AADE6-34F1-404C-A994-9FD99C881BA6
|   |   ----------------------------------------------------
|   |   Index:    0
|   |   Disk:     disk0s7
|   |   Status:   Online
|   |   Size:     616336003072 B (616.3 GB)
|   |
|   +-> Logical Volume Family FFCE2FAF-BE8E-4FEF-9F3E-E221C6CBCA11
|       ----------------------------------------------------------
|       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 0CFAFD38-E79B-40AC-A4BE-63296E6B4331
|           ---------------------------------------------------
|           Disk:               disk2
|           Status:             Online
|           Size (Total):       616017227776 B (616.0 GB)
|           Size (Converted):   -none-
|           Revertible:         No
|           LV Name:            gjp22-cs
|           Content Hint:       Apple_HFS
|
+-- Logical Volume Group A82B1A4B-B312-41AB-B020-F813CCC74C1C
|   =========================================================
|   Name:         OS
|   Status:       Online
|   Size:         99484213248 B (99.5 GB)
|   Free Space:   0 B (0 B)
|   |
|   +-< Physical Volume 18126061-401E-47DB-A215-8CC6400769F6
|   |   ----------------------------------------------------
|   |   Index:    0
|   |   Disk:     disk0s5
|   |   Status:   Online
|   |   Size:     99484213248 B (99.5 GB)
|   |
|   +-> Logical Volume Family 7615C140-F0A4-4BDC-AEFF-A78A55E41B1B
|       ----------------------------------------------------------
|       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 6F42406A-AB44-40B2-9838-9EAFC5CF1C09
|           ---------------------------------------------------
|           Disk:               disk1
|           Status:             Online
|           Size (Total):       99165437952 B (99.2 GB)
|           Size (Converted):   -none-
|           Revertible:         No
|           LV Name:            OS
|           Volume Name:        OS
|           Content Hint:       Apple_HFS
|
+-- Logical Volume Group 5755B367-41A1-48C9-B442-DDF889F2F8B5
    =========================================================
    Name:         Core Storage concatenation
    Status:       Online
    Size:         7331561472 B (7.3 GB)
    Free Space:   6727565312 B (6.7 GB)
    |
    +-< Physical Volume 9F1CE91E-E49E-4AAB-B09E-367C60EBD6BD
    |   ----------------------------------------------------
    |   Index:    0
    |   Disk:     disk11s2
    |   Status:   Online
    |   Size:     3665780736 B (3.7 GB)
    |
    +-< Physical Volume 8640CC70-D0BB-4058-BF3F-716382C810E4
        ----------------------------------------------------
        Index:    1
        Disk:     disk13s2
        Status:   Online
        Size:     3665780736 B (3.7 GB)
macbookpro08-centrim:~ gjp22$


Deletion (housekeeping after my test):

Code: Select all
macbookpro08-centrim:~ gjp22$ diskutil cs delete 5755B367-41A1-48C9-B442-DDF889F2F8B5
Started CoreStorage operation
Destroying Logical Volume Group
Erasing disk11s2 Untitled
Initialized /dev/rdisk11s2 as a 3 GB HFS Plus volume with a 8192k journal
Mounting disk
Erasing disk13s2 hgst
Initialized /dev/rdisk13s2 as a 3 GB HFS Plus volume with a 8192k journal
Mounting disk
Finished CoreStorage operation
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

man pages for diskutil(8)

Post by grahamperrin » Sat Mar 30, 2013 7:39 am

Note that Apple's currently published diskutil(8) OS X Manual Page is outdated, limited to Mac OS X 10.7.4.

Beyond the Apple domain, there's an unofficial copy of something more recent at http://www.manpagez.com/man/8/diskutil/
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

Re: man pages for diskutil(8)

Post by mnos3c » Sat Mar 30, 2013 7:50 am

grahamperrin wrote:Note that Apple's currently published diskutil(8) OS X Manual Page is outdated, limited to Mac OS X 10.7.4.

Beyond the Apple domain, there's an unofficial copy of something more recent at http://www.manpagez.com/man/8/diskutil/




Why do you use this code:
Code: Select all
diskutil coreStorage createLVG Core\ Storage\ concatenation /dev/disk11s2 /dev/disk13s2


Instead of:
Code: Select all
diskutil coreStorage createLVG disk11s2 disk13s2


As suggested by manpages?

Code: Select all
diskutil coreStorage create | createLVG lvgName devices


Is it an undocumented command?
mnos3c Offline


 
Posts: 33
Joined: Wed Dec 26, 2012 6:40 am

Explanations

Post by grahamperrin » Sat Mar 30, 2013 8:11 am

Space in the name of a Core Storage LVG

The two backslashes in
    Core\ Storage\ concatenation
are to produce a name that includes spaces.

The product, from one of the preceding posts:

Code: Select all
+-- Logical Volume Group 5755B367-41A1-48C9-B442-DDF889F2F8B5
    =========================================================
    Name:         Core Storage concatenation


/dev/

The two /dev/ strings in
    /dev/disk11s2 /dev/disk13s2
are habit, longhand.
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

Detail

Post by grahamperrin » Sat Mar 30, 2013 8:16 am

mnos3c wrote:… 
Code: Select all
diskutil coreStorage createLVG disk11s2 disk13s2


As suggested by manpages?


createLVG
is in the man page for diskutil in OS X 10.8.3 but not for diskutil in Mac OS X 10.7.4.

Critically: take care to not omit lvgName
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

Re: Giving a Core Storage logical volume to ZEVO

Post by mnos3c » Sat Mar 30, 2013 9:05 am

On 10.7.4 concatenation seems broken.
disk1 1tb is internal sata. disk2 is a 4gb usb pen.
Rebooted machine, then retried:

Code: Select all
diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *256.1 GB   disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:                  Apple_HFS Lion_256                170.0 GB   disk0s2
   3:                 Apple_Boot Recovery HD             20.2 GB    disk0s3
   4:       Microsoft Basic Data BOOTCAMP                65.6 GB    disk0s4
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk1
   1:                        EFI                         209.7 MB   disk1s1
   2:                  Apple_HFS Senza titolo 1          999.9 GB   disk1s2
/dev/disk2
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *4.1 GB     disk2
   1:                        EFI                         209.7 MB   disk2s1
   2:                  Apple_HFS Senza titolo 1          3.8 GB     disk2s2
w00t:~ nickname$



Code: Select all
diskutil list | grep HFS
   2:                  Apple_HFS Lion_256                170.0 GB   disk0s2
   2:                  Apple_HFS Senza titolo 1          999.9 GB   disk1s2
   2:                  Apple_HFS Senza titolo 1          3.8 GB     disk2s2


Code: Select all
diskutil cs list
No CoreStorage logical volume groups found


Code: Select all
diskutil coreStorage create Core\ Storage\ concatenation /dev/disk1s2 /dev/disk2s2
Started CoreStorage operation
Error: -69886: Invalid request


Code: Select all
diskutil coreStorage create Core\ Storage\ concatenation /dev/disk1 /dev/disk2
Started CoreStorage operation
Error: -69886: Invalid request


Code: Select all
diskutil coreStorage create Core\ Storage\ concatenation disk1 disk2
Started CoreStorage operation
Error: -69886: Invalid request


Same error with 2 usb pen.
mnos3c Offline


 
Posts: 33
Joined: Wed Dec 26, 2012 6:40 am

diskutil coreStorage, error -69886

Post by grahamperrin » Sat Mar 30, 2013 9:14 am

Error -69886 is not with ZEVO.

For this issue with Apple software I should steer to Ask Different …
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

Re: diskutil coreStorage, error -69886

Post by mnos3c » Sat Mar 30, 2013 9:18 am

grahamperrin wrote:Error -69886 is not with ZEVO.

For this issue with Apple software I should steer to Ask Different …



Ok but if you want to give a logical volume to ZEVO you should be able to create it before :-)
So I don't think it's really OT. I think it's useful for users to know that with lion there's some problems...

Just for reference, a single lvg is possible, just the concat seems not to work:

Code: Select all
diskutil coreStorage create Core\ Storage\ concatenation /dev/disk1
Started CoreStorage operation
Unmounting disk1
Repartitioning disk1
Unmounting disk
Creating the partition map
Rediscovering disk1
Adding disk1s2 to Logical Volume Group
Creating Core Storage Logical Volume Group
Switching disk1s2 to Core Storage
Waiting for Logical Volume Group to appear
Discovered new Logical Volume Group "05F84BFF-DC4D-4DD2-94DB-116FC7F8C804"
Core Storage LVG UUID: 05F84BFF-DC4D-4DD2-94DB-116FC7F8C804
Finished CoreStorage operation
mnos3c Offline


 
Posts: 33
Joined: Wed Dec 26, 2012 6:40 am

Link

Post by grahamperrin » Sat Mar 30, 2013 10:13 am

Awareness is good, but the ZEVO support area is not for troubleshooting an issue that does not involve ZEVO.

Now in Ask Different (thanks): On 10.7.4 coreStorage unable to create concatenated disk error -69886
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

Next

Return to General Discussion

Who is online

Users browsing this forum: ilovezfs and 0 guests

cron