ほとんどの場合、ディスクは製造元によってフォーマットおよびパーティション化されます。このため、パーティションの構成を変更する場合は、パーティションまたはスライスのサイズを変更するか、パーティションのタイプを変更することによって、ディスクのパーティションまたはスライスを構成します。
Format ユーティリティーの partition オプションは、SPARC ベースのシステムのディスクスライスを構成します。このセクションでは、partition オプションの使用例を示します。
使用例 6-15 SPARC: ディスクスライスのサイズ変更この例では、ルートプールディスクのサイズが十分ではありません。最適なサイズにするには、ディスク領域の大部分がスライス 0 にある必要があります。パーティションのサイズを変更するには、現在のパーティションを変更します。
...Format Menu format> partition partition> print Current partition table (default): Total disk cylinders available: 14085 + 2 (reserved cylinders) Part Tag Flag Cylinders Size Blocks 0 root wm 1 - 13 129.19MB (13/0/0) 264576 1 swap wu 14 - 26 129.19MB (13/0/0) 264576 2 backup wu 0 - 14086 136.71GB (14087/0/0) 286698624 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 usr wm 27 - 14084 136.43GB (14058/0/0) 286108416 7 unassigned wm 0 0 (0/0/0) 0 8 boot wu 0 - 0 9.94MB (1/0/0) 20352 9 alternates wm 0 0 (0/0/0) 0 partition> modifyChange partition size. Select partitioning base: 0. Current partition table (default) 1. All Free Hog Choose base (enter number) [0]? 1 Part Tag Flag Cylinders Size Blocks 0 root wm 0 0 (0/0/0) 0 1 swap wu 0 0 (0/0/0) 0 2 backup wu 0 - 14084 136.69GB (14085/0/0) 286657920 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 usr wm 0 0 (0/0/0) 0 7 unassigned wm 0 0 (0/0/0) 0 8 boot wu 0 - 0 9.94MB (1/0/0) 20352 9 alternates wm 0 0 (0/0/0) 0 Do you wish to continue creating a new partition table based on above table[yes]? yes Free Hog partition[6]? 0 Enter size of partition '1' [0b, 0c, 0.00mb, 0.00gb]: Enter size of partition '3' [0b, 0c, 0.00mb, 0.00gb]: Enter size of partition '4' [0b, 0c, 0.00mb, 0.00gb]: Enter size of partition '5' [0b, 0c, 0.00mb, 0.00gb]: Enter size of partition '6' [0b, 0c, 0.00mb, 0.00gb]: Enter size of partition '7' [0b, 0c, 0.00mb, 0.00gb]: Part Tag Flag Cylinders Size Blocks 0 root wm 1 - 14084 136.68GB (14084/0/0) 286637568 1 swap wu 0 0 (0/0/0) 0 2 backup wu 0 - 14084 136.69GB (14085/0/0) 286657920 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 usr wm 0 0 (0/0/0) 0 7 unassigned wm 0 0 (0/0/0) 0 8 boot wu 0 - 0 9.94MB (1/0/0) 20352 9 alternates wm 0 0 (0/0/0) 0 Okay to make this the current partition table[yes]? yes Enter table name (remember quotes): "c2t0d0" Ready to label disk, continue? yes partition> q format> q
x86 ベースのシステムの fdisk パーティションを管理するには、Format ユーティリティーの fdisk オプションを使用します。
次の要件を満たしている場合は、ZFS ストレージプールに x86 タイプのディスクを使用できます。
ディスクに複数のパーティションがある場合、いずれかのパーティションは Solaris パーティションである必要があります。
fdisk のオプションを使用すると、Solaris パーティションが存在するかどうかを判別できます。存在しない場合は、Example 6–16 に示されているように作成します。
Solaris パーティションをディスク上でアクティブなパーティションにする必要があります。
アクティブなパーティションとは、システム起動時にデフォルトでオペレーティングシステムがブートされるパーティションのことです。
Solaris の fdisk パーティションは、シリンダ境界から開始する必要があります。
最初のディスクのシリンダ 0 は追加のブート情報 (マスターブートレコードを含む) を格納するために予約されているので、Solaris fdisk パーティションは最初のディスクのシリンダ 0 から開始しないでください。
Solaris fdisk パーティションには、ディスク全体を使用するか、ディスクの一部のみを使用してほかのパーティションのための領域を残すことができます。
ディスクに十分な領域がある場合は、ディスク上の既存のパーティションを再構成しなくても、新しいパーティションを作成できます。
すべての fdisk パーティションには識別子があります。Solaris のパーティションには 2 つの識別子があります。
Solaris は 0x82 識別子を使用します。
Solaris2 は 0xbf 識別子を使用します。
Oracle Solaris のすべてのコマンド、ユーティリティー、およびドライバは、fdisk の機能に影響を与えずに、どちらの識別子を使用しても機能するように更新されました。このため、次のように fdisk メニューから該当するオプションを選択することによって、2 つの識別子を切り替えることができます。
format > fdisk ... 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 IDsToggle between identifiers 5. Edit/View extended partitions 6. Exit (update disk configuration and exit) 7. Cancel (exit without updating disk configuration)
次の例は、c8t3d0 ドライブ全体を使用して Solaris fdisk パーティションを作成する方法を示しています。
# format Searching for disks...done AVAILABLE DISK SELECTIONS: 0. c8t0d0 <SEAGATE-ST973401LSUN72G-0556 cyl 8921 alt 2 hd 255 sec 63> /pci@0,0/pci1022,7458@11/pci1000,3060@4/sd@0,0 /dev/chassis/SYS/HD0/disk 1. c8t1d0 <SEAGATE-ST973401LSUN72G-0556 cyl 8921 alt 2 hd 255 sec 63> /pci@0,0/pci1022,7458@11/pci1000,3060@4/sd@1,0 /dev/chassis/SYS/HD1/disk 2. c8t2d0 <SEAGATE-ST973401LSUN72G-0556-68.37GB> /pci@0,0/pci1022,7458@11/pci1000,3060@4/sd@2,0 /dev/chassis/SYS/HD2/disk 3. c8t3d0 <SEAGATE-ST973401LSUN72G-0556 cyl 14087 alt 2 hd 24 sec 424> /pci@0,0/pci1022,7458@11/pci1000,3060@4/sd@3,0 /dev/chassis/SYS/HD3/disk Specify disk (enter its number): 3 selecting c8t3d0 [disk formatted] No Solaris fdisk partition found. format> fdisk No fdisk table exists. The default partitioning for your disk is: a 100% "SOLARIS System" partition. Type "y" to accept the default partition, otherwise type "n" to edit the partition table. y format> label Ready to label disk, continue? yes format> quit使用例 6-17 x86: x86 パーティションから Solaris パーティションへの変換
この例は、既存のパーティションを Solaris パーティションに変換する方法を示しています。ほとんどの x86 ベースのシステムでは、デフォルトでディスクに EFI ラベルが付けられています。パーティションタイプを変更するには、最初に既存のパーティションを破棄します。パーティションタイプを変更すると、ラベルも自動的に変更されます。このディスクは元々 EFI ディスクであるため、format –e コマンドを使用して Format ユーティリティーを起動します。
# format -e ... format> fdisk FORMAT MENU: disk - select a disk type - select (define) a disk type Total disk size is 17833 cylinders Cylinder size is 16065 (512 byte) blocks Cylinders Partition Status Type Start End Length % ========= ====== ============ ===== === ====== === 1 EFI 0 17833 17834 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. Edit/View extended partitions 6. Exit (update disk configuration and exit) 7. Cancel (exit without updating disk configuration) Enter Selection: 3 Specify the partition number to delete (or enter 0 to exit): 1 This will make all files and programs in this partition inaccessible (type "y" or "n"). y Enter Selection: 1 Select the partition type to create: 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 (Protective) G=EFI_SYS 0=Exit? 1 Specify the percentage of disk to use for this partition (or type "c" to specify the size in cylinders). 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 Enter Selection: 6 Partition 1 is now the active partition.