Friday, May 25, 2012

Solaris Discover New LUN

# cfgadm -al
Ap_Id                          Type         Receptacle   Occupant     Condition
c1                             scsi-sata    connected    configured   unknown
c1::dsk/c1t0d0                 disk         connected    configured   unknown
c1::dsk/c1t1d0                 disk         connected    configured   unknown
c1::dsk/c1t2d0                 disk         connected    configured   unknown
c1::dsk/c1t3d0                 disk         connected    configured   unknown
c1::dsk/c1t4d0                 disk         connected    configured   unknown
c1::dsk/c1t5d0                 disk         connected    configured   unknown
c1::dsk/c1t6d0                 disk         connected    configured   unknown
c1::dsk/c1t7d0                 disk         connected    configured   unknown
c1::dsk/c1t8d0                 disk         connected    configured   unknown
c1::dsk/c1t9d0                 disk         connected    configured   unknown
c1::dsk/c1t10d0                disk         connected    configured   unknown
c1::dsk/c1t11d0                disk         connected    configured   unknown
c1::dsk/c1t12d0                disk         connected    configured   unknown
c1::dsk/c1t13d0                disk         connected    configured   unknown
c1::dsk/c1t14d0                disk         connected    configured   unknown
c1::dsk/c1t15d0                disk         connected    configured   unknown
c1::es/ses0                    ESI          connected    configured   unknown
c1::smp/expd0                  smp          connected    configured   unknown
c2                             fc-fabric    connected    configured   unknown
c2::5006016646e04c1b           unavailable  connected    unconfigured failed
c2::5006016d46e04c1b           disk         connected    configured   unknown
c2::5006048ad531e56c           disk         connected    configured   unknown
c2::500a0983868821ec           disk         connected    configured   unknown
c2::500a0983968821ec           disk         connected    configured   unknown
c3                             fc-fabric    connected    configured   unknown
c3::5006016546e04c1b           disk         connected    configured   unknown
c3::5006016e46e04c1b           disk         connected    configured   unknown
c3::5006048ad531e562           disk         connected    configured   unknown
c3::500a0984968821ec           disk         connected    configured   unknown

# luxadm -e port
/devices/pci@500/pci@0/pci@c/SUNW,qlc@0/fp@0,0:devctl              CONNECTED
/devices/pci@500/pci@0/pci@c/SUNW,qlc@0,1/fp@0,0:devctl            CONNECTED

rescan deeply LUNs attached to each HBA - Force Fibre Channel SAN disk rescan, :
# luxadm -e dump_map /devices/pci@500/pci@0/pci@c/SUNW,qlc@0/fp@0,0:devctl
# luxadm -e dump_map /devices/pci@500/pci@0/pci@c/SUNW,qlc@0,1/fp@0,0:devctl

