Manhattan Island, N.Y.C.


Date/Time: 2006:08:05 19:12:09
Camera: FUJIFILM
Model: FinePix F401
Exporsure Time: 1/420
FNumber: 7.0
Aperture Value: 5.6
Focal Length: 5.7

Close

y2blog » iMacのFusion Driveを探ってみた(その2)

1

04

2013

iMacのFusion Driveを探ってみた(その2)

Fusion Driveに関するAppleの公式情報


10月に発表されたFusion Driveに関する詳しい情報は少なく、一般ユーザ向けにはAppleのホームページ上のQ&Aのページ「Mac mini (Late 2012) and iMac (Late 2012):Fusion Drive について」くらいしかないようだ。この内容を読む限りやはりFusion Drive を従来のHDDのパーティションやボリュームと同じように扱うのは難しいようだ。
・Fusion Drive のハードディスクにパーティションを作成できるが、内臓HDDドライブ側に1つだけHFS+/FAT32のパーティションを1つだけ作成することが可能
前の記事で紹介したように、GUIベースの”DiskUtility.app” の画面上から既存の論理パーティション”Macintosh HD”を分割する操作によってパーティションを1つ増やすことが可能なようだ。但し、この方法によって新たに作成されたパーティションはFusion Driveとしては機能せず、単純にHDD上に1つパーティションが増えただけの扱いになる。FAT32形式でパーティションを作成することもできるが、恐らくWindowsのシステムボリュームとしては使えない。Windows用のパーティションを確保するには “BootCamp Utility” を使用してFAT32のパーティションを確保しなければならないが、現時点では”BootCamp Utility”は3TBのHDDには対応していない。


Fusion Driveモードで作成された論理ボリュームをターゲットディスクモードで外部のMac OS X(10.8.2以降)からマウントさせることができるが、まだサードパーティー製のディスクユーティリティーやFusion Drive対応のマシンに付属している”DiskUtility.app” 以外のツールはFusion Driveには未対応なので、何かディスクまわりでトラブルが生じたら回復するのは難しそうだ。

DiskUtility Version
Fusion Driveに対応した専用の”DiskUtility.app”でしかディスクの操作ができないようだ

いずれにしてもFusion Driveの機能はとても魅力的だが、現状では一般ユーザが安心して使えるような扱いやすい代物ではないだろう。何かトラブルが起きたら普通のユーザには手も足も出せないだろう。Apple Storeのジーニアスバーのスタッフやユーザサポート部隊はこれから大変なことになるかもしれない。
まだ詳しい解析を行ってはいないが、コマンドラインの “DiskUtility” を使ってディスクまわりの情報を取得してみたので、リストを載せておく。Fusion Driveボリュームの”Macintosh HD”は Mac OS X 上では disk2 (/dev/disk2 ) としてマウントされている。(disk3は外付けのUSBストレージが見えている)
これまでに無かったパーティションとして、SSDドライブ側(disk0s3)に “Boot OS X” という134MB程の隠しパーティションが存在している.このパーティションが何のためにあるのか確かめてはいないが、”Diskutil” のCoreStorageコマンドで論理ボリュームを作成すると自動的(勝手に)作成されてしまうようだ.


OSXそのものを論理ボリューム上に置いてしまうと、Fusion Driveの論理ボリュームがOSXのCoreStorageフレームワークで実現しているため、OSXの起動そのものができなくなってしまう.このためOSXの起動を行うために用意された特別なパーティション(システム)なのかもしれない.OSXの起動時の画面の様子を注意深く観察しているとリンゴマークが途中で一瞬消えて直ぐにリンゴマークが復活するのが確認されるであろう.恐らくこのリンゴマークが消える瞬間が一次ブートローディングOSからFusion Drive上の本番OSへ切り替わるタイミングなのだろう.


既にFusion Driveを解除してしまったので直ぐにはこのパーティションの中身を解析できないが、何れこのパーティションの役割や中身について調べることにしよう.

【追記】

この”Boot OS X”パーティションの役割について調べてみるために、OSXボリュームをFusion Driveの論理ボリューム上に置いてみた(Time MachineでOSXをリカバリした)ところ、やはり”Boot OS X”には ミニカーネルのような起動専用のミニOSXシステムがインストールされていた.

Hidden Boot Partition
Fusion Drive上のOSXをブートするためのブートローダーミニOSが作成されている


