Solaris 資料一覧
Solaris10 x86にディスクを増設する
2008/3/15更新
対応バージョン: 10 x86
Solaris10 x86にディスクを増設するには以下の手順で行う。
デバイス認識
まずデバイスをOSから認識させるために、/にreconfigureという空ファイルを作成してリブートする。
# touch /reconfigure
これにより、次回起動時にデバイスノードが再構成される。
/reconfigureは自動的に削除される。
パーティション設定
次にfdiskコマンドにてパーティションの設定を行う。
ここでは以前FreeBSD用に使用していた20GBのディスク「c1d0」を使用するものとし、以下の内容で設定する。
パーティションは1つ(全ディスクを使用)
スライスは1つ
# fdisk /dev/rdsk/c1d0p0 Total disk size is 2434 cylinders Cylinder size is 16065 (512 byte) blocks Cylinders Partition Status Type Start End Length % ========= ====== ============ ===== === ====== === 1 Active BSD OS 0 2434 2435 100 SELECT ONE OF THE FOLLOWING: 1. Create a partition 2. Specify the active partition 3. Delete a partition 4. Change between Solaris and Solaris2 Partition IDs 5. Exit (update disk configuration and exit) 6. Cancel (exit without updating disk configuration) Enter Selection: 3 ← まず既存のパーティションを削除 Specify the partition number to delete (or enter 0 to exit): ← 1 programs in this partition inaccessible (type "y" or "n"). ← y : SELECT ONE OF THE FOLLOWING: 1. Create a partition 2. Specify the active partition 3. Delete a partition 4. Change between Solaris and Solaris2 Partition IDs 5. Exit (update disk configuration and exit) 6. Cancel (exit without updating disk configuration) Enter Selection: 1 ← パーティション作成 1=SOLARIS2 2=UNIX 3=PCIXOS 4=Other 5=DOS12 6=DOS16 7=DOSEXT 8=DOSBIG 9=DOS16LBA A=x86 Boot B=Diagnostic C=FAT32 D=FAT32LBA E=DOSEXTLBA F=EFI 0=Exit? 1 ← Solarisパーティション Specify the percentage of disk to use for this partition (or type "c" to specify the size in cylinders). 100 ← ディスク全体を使用(100%) Should this become the active partition? If yes, it will be activated each time the computer is reset or turned on. Please type "y" or "n". ← y : Total disk size is 2434 cylinders Cylinder size is 16065 (512 byte) blocks Cylinders Partition Status Type Start End Length % ========= ====== ============ ===== === ====== === 1 Active Solaris2 1 2433 2433 100 SELECT ONE OF THE FOLLOWING: 1. Create a partition 2. Specify the active partition 3. Delete a partition 4. Change between Solaris and Solaris2 Partition IDs 5. Exit (update disk configuration and exit) 6. Cancel (exit without updating disk configuration) Enter Selection: 5 ← 変更を書き込んで終了
関連資料・記事
スライス設定
パーティションが作成できたらformatコマンドにてスライスを作成する。
# format AVAILABLE DISK SELECTIONS: 0. c0d0 <DEFAULT cyl 4862 alt 2 hd 255 sec 63> /pci@0,0/pci-ide@1f,1/ide@0/cmdk@0,0 1. c1d0 <DEFAULT cyl 2431 alt 2 hd 255 sec 63> /pci@0,0/pci-ide@1f,1/ide@1/cmdk@0,0 Specify disk (enter its number): 1 ← 増設ディスク FORMAT MENU: disk - select a disk type - select (define) a disk type partition - select (define) a partition table current - describe the current disk format - format and analyze the disk fdisk - run the fdisk program repair - repair a defective sector show - translate a disk address label - write label to the disk analyze - surface analysis defect - defect list management backup - search for backup labels verify - read and display labels save - save new disk/partition definitions volname - set 8-character volume name !<cmd> - execute <cmd>, then return quit format> p ← パーティションテーブル設定 PARTITION MENU: 0 - change `0' partition 1 - change `1' partition 2 - change `2' partition 3 - change `3' partition 4 - change `4' partition 5 - change `5' partition 6 - change `6' partition 7 - change `7' partition select - select a predefined table modify - modify a predefined partition table name - name the current table print - display the current table label - write partition map and label to the disk !<cmd> - execute <cmd>, then return quit partition> p ← 現在設定を表示 Current partition table (original): Total disk cylinders available: 2431 + 2 (reserved cylinders) Part Tag Flag Cylinders Size Blocks 0 unassigned wm 0 0 (0/0/0) 0 1 unassigned wm 0 0 (0/0/0) 0 2 backup wu 0 - 2430 18.62GB (2431/0/0) 39054015 3 unassigned wm 0 0 (0/0/0) 0 4 unassigned wm 0 0 (0/0/0) 0 5 unassigned wm 0 0 (0/0/0) 0 6 unassigned wm 0 0 (0/0/0) 0 7 unassigned wm 0 0 (0/0/0) 0 8 boot wu 0 - 0 7.84MB (1/0/0) 16065 9 alternates wm 1 - 2 15.69MB (2/0/0) 32130 partition> 0 ← パーティション0の設定 Part Tag Flag Cylinders Size Blocks 0 unassigned wm 0 0 (0/0/0) 0 Enter partition id tag[unassigned]: ← リターン(タグ不要) Enter partition permission flags[wm]: ← リターン(フラグはデフォルトでよい) Enter new starting cyl[0]: 3← 開始シリンダ(0〜2はシステムで使用) Enter partition size[0b, 0c, 3e, 0.00mb, 0.00gb]: 2428c ← 最初の3シリンダを除いたディスク全体 partition> p ← 設定結果を表示 Current partition table (unnamed): Total disk cylinders available: 2431 + 2 (reserved cylinders) Part Tag Flag Cylinders Size Blocks 0 unassigned wm 3 - 2430 18.60GB (2428/0/0) 39005820 1 unassigned wm 0 0 (0/0/0) 0 2 backup wu 0 - 2430 18.62GB (2431/0/0) 39054015 3 unassigned wm 0 0 (0/0/0) 0 4 unassigned wm 0 0 (0/0/0) 0 5 unassigned wm 0 0 (0/0/0) 0 6 unassigned wm 0 0 (0/0/0) 0 7 unassigned wm 0 0 (0/0/0) 0 8 boot wu 0 - 0 7.84MB (1/0/0) 16065 9 alternates wm 1 - 2 15.69MB (2/0/0) 32130 partition> name ← ディスクに名前を付与 Enter table name (remember quotes): ext1 ← 任意の名前 partition> label ← ラベリング Ready to label disk, continue? ← y partition> q format> q
ファイルシステム作成
パーティション/スライス設定が終ったらファイルシステムを作成する。
# newfs /dev/rdsk/c1d0s0 newfs: 新しいファイルシステム /dev/rdsk/c1d0s0 を作成しますか: (y/n)? ← y :
マウント
最後に実際にマウントしてみる。
# mkdir /ext1 # mount /dev/dsk/c1d0s0 /ext1 # df -k /ext1 ファイルシステム kbytes 使用済み 使用可能 容量 マウント先 /dev/dsk/c1d0s0 19207519 19065 18996379 1% /ext1
ブート時にマウントされるようにするには/etc/vfstabに以下のように記述しておく。
/dev/dsk/c1d0s0 /dev/rdsk/c1d0s0 /ext1 ufs 2 yes -