then in format command, you will find the new LUN 24(with scsi_vhci displayed!!):
      16. c2t500A0983868821ECd0 <NETAPP-LUN-7320 cyl 6480 alt 2 hd 16 sec 10112>
          /pci@500/pci@0/pci@c/SUNW,qlc@0/fp@0,0/ssd@w500a0983868821ec,0
      17. c2t500A0983968821ECd0 <NETAPP-LUN-7320 cyl 6480 alt 2 hd 16 sec 10112>
          /pci@500/pci@0/pci@c/SUNW,qlc@0/fp@0,0/ssd@w500a0983968821ec,0
      18. c2t5006016D46E04C1Bd0 <DGC-VRAID-0531 cyl 44556 alt 2 hd 255 sec 189>
          /pci@500/pci@0/pci@c/SUNW,qlc@0/fp@0,0/ssd@w5006016d46e04c1b,0
      19. c2t5006048AD531E56Cd0 <EMC-SYMMETRIX-5773 cyl 1 alt 2 hd 15 sec 128>
          /pci@500/pci@0/pci@c/SUNW,qlc@0/fp@0,0/ssd@w5006048ad531e56c,0
      20. c3t500A0984968821ECd0 <NETAPP-LUN-7320 cyl 6480 alt 2 hd 16 sec 10112>
          /pci@500/pci@0/pci@c/SUNW,qlc@0,1/fp@0,0/ssd@w500a0984968821ec,0
      21. c3t5006016E46E04C1Bd0 <DGC-VRAID-0531 cyl 44556 alt 2 hd 255 sec 189>
          /pci@500/pci@0/pci@c/SUNW,qlc@0,1/fp@0,0/ssd@w5006016e46e04c1b,0
      22. c3t5006048AD531E562d0 <EMC-SYMMETRIX-5773 cyl 1 alt 2 hd 15 sec 128>
          /pci@500/pci@0/pci@c/SUNW,qlc@0,1/fp@0,0/ssd@w5006048ad531e562,0
      23. c3t5006016546E04C1Bd0 <DGC-VRAID-0531 cyl 44556 alt 2 hd 255 sec 189>
          /pci@500/pci@0/pci@c/SUNW,qlc@0,1/fp@0,0/ssd@w5006016546e04c1b,0
      24. c4t60060160CC802900B2922A2B74B4E011d0 <DGC-VRAID-0531 cyl 44556 alt 2 hd 255 sec 189>
          /scsi_vhci/ssd@g60060160cc802900b2922a2b74b4e011

notice 24  '/scsi_vhci' is the LUN.


other useful commands:
# luxadm display /dev/rdsk/c4t60060160CC802900B2922A2B74B4E011d0s2
DEVICE PROPERTIES for disk: /dev/rdsk/c4t60060160CC802900B2922A2B74B4E011d0s2
  Vendor:               DGC
  Product ID:           VRAID
  Revision:             0531
  Serial Num:           APM00111103781
  Unformatted capacity: 1048576.000 MBytes
  Read Cache:           Enabled
    Minimum prefetch:   0x0
    Maximum prefetch:   0x0
  Device Type:          Disk device
  Path(s):

  /dev/rdsk/c4t60060160CC802900B2922A2B74B4E011d0s2
  /devices/scsi_vhci/ssd@g60060160cc802900b2922a2b74b4e011:c,raw
   Controller           /devices/pci@500/pci@0/pci@c/SUNW,qlc@0/fp@0,0
    Device Address              5006016646e04c1b,0
    Host controller port WWN    21000024ff2fc2f0
    Class                       primary
    State                       ONLINE

HBA WWWN:
# prtpicl -v -c scsi-fcp | grep port-wwn
  :port-wwn      21  00  00  24  ff  2f  c2  f0
  :port-wwn      21  00  00  24  ff  2f  c2  f1

or
# fcinfo hba-port -l |grep HBA
HBA Port WWN: 21000024ff30340e
HBA Port WWN: 21000024ff30340f

# luxadm probe
No Network Array enclosures found in /dev/es

Found Fibre Channel device(s):
  Node WWN:500a0980868821ec  Device Type:Disk device
    Logical Path:/dev/rdsk/c2t500A0983868821ECd0s2
    Logical Path:/dev/rdsk/c2t500A0983968821ECd0s2
    Logical Path:/dev/rdsk/c3t500A0984968821ECd0s2
  Node WWN:50060160c6e04c1b  Device Type:Disk device
    Logical Path:/dev/rdsk/c2t5006016D46E04C1Bd0s2
    Logical Path:/dev/rdsk/c3t5006016E46E04C1Bd0s2
    Logical Path:/dev/rdsk/c3t5006016546E04C1Bd0s2
  Node WWN:5006048ad531e56c  Device Type:Disk device
    Logical Path:/dev/rdsk/c2t5006048AD531E56Cd0s2
  Node WWN:5006048ad531e562  Device Type:Disk device
    Logical Path:/dev/rdsk/c3t5006048AD531E562d0s2
  Node WWN:50060160c6e04c1b  Device Type:Disk device
    Logical Path:/dev/rdsk/c4t60060160CC802900B2922A2B74B4E011d0s2

