Agregar nuevo disco en solaris 10

Hola a todos, en esta oportunidad veremos como añadir un disco duro, y montarlo en la partición /opt

Reviso mi tabla de particiones actual con el comando df -h


# df -h
Filesystem             size   used  avail capacity  Mounted on
/dev/dsk/c1t0d0s0       48G    12G    35G    26%    /
/devices                 0K     0K     0K     0%    /devices
ctfs                     0K     0K     0K     0%    /system/contract
proc                     0K     0K     0K     0%    /proc
mnttab                   0K     0K     0K     0%    /etc/mnttab
swap                    36G  1008K    36G     1%    /etc/svc/volatile
objfs                    0K     0K     0K     0%    /system/object
sharefs                  0K     0K     0K     0%    /etc/dfs/sharetab
/usr/lib/libc/libc_hwcap1.so.1
                        48G    12G    35G    26%    /lib/libc.so.1
fd                       0K     0K     0K     0%    /dev/fd
/dev/dsk/c1t0d0s3       29G   1.6G    27G     6%    /var
swap                    36G    36K    36G     1%    /tmp
swap                    36G    40K    36G     1%    /var/run
/dev/dsk/c1t1d0s0       98G   342M    97G     1%    /opt
/dev/dsk/c1t0d0s7       91G    93M    90G     1%    /export/home


Usamos el Comando Format para acceder a la administración de los discos y particiones.

# format
Searching for disks...done

AVAILABLE DISK SELECTIONS:
       0. c1t0d0
          /pci@0,0/pci15ad,1976@10/sd@0,0
       1. c1t1d0
          /pci@0,0/pci15ad,1976@10/sd@1,0

Seleccionamos el disco que vamos a trabajar, en este caso el disco nuevo es de 100 GB, y como es el segundo disco presentado le asignara el ID 1, al primer disco que se le presento al momento de la instalación le asigno el ID 0

Specify disk (enter its number): 1
selecting c1t1d0
[disk formatted]

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
        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
        inquiry    - show vendor, product and revision
        volname    - set 8-character volume name
        !     - execute , then return
        quit

Usamos el Comando Fdisk para crear las particiones del mismo

format> fdisk

Como es un disco nuevo nos saldrá el siguiente mensaje donde indica si usaremos la tabla de particiones por defecto a esa pregunta responderemos que si 

No fdisk table exists. The default partition for the disk is:

a 100% "SOLARIS System" partition

Type "y" to accept the default partition, otherwise type "n" to edit the
partition table.
y

precederemos a escribir el comando label que nos permite guardar los cambios realizados. 

format> label
Ready to label disk, continue? yes
format>

precederemos a escribir el comando partition para administrar las particiones de nuestro disco nuevo.

format> partition

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
        ! - execute , then return
        quit

con el comando print nos mostrara la tabla de particiones actual.

partition> print
Current partition table (original):
Total disk cylinders available: 13051 + 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 - 13050       99.98GB    (13051/0/0) 209664315
  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 unassigned    wm       0                0         (0/0/0)             0

Seleccionaremos la partición 0 que es la primera y  sobre esta alojaremos los 100 GB disponibles. 

partition> 0

Part      Tag    Flag     Cylinders         Size            Blocks
  0 unassigned    wm       0                0         (0/0/0)             0

Enter partition id tag[unassigned]: [ENTER]
Enter partition permission flags[wm]: [ENTER]
Enter new starting cyl[0]: 1
Enter partition size[0b, 0c, 1e, 0.00mb, 0.00gb]: 99.50
partition>

con el comando print nos mostrara la tabla de particiones nueva.

partition> print
Current partition table (original):
Total disk cylinders available: 13051 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders         Size            Blocks
  0 unassigned    wm       1 - 12989       99.50GB    (12989/0/0) 208668285
  1 unassigned    wm       0                0         (0/0/0)             0
  2     backup    wu       0 - 13050       99.98GB    (13051/0/0) 209664315
  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 unassigned    wm       0                0         (0/0/0)             0

precederemos a escribir el comando label que nos permite guardar los cambios realizados. 

format> label
Ready to label disk, continue? yes
format> 


Si deseo que la partición se monte desde el inicio del sistema operativo añado la siguiente linea en el archivo /etc/vfstab

# vi /etc/vfstab
#device         device          mount           FS      fsck    mount   mount
#to mount       to fsck         point           type    pass    at boot options
#
fd      -       /dev/fd fd      -       no      -
/proc   -       /proc   proc    -       no      -
/dev/dsk/c1t0d0s1       -       -       swap    -       no      -
/dev/dsk/c1t0d0s0       /dev/rdsk/c1t0d0s0      /       ufs     1       no      -
/dev/dsk/c1t0d0s3       /dev/rdsk/c1t0d0s3      /var    ufs     1       no      -
/dev/dsk/c1t0d0s7       /dev/rdsk/c1t0d0s7      /export/home    ufs     2       yes     -
/devices        -       /devices        devfs   -       no      -
sharefs -       /etc/dfs/sharetab       sharefs -       no      -
ctfs    -       /system/contract        ctfs    -       no      -
objfs   -       /system/object  objfs   -       no      -
swap    -       /tmp    tmpfs   -       yes     -
/dev/dsk/c1t1d0s0       /dev/rdsk/c1t1d0s0      /opt    ufs     2       yes     -

Reviso mi tabla de particiones nueva  con el comando df -h y me puedo fijar que la partición nueva se encuentra montada. 

# df -h
Filesystem             size   used  avail capacity  Mounted on
/dev/dsk/c1t0d0s0       48G    12G    35G    26%    /
/devices                 0K     0K     0K     0%    /devices
ctfs                     0K     0K     0K     0%    /system/contract
proc                     0K     0K     0K     0%    /proc
mnttab                   0K     0K     0K     0%    /etc/mnttab
swap                    36G  1008K    36G     1%    /etc/svc/volatile
objfs                    0K     0K     0K     0%    /system/object
sharefs                  0K     0K     0K     0%    /etc/dfs/sharetab
/usr/lib/libc/libc_hwcap1.so.1
                        48G    12G    35G    26%    /lib/libc.so.1
fd                       0K     0K     0K     0%    /dev/fd
/dev/dsk/c1t0d0s3       29G   1.6G    27G     6%    /var
swap                    36G    36K    36G     1%    /tm
swap                    36G    40K    36G     1%    /var/run
/dev/dsk/c1t1d0s0       98G   342M    97G     1%    /opt
/dev/dsk/c1t0d0s7       91G    93M    90G     1%    /export/home


Saludos Cordiales
visiten mi pagina www.camtrunet.net

Comentarios

Entradas populares de este blog

Comandos Solaris

MikroTik QoS Script generator

Comando para eliminar saltos de linea en fichero o archivo desde consola Linux