En la mayoría de los casos, el fabricante formatea y particiona los discos. Por lo tanto, puede configurar particiones de discos si desea modificar la configuración de la partición, cambiando el tamaño del segmento o de la partición, cambiando el tipo de partición.
La opción partition de la utilidad format configurar segmentos del disco en sistemas basados en SPARC. En esta sección, se proporcionan ejemplos de uso de la opción partition.
Ejemplo 6-15 SPARC: Cambio de tamaño de un segmento de discoEn este ejemplo, el tamaño del disco de agrupación raíz no es suficiente. Para tener un tamaño óptimo, la mayor parte del espacio en disco debe estar en el segmento 0. Puede cambiar el tamaño de la partición mediante la modificación de la partición actual.
...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
Puede utilizar la opción fdisk de la utilidad format para administrar las particiones fdisk en sistemas basados en x86.
Puede utilizar discos de tipo x86 para agrupaciones de almacenamiento ZFS, siempre que se cumplan los requisitos siguientes:
Si el disco tiene varias particiones, una de ellas debe ser una partición Solaris.
Con la opción fdisk, puede determinar si ya existe la partición de Solaris. En caso contrario, cree una, como se muestra en Example 6–16.
La partición de Solaris debe convertirse en la partición activa del disco.
La partición activa es la partición cuyo sistema operativo se iniciará de manera predeterminada al iniciar el sistema.
Las particiones fdisk de Solaris deben comenzar en límites de cilindros.
Las particiones fdisk de Solaris no deben empezar en el cilindro 0 del primer disco, ya que se reserva para almacenar información de inicio adicional, incluido el registro de inicio maestro.
La partición fdisk de Solaris puede ser todo el disco o solamente parte de este a fin de dejar espacio para otras particiones.
Siempre que el disco tenga suficiente espacio, puede crear nuevas particiones sin tener que volver a configurar las particiones existentes del disco.
Todas las particiones fdisk tienen identificadores. Una partición de Solaris tiene dos identificadores:
Solaris usa el identificador 0x82.
Solaris2 usa el identificador 0xbf.
Se actualizaron todos los comandos, utilidades y controladores de Oracle Solaris para que funcionen con cualquier identificador sin afectar la funcionalidad de fdisk. Por lo tanto, puede cambiar entre los dos identificadores seleccionando la opción adecuada del menú fdisk de la siguiente manera:
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)
El siguiente ejemplo muestra cómo crear una partición fdisk de Solaris que abarque toda la unidad c8t3d0.
# 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> quitEjemplo 6-17 x86: conversión de una partición x86 a una partición de Solaris
En este ejemplo, se muestra cómo convertir una partición existente a una partición de Solaris. De forma predeterminada, los discos tienen la etiqueta EFI en la mayoría de los sistemas basados en x86. Para cambiar un tipo de partición, primero debe eliminar la existente. Al cambiar los tipos de partición, las etiquetas también se cambian automáticamente. Dado que el disco es originalmente EFI, utilice el comando format –e para iniciar la utilidad 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.