Label the disk
# format
Searching for disks...done
c1t600144F0F05E906C00004ED6096D0001d0: configured with capacity of 63.93GB

AVAILABLE DISK SELECTIONS:
[...]
       4. c1t600144F0F05E906C00004ED6096D0001d0 <SUN-SunStorage7210-1.0 cyl 2078 alt 2 hd 254 sec 254>
          /scsi_vhci/ssd@g600144f0f05e906c00004ed6096d0001
[...]
Specify disk (enter its number): 4
selecting c1t600144F0F05E906C00004ED6096D0001d0
[disk formatted]
Disk not labeled.  Label it now? y

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

Find the WWN of the HBA's on a host:
create metadevice for SAN LUN:
# luxadm probe |grep c4t600601602A802C00F27396FDFF17E211d0
    Logical Path:/dev/rdsk/c4t600601602A802C00F27396FDFF17E211d0s2
# metastat d620
metastat: inf-bccsx0dat01: d620: No such file or directory
# metainit d620 1 1 /dev/rdsk/c4t600601602A802C00F27396FDFF17E211d0s2
d620: Concat/Stripe is setup# metainit d620 1 1 /dev/rdsk/c4t600601602A802C00F27396FDFF17E211d0s2
metainit: inf-bccsx0dat01: d620: unit already set up
# metastat -p

d3 -m d13 d23 1
d13 1 1 c1t0d0s3
d23 1 1 c1t1d0s3
d1 -m d11 d21 1
d11 1 1 c1t0d0s1
d21 1 1 c1t1d0s1
d0 -m d10 d20 1
d10 1 1 c1t0d0s0
d20 1 1 c1t1d0s0
d620 1 1 /dev/dsk/c4t600601602A802C00F27396FDFF17E211d0s2
d6010 -p d6000 -o 48224 -b 1782579200
d6000 1 1 /dev/dsk/c4t60060160C5302E0024E16D0B8177E111d0s6
d611 -p d610 -o 32288 -b 2097152000
d610 1 1 c4t60060480000190105493533033443843d0s2
d802 -p d8 -o 6311936 -b 566231040
d8 -m d18 d28 1
d18 1 2 c1t4d0s6 c1t5d0s6 -i 64b
d28 1 2 c1t6d0s6 c1t7d0s6 -i 64b
d801 -p d8 -o 20416 -b 6291456
d60 -p d6 -o 171966592 -b 33554432
d6 -m d16 d26 1
d16 1 1 c1t0d0s6
d26 1 1 c1t1d0s6
d302 -p d6 -o 159383648 -b 12582912
d301 -p d6 -o 146800704 -b 12582912
d80 -p d6 -o 32 -b 146800640
# newfs /dev/md/rdsk/d620

# mkdir -p /oracle/emc01
# echo "/dev/md/dsk/d620  /dev/md/rdsk/d220         /oracle/emc01     ufs     1       yes     -" >> /etc/vfstab
# mount /oracle/emc01


don't do below, it is used to prove you can recreate newfs =========================================================================
bash-3.00# newfs /dev/md/rdsk/d620
newfs: construct a new file system /dev/md/rdsk/d620: (y/n)? y
Warning: 732 sector(s) in last cylinder unallocated
/dev/md/rdsk/d620:      2147376420 sectors in 349508 cylinders of 48 tracks, 128 sectors
        1048523.6MB in 21845 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:
 2146469280, 2146567712, 2146666144, 2146764576, 2146863008, 2146961440,
 2147059872, 2147158304, 2147256736, 2147355168
bash-3.00# newfs /dev/md/rdsk/d620
newfs: construct a new file system /dev/md/rdsk/d620: (y/n)? y
Warning: 732 sector(s) in last cylinder unallocated
/dev/md/rdsk/d620:      2147376420 sectors in 349508 cylinders of 48 tracks, 128 sectors
        1048523.6MB in 21845 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:
 2146469280, 2146567712, 2146666144, 2146764576, 2146863008, 2146961440,
 2147059872, 2147158304, 2147256736, 2147355168

No comments:

Post a Comment