yasuakis-iMac:~ yasuaki$ diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *121.3 GB   disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:          Apple_CoreStorage                         121.0 GB   disk0s2
   3:                 Apple_Boot Boot OS X               134.2 MB   disk0s3
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *3.0 TB     disk1
   1:                        EFI                         209.7 MB   disk1s1
   2:          Apple_CoreStorage                         3.0 TB     disk1s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk1s3
/dev/disk2
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                  Apple_HFS Macintosh HD           *3.1 TB     disk2
/dev/disk3
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *203.9 GB   disk3
   1:                        EFI                         209.7 MB   disk3s1
   2:                  Apple_HFS Lion                    64.0 GB    disk3s2
   3:                  Apple_HFS LionServer              64.0 GB    disk3s3
   4:                  Apple_HFS iMac27Backup            75.3 GB    disk3s4

yasuakis-iMac:~ yasuaki$ sudo mount
/dev/disk2 on / (hfs, local, journaled)
devfs on /dev (devfs, local, nobrowse)
map -hosts on /net (autofs, nosuid, automounted, nobrowse)
map auto_home on /home (autofs, automounted, nobrowse)
/dev/disk3s3 on /Volumes/LionServer (hfs, local, nodev, nosuid, journaled, noowners)
/dev/disk3s2 on /Volumes/Lion (hfs, local, nodev, nosuid, journaled, noowners)
/dev/disk3s4 on /Volumes/iMac27Backup (hfs, local, nodev, nosuid, journaled, noowners)

yasuakis-iMac:~ yasuaki$ sudo fdisk /dev/disk0
Disk: /dev/disk0	geometry: 14751/255/63 [236978176 sectors]
Signature: 0xAA55
         Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
 1: EE 1023 254  63 - 1023 254  63 [         1 -  236978175] 
 2: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
 3: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
 4: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
yasuakis-iMac:~ yasuaki$ sudo fdisk /dev/disk1
Disk: /dev/disk1	geometry: 97451/255/63 [1565565872 sectors]
Signature: 0xAA55
         Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
 1: EE 1023 254  63 - 1023 254  63 [         1 -         -2] 
 2: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
 3: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
 4: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
yasuakis-iMac:~ yasuaki$ sudo fdisk /dev/disk2
fdisk: /dev/disk2: Resource busy
 

“Apple CoreStorage” がFusion Driveの中心的な機能を担っている


Fusion Driveが発表されてからその実態を探る取り組みが行われてきたが、これらの情報からFusion Driveの仕組み自体はどうやら CoreStorage というMac OS X のフレームワーク?が鍵を握っているようだ.CoreStorageそのものの説明がAppleから殆ど提供されていないのでまだ実態が良く分からないが、manコマンドでdiskutilコマンドやMac OS X 10.8.2のプロセスなどの情報からほんの少しその断片を窺い知ることができる.


Fusion Drive仕様のMac OS X 10.8.2のプロセスを眺めてみると “corestoraged” というデーモンプロセスが走っていることが分かる.



yasuakis-iMac:~ yasuaki$ ps -ef | grep core 0 34 1 0 8:57PM ?? 0:00.88 /System/Library/CoreServices/coreservicesd 0 67 1 0 8:57PM ?? 0:00.03 /usr/libexec/corestoraged 202 112 1 0 8:57PM ?? 0:00.37 /usr/sbin/coreaudiod 501 565 546 0 10:15PM ttys000 0:00.00 grep core


manコマンドでcorestoragedを拾ってみると

CORESTORAGED(1)           BSD General Commands Manual          CORESTORAGED(1)

NAME
     corestoraged -- CoreStorage volume manager

SYNOPSIS
     corestoraged

DESCRIPTION
     corestoraged manages CoreStorage volumes.  It is invoked by launchd(8) when a CoreStorage volume needs management.

FILES
     /System/Library/LaunchDaemons/com.apple.corestorage.corestoraged.plist

SEE ALSO
     diskutil(8)

Mac OS X                        April 8th, 2010                       Mac OS X
  同じくmanコマンドでdiskutilコマンドの説明を見ると(膨大な出力の中から CoreStorage部分だけを抽出)


coreStorage | cs coreStorageVerb [...]
                CoreStorage verbs can be used to create, manipulate and destroy CoreStorage volumes.

                CoreStorage maintains a world of virtual disks, somewhat like RAID, in which one can easily
                add or remove imported backing store disks, as well as exported usable volumes, to or from a
                pool (or several pools). This provides the user with flexibility in allocating their hard-
                ware; user or operating system data can span multiple physical disks seamlessly, for exam-
                ple.

                Apple CoreStorage defines four types of objects, instances of which are uniquely represented
                by a UUID:

                      o   Logical Volume Group (LVG)

                      o   Physical Volume (PV)

                      o   Logical Volume Family (LVF)

                      o   Logical Volume (LV)

                The Logical Volume Group (LVG) is the top or "pool" level; zero or more may exist during any
                OS boot time session.

                An LVG imports one or more Physical Volumes (PVs). A PV represents a device that feeds the
                LVG storage space; a PV is normally real media but it can be a disk image or even an
                AppleRAID Set. A disk offered to be a PV must be a partition and the encompassing scheme
                must be GPT.

                An LVG exports zero or more Logical Volume Families (LVFs). An LVF contains properties which
                govern and bind together all of its descendant Logical Volumes (LVs). These properties pro-
                vide settings for Full Disk Encryption (FDE) (such as whether the LVG is encrypted, which
                users have access, etc) and other services.

                A Logical Volume Family (LVF) exports one or more Logical Volumes (LVs).

                A Logical Volume (LV) exports a dev node, upon which a file system (such as Journaled HFS+)
                resides.

                For more information on specifying device arguments, see the DEVICES section below.

                CoreStorage is not a replacement for backing up your data.  Backups should be always be per-
                formed on a regular basis and before modifying any CoreStorage volumes using these commands.

                The following is a list of coreStorage sub-verbs with their descriptions and individual
                arguments.

                list [-plist | UUID]
                           Display a tree view of the CoreStorage world for all current logical volume
                           groups (LVGs) with member disks (PVs) and exported volumes (LVFs and LVs), with
                           properties and status for each level.  If -plist is specified then a property
                           list will be emitted instead of the formatted tree output; the UUIDs can be used
                           with the diskutil coreStorage information verb to get properties for the object
                           represented by that UUID.  If UUID is specified then an attempt is made to list
                           only that UUID (whatever type of CoreStorage object it may represent).  The
                           -plist and UUID arguments may not both be specified.

                info | information [-plist] UUID | device
                           Display properties of the CoreStorage object (LVG, PV, LVF, or LV) associated
                           with the given CoreStorage UUID or disk.

                convert device [-stdinpassphrase | -passphrase [passphrase]]
                           Convert a regular Journaled HFS+ or Case-sensitive Journaled HFS+ volume (must be
                           on a partition and within a GPT partitioning scheme) into a CoreStorage logical
                           volume.

                           If -passphrase is specified, the on-disk bytes will be encrypted. You will be
                           prompted for a new passphrase interactively, or you can specify the passphrase on
                           the command line. Alternatively, if you specify -stdinpassphrase the standard
                           input is read for the passphrase so that a program could execute diskutil and
                           send the passphrase through a pipe without having to expose it as a command-line
                           parameter.

                           The volume must be resizable (the above types are) and also mounted. Conversion
                           is done live and in-place; targeting the boot volume is supported; as much of the
                           conversion as possible is done before an eject or reboot is necessary.

                           After slightly shrinking the source volume to make room for CoreStorage data
                           structures at the end, its partition type is changed to Apple_CoreStorage and it
                           becomes a CoreStorage Physical Volume.  A new CoreStorage Logical Volume Group is
                           then created with this Physical Volume as the backing store, followed by the cre-
                           ation of a Logical Volume Family and Logical Volume pair.

                           At this point, the new CoreStorage PV/LVG/LVF/LV stack is ready for use, although
                           the "old" mountpoint must first be unmounted; yet it might not be unmountable.
                           This will occur if the target (now the PV) is the current boot volume.

                           Just before exiting, diskutil coreStorage convert will try to unmount the target
                           disk (which is now the "old" mount point and the new PV). If successful (target
                           is not the boot disk), the volume now becomes mounted from the LV. If unsuccess-
                           ful (target is the boot disk), a reboot is necessary.

                           At this point, if no encryption was specified, all is done. Otherwise, the bytes-
                           on-disk will begin to be encrypted in-place by CoreStorage automatically "in the
                           background" while the PV/LVG/LVF/LV stack continues to be usable. Encryption
                           progress may be monitored with diskutil coreStorage list.

                           When encryption is finished, a passphrase will be required the next time the LV
                           is ejected and re-attached.  If the LV is hosting the boot volume, this
                           passphrase requirement will thus occur at the next reboot.

                           Note that all on-disk data is not secured immediately; it is a deliberate process
                           of encrypting all on-disk bytes while the CoreStorage driver keeps publishing the
                           (usable) LVG/LV.

                           Ownership of the affected disk is required.

                revert device | lvUUID [-stdinpassphrase] | [-passphrase passphrase] | [-recoverykeychain
                           file]
                           Convert a CoreStorage logical volume back to its native type.  The volume must
                           have been created by means of conversion, e.g. with diskutil coreStorage convert.

                           If the volume was not created with a passphrase, then simple ownership of the
                           affected disk is required; otherwise, a passphrase must be supplied, either
                           interactively or via one of the parameters.

                create | createLVG lvgName devices ...
                           Create a CoreStorage logical volume group. The disks specified will become the
                           (initial) set of physical volumes; more than one may be specified. You can spec-
                           ify partitions (which will be re-typed to be Apple_CoreStorage) or whole-disks
                           (which will be partitioned as GPT and will contain an Apple_CoreStorage parti-
                           tion).  The resulting LVG UUID can then be used with createVolume below.  All
                           existing data on the drive(s) will be lost.  Ownership of the affected disk is
                           required.

                delete | deleteLVG lvgUUID
                           Delete a CoreStorage logical volume group. All logical volume families with their
                           logical volumes are removed, the logical volume group is destroyed, and the now-
                           orphaned physical volumes are erased and partition-typed as Journaled HFS+.

                createVolume | createLV lvgUUID type name size [-stdinpassphrase | -passphrase [passphrase]]
                           Export a new logical volume family, with a new logical volume under it, out of a
                           CoreStorage logical volume group.  Type is the file system personality to ini-
                           tialize on the new logical volume. Valid types are Journaled HFS+ or Case-sensi-
                           tive Journaled HFS+ or their aliases.  Size is the amount of space to allocate
                           from the parent LVG. It is given in the same manner as the triplet description
                           for the partitionDisk verb, and you can also specify with % a percentage of the
                           current size of the LVG.

                           If -passphrase or -stdinpassphrase is specified, in the same manner as with
                           diskutil coreStorage convert above, on-disk data will be stored in an encrypted
                           form as the Logical Volume is filled; otherwise, the data will remain plain.

                deleteVolume | deleteLV lvUUID
                           Remove an exported logical volume (and its logical volume family as appropriate)
                           from a CoreStorage logical volume group. Any data on that logical volume will be
                           lost.  This operation will thus result in an increase in free space in the logi-
                           cal volume group.

                           It is assumed that the logical volume is used as a backing store for a file sys-
                           tem; therefore, an unmount attempt is made which must suceeed before the removal
                           of the logical volume is done.

      ...


