viernes, 7 de junio de 2013

Agregar Nuevo disco a Solaris 10 en XenServer Citrix

1) Comentar en /etc/vfstab

# vim /etc/vfstab

/dev/dsk/c1d0s0 /dev/rdsk/c1d0s0 /punto/de/montaje ufs 1 yes

2) Utilizamos el comando format, si no lo vemos con format primero utilizamos el devfsam con los siguientes parámetros para que refresque los devices:

# devfsadm -Cc disk

# format
Searching for disks...done

AVAILABLE DISK SELECTIONS:
       0. c0d0
          /pci@0,0/pci-ide@1,1/ide@0/cmdk@0,0
       1. c0d1
          /pci@0,0/pci-ide@1,1/ide@0/cmdk@1,0
       2. c1d0
          /pci@0,0/pci-ide@1,1/ide@1/cmdk@0,0
Specify disk (enter its number): 2

selecting c1d0
Controller working list found
[disk formatted, defect list found]

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

format> part
WARNING - This disk may be in use by an application that has
          modified the fdisk table. Ensure that this disk is
          not currently in use before proceeding to use fdisk.

format> fdisk
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

format> part

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


partition> print
Current partition table (original):
Total disk cylinders available: 14356 + 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 - 14355      109.97GB    (14356/0/0) 230629140
  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
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]: ENTER
Enter partition size[0b, 0c, 0e, 0.00mb, 0.00gb]: 109.97gb
partition>



partition> print
Current partition table (unnamed):
Total disk cylinders available: 14356 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders         Size            Blocks
  0 unassigned    wm       0 - 14355      109.97GB    (14356/0/0) 230629140
  1 unassigned    wm       0                0         (0/0/0)             0
  2     backup    wu       0 - 14355      109.97GB    (14356/0/0) 230629140
  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> label
Ready to label disk, continue? y

partition> quit

format> label
Ready to label disk, continue? y


# mount /usr/local/apps/SDK
mount: /dev/dsk/c1d0s0 is not this fstype


# newfs /dev/dsk/c1d0s0
newfs: construct a new file system /dev/rdsk/c1d0s0: (y/n)? y
Warning: 4332 sector(s) in last cylinder unallocated
/dev/rdsk/c1d0s0:       230629140 sectors in 37538 cylinders of 48 tracks, 128 sectors
        112611.9MB in 2347 cyl groups (16 c/g, 48.00MB/g, 5824 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 98464, 196896, 295328, 393760, 492192, 590624, 689056, 787488, 885920,
Initializing cylinder groups:
..............................................
super-block backups for last 10 cylinder groups at:
 229740704, 229839136, 229937568, 230036000, 230134432, 230232864, 230331296,
 230429728, 230528160, 230626592


# vim /etc/vfstab
Descomentar:

/dev/dsk/c1d0s0        /dev/rdsk/c1d0s0        /punto/de/montaje     ufs     1       yes     -


# mount /punto/de/montaje


# ls -l /punto/de/montaje
total 16
drwx------   2 root     root        8192 Jun  7 21:50 lost+found


# df -h | grep c1d0s0
Filesystem             size   used  avail capacity  Mounted on
/dev/dsk/c1d0s0        108G    64M   107G     1%    /punto/de/montaje


No hay comentarios: