あなたは[info]kazuomikさんの日記を閲覧中です

entries friends calendar user info KazMuzik.net Previous Previous Next Next
Kaz Muzik Blog - ZFS on Mac OS X Leopard #2
kazuomik
[info]kazuomik
Add to Memories
Share
ZFS on Mac OS X Leopard #2
8/31 に紹介した ZFS on OS X を、Mac OS X 10.5.4 Leopard で試してみました。まずは、zfs-119 binary をダウンロードしてきます。Downloads のページには、インストール方法も詳しく載っています。
# tar zxvpf zfs-119.bin.tgz
# cp build/Leopard_Release/zfs /usr/sbin/zfs
# cp build/Leopard_Release/zpool /usr/sbin/zpool
# cp build/Leopard_Release/libzfs.dylib /usr/lib/libzfs.dylib
# chown root:wheel /usr/sbin/zpool
# chown root:wheel /usr/sbin/zfs
# chown root:wheel /usr/lib/libzfs.dylib
# rm -rf /System/Library/Filesystems/zfs.fs /System/Library/Extensions/zfs.kext
# cp -R build/Leopard_Release/zfs.kext /System/Library/Extensions/zfs.kext
# cp -R build/Leopard_Release/zfs.fs /System/Library/Filesystems/zfs.fs
# chown -R root:wheel /System/Library/Extensions/zfs.kext
# chown -R root:wheel /System/Library/Filesystems/zfs.fs
# reboot 

再起動してきたら、zfs.kext (Kernel Extension) がロードされているので、Solaris のように、zpool や zfs コマンドが使えるようになります。

Getting Started のページに、tutorial があります。Leopard をインストールした iBook G4 に、FireWire で、ディスクを接続して、試してみます。
# diskutil list
/dev/disk0
...
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *76.3 Gi    disk1
   1:                 DOS_FAT_32 UNTITLED 1              76.3 Gi    disk1s1
# diskutil partitiondisk disk1 GPTFormat ZFS %noformat% 100%
Started partitioning on disk disk1
Creating partition map
[ + 0%..10%..20%..30%..40%..50%..60%..70%..80%..90%..100% ] 
Finished partitioning on disk disk1
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *76.3 Gi    disk1
   1:                        EFI                         200.0 Mi   disk1s1
   2:                        ZFS                         76.0 Gi    disk1s2
# zpool create leopool disk1s2
# zpool status leopool
  pool: leopool
 state: ONLINE
status: The pool is formatted using an older on-disk format.  The pool can
        still be used, but some features are unavailable.
action: Upgrade the pool using 'zpool upgrade'.  Once this is done, the
        pool will no longer be accessible on older software versions.
 scrub: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        leopool     ONLINE       0     0     0
          disk1s2   ONLINE       0     0     0

errors: No known data errors

# zpool upgrade leopool
This system is currently running ZFS pool version 8.

Successfully upgraded 'leopool' from version 6 to version 8
# zfs create leopool/leovolume
# df -h
Filesystem          Size   Used  Avail Capacity  Mounted on
/dev/disk0s3        74Gi   63Gi   11Gi    85%    /
devfs              106Ki  106Ki    0Bi   100%    /dev
fdesc              1.0Ki  1.0Ki    0Bi   100%    /dev
map -hosts           0Bi    0Bi    0Bi   100%    /net
map auto_home        0Bi    0Bi    0Bi   100%    /home
leopool             75Gi  270Ki   75Gi     1%    /Volumes/leopool
leopool/leovolume   75Gi   19Ki   75Gi     1%    /Volumes/leopool/leovolume
# 

ZFS を使用するには、GPT (GUID Partition Table)で、partition を切る必要があります。上記のように、ディスク全体を ZFS に割り当てるのが、お勧めのようです。

以上は、コマンドラインから操作しましたが、GUI でのオペレーションは、まだサポートされていません。GUI の Disk Utility でも、Volume Format に ZFS File System を選択することはできません。ただし、上記で作成した leopool を選択すると、下の方には、Format: ZFS File System と表示されます。また、Finder で、leopool を選択して、Get Info で見ると、Format: ZFS File System となっています。

Tags:

profile
Kaz Muzik
User: [info]kazuomik
Name: Kaz Muzik
Website: KazMuzik.net
calendar
Back August 2009
1
2345678
9101112131415
16171819202122
23242526272829
3031
page summary
tags