Friday, 21 February 2014

Solaris 10 Disk Slicing

After successfully discovering and attaching SAN LUNs you have to partition them. Follow below mentioned steps to slice Solaris 10 partitions. 

#Log in as root
(a)          #Format
0. c0t0d0 <SUN300G cyl 46873 alt 2 hd 20 sec 625>solaris/pci@0,600000/pci@0/pci@8/pci@0/scsi@1/sd@0,0
1. c4t60A99xxx572D4436476F6F6465502D46d0 <NETAPP-LUN-YYYY cyl 2046 alt 2 hd 16 sec 128>/scsi_vhci/ssd@g60a99xxx572d4436476f6f6465502d46
2. c4t60A99xxx572D4436476F6F646551527Ad0 <NETAPP-LUN-YYYY cyl 6398 alt 2 hd 16 sec 2048> /scsi_vhci/ssd@g60a99xxx572d4436476f6f646551527a
3. c4t60A99xxx572D4436476F6F6465515278d0 <NETAPP-LUN-YYYY cyl 6398 alt 2 hd 16 sec 2048> /scsi_vhci/ssd@g60a99xxx572d4436476f6f6465515278
4. c4t60A99xxx572D4436476F6F6465515274d0 <NETAPP-LUN-YYYY cyl 6398 alt 2 hd 16 sec 2048>/scsi_vhci/ssd@g60a99xxx572d4436476f6f6465515274
5. c4t60A99xxx572D4436476F6F6465515272d0 <NETAPP-LUN-YYYY cyl 6398 alt 2 hd 16 sec 1024>/scsi_vhci/ssd@g60a99xxx572d4436476f6f6465515272
6. c4t60A99xxx572D4436476F6F6465515276d0 <NETAPP-LUN-YYYY cyl 6398 alt 2 hd 16 sec 2048>/scsi_vhci/ssd@g60a99xxx572d4436476f6f6465515276
7. c4t60A99xxx572D4436476F6F6465506658d0 <NETAPP-LUN-YYYY cyl 2046 alt 2 hd 16 sec 128> /scsi_vhci/ssd@g60a99xxx572d4436476f6f6465506658
8. c4t60A99xxx572D4436476F6F6465506658d0 <NETAPP-LUN-YYYY cyl 2046 alt 2 hd 16 sec 128> /scsi_vhci/ssd@g60a99xxx572d4436476f6f6465506658



(b)          Specify disk (enter its number): 1
Selecting c4t60A99xxx572D4436476F6F6465502D46d0
(c)          format> p  (Press ‘p’ to ‘print’ the menu)
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
        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
        !<cmd>     - execute <cmd>, then return
        Quit

(d)          format> format
Ready to format.  Formatting cannot be interrupted
and takes 11 minutes (estimated). Continue? yes
Beginning format. The current time is Sat Jan  5 14:12:34 2013

Formatting...
Formatting...
done

Verifying media...
        pass 0 - pattern = 0xc6dec6de
   0/0/0 
   0/0/126 
   0/1/124  ……….
Total of 0 defective blocks repaired.

(e)          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

(f)           partition> p
Current partition table (default):
Total disk cylinders available: 6398 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders        Size            Blocks
  0       root    wm       0 -    7      128.00MB    (8/0/0)       262144
  1       swap    wu       8 -   15      128.00MB    (8/0/0)       262144
  2     backup    wu       0 - 6397       99.97GB    (6398/0/0) 209649664
  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      16 - 6397       99.72GB    (6382/0/0) 209125376
  7 unassigned    wm       0               0         (0/0/0)            0

(g)          partition> 0 (Assign 48Mb to root slice’0’)
Part      Tag    Flag     Cylinders        Size            Blocks
  0       root    wm       0 -    7      128.00MB    (8/0/0)       262144


(h)          Enter partition id tag[root]:
(i)            Enter partition permission flags[wm]:
(j)            Enter new starting cyl[0]: 0
(k)          Enter partition size[262144b, 8c, 7e, 128.00mb, 0.12gb]: 48m
(l)            partition> p (Check the assigned partition)


Current partition table (unnamed):
Total disk cylinders available: 6398 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders        Size            Blocks
  0       root    wm       0 -    2       48.00MB    (3/0/0)        98304



(m)         partition> 1

Part      Tag    Flag     Cylinders        Size            Blocks
  1       swap    wu       8 -   15      128.00MB    (8/0/0)       262144

(n)          Enter partition id tag[swap]:
(o)          Enter partition permission flags[wu]:
(p)          Enter new starting cyl[8]: 0
(q)          Enter partition size[262144b, 8c, 7e, 128.00mb, 0.12gb]: 0
(r)           partition> p

Current partition table (unnamed):
Total disk cylinders available: 6398 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders        Size            Blocks
  0       root    wm       0 -    2       48.00MB    (3/0/0)        98304
1         unassigned    wu       0               0         (0/0/0)           



(s)          partition> 4

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



(t)            Enter partition id tag[unassigned]:
(u)          Enter partition permission flags[wm]:
(v)          Enter new starting cyl[0]: 3
(w)         Enter partition size[0b,0c,3e,0.00mb,0.00gb]: $
(x)          partition> p(Now check the partition table and null all the slices (as mentioned in steps j->n above) except slice 0 and 4)
(y)          partition> label
(z)          Ready to label disk, continue? Yes (you may label disks on the 2nd node in a cluster setup)