ここでは説明が長くなるのでdiskutilコマンドのCoreStorageに関する具体的な説明は省くが、CoreStorageの list機能を使ってFusion Driveの構成情報を見ることができる.

yasuakis-iMac:~ yasuaki$ sudo diskutil cs list
CoreStorage logical volume groups (1 found)
|
+-- Logical Volume Group CF950A9B-3B17-492E-B3C8-6D3D25D91DED
    =========================================================
    Name:         Macintosh HD
    Size:         3120722075648 B (3.1 TB)
    Free Space:   114688 B (114.7 KB)
    |
    +-< Physical Volume F0872E57-1037-404A-ACC4-8F4E8F19B3D0
    |   ----------------------------------------------------
    |   Index:    0
    |   Disk:     disk0s2
    |   Status:   Online
    |   Size:     120988852224 B (121.0 GB)
    |
    +-< Physical Volume 3B2361CA-E46B-412F-94A4-CEB3111A8ADC
    |   ----------------------------------------------------
    |   Index:    1
    |   Disk:     disk1s2
    |   Status:   Online
    |   Size:     2999733223424 B (3.0 TB)
    |
    +-> Logical Volume Family 1B0BA0C5-3160-46D0-8DD0-AFC24126412E
        ----------------------------------------------------------
        Encryption Status:       Unlocked
        Encryption Type:         None
        Conversion Status:       NoConversion
        Conversion Direction:    -none-
        Has Encrypted Extents:   No
        Fully Secure:            No
        Passphrase Required:     No
        |
        +-> Logical Volume D160288F-CB8B-484E-8CDB-D4FD9F0188D4
            ---------------------------------------------------
            Disk:               disk2
            Status:             Online
            Size (Total):       3106191572992 B (3.1 TB)
            Size (Converted):   -none-
            Revertible:         No
            LV Name:            Macintosh HD
            Volume Name:        Macintosh HD
            Content Hint:       Apple_HFS


記事が長くなりすぎたので続きは続編(その3)で...