zfs USB外付けハードディスクを追加
zfsにUSBディスクを追加 http://sites.google.com/site/takuminews/opensolaris/zfsAddUSBHDDを参考にしてやってみた。
あっけない。。管理面はまた別途調べてみる。
以下作業。
1. デバイスファイルを探す
# tail -f /var/adm/messages した状態でUSBHDDをPCに接続
以下のログが出力
sd2が /pci@0,0/pci1043,81ec@1a,7/storage@3/disk@0,0 というデバイスらしい。なんじゃこのながったらしい表記は?
c#t#d#のやつと付き合わせる。
追加されたこと以外はformatコマンドでも調べられるようだ。
この場合、c6t0d0p0として扱ってよいらしい。 p#とかs#って何だ?
2. ZFS poolを構成する。
ディスク c6t0d0p0 に xpoolと言う名前のpoolを作りたい。 zpool listで確認
おおでけたでけた。
3. ファイルシステムを作る。同時にマウントもされる。
あっけない。。管理面はまた別途調べてみる。
以下作業。
JUGEMテーマ:コンピュータ
1. デバイスファイルを探す
# tail -f /var/adm/messages した状態でUSBHDDをPCに接続
以下のログが出力
May 31 16:11:15 opcadm usba: [ID 912658 kern.info] USB 2.0 device (usb411,db) operating at hi speed (USB 2.x) on USB 2.0 root hub: storage@3, scsa2usb1 at bus address 2
May 31 16:11:15 opcadm usba: [ID 349649 kern.info] BUFFALO INC. USB-SATA Bridge WDC WD800B WD-WXE507G05494
May 31 16:11:15 opcadm genunix: [ID 936769 kern.info] scsa2usb1 is /pci@0,0/pci1043,81ec@1a,7/storage@3
May 31 16:11:15 opcadm genunix: [ID 408114 kern.info] /pci@0,0/pci1043,81ec@1a,7/storage@3 (scsa2usb1) online
May 31 16:11:15 opcadm scsi: [ID 583861 kern.info] sd2 at scsa2usb1: target 0 lun 0
May 31 16:11:15 opcadm genunix: [ID 936769 kern.info] sd2 is /pci@0,0/pci1043,81ec@1a,7/storage@3/disk@0,0
May 31 16:11:15 opcadm genunix: [ID 408114 kern.info] /pci@0,0/pci1043,81ec@1a,7/storage@3/disk@0,0 (sd2) online
May 31 16:11:15 opcadm unix: [ID 954099 kern.info] NOTICE: IRQ16 is being shared by drivers with different interrupt levels.
May 31 16:11:15 opcadm This may result in reduced system performance.
sd2が /pci@0,0/pci1043,81ec@1a,7/storage@3/disk@0,0 というデバイスらしい。なんじゃこのながったらしい表記は?
c#t#d#のやつと付き合わせる。
追加されたこと以外はformatコマンドでも調べられるようだ。
# ls -l /dev/rdsk | grep '/pci@0,0/pci1043,81ec@1a,7/storage@3/disk@0,0'
lrwxrwxrwx 1 root root 64 2009-05-30 16:38 c6t0d0p0 -> ../../devices/pci@0,0/pci1043,81ec@1a,7/storage@3/disk@0,0:q,raw
lrwxrwxrwx 1 root root 64 2009-05-30 16:38 c6t0d0p1 -> ../../devices/pci@0,0/pci1043,81ec@1a,7/storage@3/disk@0,0:r,raw
lrwxrwxrwx 1 root root 64 2009-05-30 16:38 c6t0d0p2 -> ../../devices/pci@0,0/pci1043,81ec@1a,7/storage@3/disk@0,0:s,raw
lrwxrwxrwx 1 root root 64 2009-05-30 16:38 c6t0d0p3 -> ../../devices/pci@0,0/pci1043,81ec@1a,7/storage@3/disk@0,0:t,raw
lrwxrwxrwx 1 root root 64 2009-05-30 16:38 c6t0d0p4 -> ../../devices/pci@0,0/pci1043,81ec@1a,7/storage@3/disk@0,0:u,raw
lrwxrwxrwx 1 root root 64 2009-05-30 16:38 c6t0d0s0 -> ../../devices/pci@0,0/pci1043,81ec@1a,7/storage@3/disk@0,0:a,raw
lrwxrwxrwx 1 root root 64 2009-05-30 16:38 c6t0d0s1 -> ../../devices/pci@0,0/pci1043,81ec@1a,7/storage@3/disk@0,0:b,raw
lrwxrwxrwx 1 root root 64 2009-05-30 16:38 c6t0d0s10 -> ../../devices/pci@0,0/pci1043,81ec@1a,7/storage@3/disk@0,0:k,raw
lrwxrwxrwx 1 root root 64 2009-05-30 16:38 c6t0d0s11 -> ../../devices/pci@0,0/pci1043,81ec@1a,7/storage@3/disk@0,0:l,raw
lrwxrwxrwx 1 root root 64 2009-05-30 16:38 c6t0d0s12 -> ../../devices/pci@0,0/pci1043,81ec@1a,7/storage@3/disk@0,0:m,raw
lrwxrwxrwx 1 root root 64 2009-05-30 16:38 c6t0d0s13 -> ../../devices/pci@0,0/pci1043,81ec@1a,7/storage@3/disk@0,0:n,raw
lrwxrwxrwx 1 root root 64 2009-05-30 16:38 c6t0d0s14 -> ../../devices/pci@0,0/pci1043,81ec@1a,7/storage@3/disk@0,0:o,raw
lrwxrwxrwx 1 root root 64 2009-05-30 16:38 c6t0d0s15 -> ../../devices/pci@0,0/pci1043,81ec@1a,7/storage@3/disk@0,0:p,raw
lrwxrwxrwx 1 root root 64 2009-05-30 16:38 c6t0d0s2 -> ../../devices/pci@0,0/pci1043,81ec@1a,7/storage@3/disk@0,0:c,raw
lrwxrwxrwx 1 root root 64 2009-05-30 16:38 c6t0d0s3 -> ../../devices/pci@0,0/pci1043,81ec@1a,7/storage@3/disk@0,0:d,raw
lrwxrwxrwx 1 root root 64 2009-05-30 16:38 c6t0d0s4 -> ../../devices/pci@0,0/pci1043,81ec@1a,7/storage@3/disk@0,0:e,raw
lrwxrwxrwx 1 root root 64 2009-05-30 16:38 c6t0d0s5 -> ../../devices/pci@0,0/pci1043,81ec@1a,7/storage@3/disk@0,0:f,raw
lrwxrwxrwx 1 root root 64 2009-05-30 16:38 c6t0d0s6 -> ../../devices/pci@0,0/pci1043,81ec@1a,7/storage@3/disk@0,0:g,raw
lrwxrwxrwx 1 root root 64 2009-05-30 16:38 c6t0d0s7 -> ../../devices/pci@0,0/pci1043,81ec@1a,7/storage@3/disk@0,0:h,raw
lrwxrwxrwx 1 root root 64 2009-05-30 16:38 c6t0d0s8 -> ../../devices/pci@0,0/pci1043,81ec@1a,7/storage@3/disk@0,0:i,raw
lrwxrwxrwx 1 root root 64 2009-05-30 16:38 c6t0d0s9 -> ../../devices/pci@0,0/pci1043,81ec@1a,7/storage@3/disk@0,0:j,raw
この場合、c6t0d0p0として扱ってよいらしい。 p#とかs#って何だ?
2. ZFS poolを構成する。
ディスク c6t0d0p0 に xpoolと言う名前のpoolを作りたい。 zpool listで確認
# zpool create xpool c6t0d0p0
# zpool list
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
rpool 149G 33.9G 115G 22% ONLINE -
xpool 74.5G 74.5K 74.5G 0% ONLINE -
おおでけたでけた。
3. ファイルシステムを作る。同時にマウントもされる。
# zfs create xpool/hdps
# zfs list
NAME USED AVAIL REFER MOUNTPOINT
rpool 34.3G 112G 75K /rpool
rpool/ROOT 5.87G 112G 18K legacy
rpool/ROOT/opensolaris 80.5M 112G 2.91G /
rpool/ROOT/opensolaris-1 5.79G 112G 4.13G /
rpool/dump 1011M 112G 1011M -
rpool/export 26.5G 112G 19K /export
rpool/export/home 26.5G 112G 19K /export/home
rpool/export/home/x045dd 26.5G 112G 26.5G /export/home/x045dd
rpool/swap 1011M 113G 543M -
xpool 98K 73.3G 19K /xpool
xpool/hdps 19K 73.3G 19K /xpool/hdps
コメント
コメントを投稿
「コメントを投稿できるユーザー」の範囲は変更される可能性があります。