Thursday, September 13, 2012

3PAR inserv not showing WWNs on the FC switch


After the 3par installation was complete and we were working on creating zones for the hosts.
We noticed the fc coming from insev nodes doesn't show the wwns on the switch.


Here are some information learned while talking to 3PAR support

All the ports connected to cage/chassis should be set to initiator
All the ports in front of the host should be configured as target.

I believe by default all ports are configured as mode type initiators.


Step #0. showport

Result:
3par cli% showport
N:S:P      Mode     State ----Node_WWN---- -Port_WWN/HW_Addr- Type Protocol
2:0:1 initiator     ready 2FF70002AC001477   22010002AC001477 disk       FC
2:0:2 initiator     ready 2FF70002AC001477   22020002AC001477 disk       FC
2:1:1    target loss_sync 2FF70002AC001477   22110002AC001477 free       FC
2:1:2    target loss_sync 2FF70002AC001477   22120002AC001477 free       FC
2:2:1 initiator     ready 2FF70002AC001477   22210002AC001477 disk       FC
2:2:2 initiator     ready 2FF70002AC001477   22220002AC001477 disk       FC
2:2:3 initiator     ready 2FF70002AC001477   22230002AC001477 free       FC  <--- should be target
2:2:4 initiator     ready 2FF70002AC001477   22240002AC001477 free       FC  <--- should be target
2:6:1      peer loss_sync                -       0002AC69249B rcip       IP
3:0:1 initiator     ready 2FF70002AC001477   23010002AC001477 disk       FC
3:0:2 initiator     ready 2FF70002AC001477   23020002AC001477 disk       FC
3:1:1    target loss_sync 2FF70002AC001477   23110002AC001477 free       FC
3:1:2    target loss_sync 2FF70002AC001477   23120002AC001477 free       FC
3:2:1 initiator     ready 2FF70002AC001477   23210002AC001477 disk       FC
3:2:2 initiator     ready 2FF70002AC001477   23220002AC001477 disk       FC
3:2:3 initiator     ready 2FF70002AC001477   23230002AC001477 free       FC  <--- should be target
3:2:4 initiator     ready 2FF70002AC001477   23240002AC001477 free       FC  <--- should be target
3:6:1      peer loss_sync                -       0002AC6A2867 rcip       IP
---------------------------------------------------------------------------
   18



Step #1. Change all ports which would connect to hosts as targets
Assuming you have 4 connections to the fc switch
controlport rst -m target  2:2:3
controlport rst -m target  2:2:4
controlport rst -m target  3:2:3
controlport rst -m target  3:2:4


Results:
3par cli% controlport rst -m target  2:2:3
Are you sure you want to run controlport rst -m target on port 2:2:3?
select q=quit y=yes n=no: y

>>>>>repeat the same other ports


Step #2 showport -c

Result:
3par_F400_mcomNY01 cli% showport
N:S:P      Mode     State ----Node_WWN---- -Port_WWN/HW_Addr- Type Protocol
2:0:1 initiator     ready 2FF70002AC001477   22010002AC001477 disk       FC
2:0:2 initiator     ready 2FF70002AC001477   22020002AC001477 disk       FC
2:1:1    target loss_sync 2FF70002AC001477   22110002AC001477 free       FC
2:1:2    target loss_sync 2FF70002AC001477   22120002AC001477 free       FC
2:2:1 initiator     ready 2FF70002AC001477   22210002AC001477 disk       FC
2:2:2 initiator     ready 2FF70002AC001477   22220002AC001477 disk       FC
2:2:3    target     ready 2FF70002AC001477   22230002AC001477 free       FC <-- converted as target
2:2:4    target     ready 2FF70002AC001477   22240002AC001477 free       FC <-- converted as target
2:6:1      peer loss_sync                -       0002AC69249B rcip       IP
3:0:1 initiator     ready 2FF70002AC001477   23010002AC001477 disk       FC
3:0:2 initiator     ready 2FF70002AC001477   23020002AC001477 disk       FC
3:1:1    target loss_sync 2FF70002AC001477   23110002AC001477 free       FC
3:1:2    target loss_sync 2FF70002AC001477   23120002AC001477 free       FC
3:2:1 initiator     ready 2FF70002AC001477   23210002AC001477 disk       FC
3:2:2 initiator     ready 2FF70002AC001477   23220002AC001477 disk       FC
3:2:3    target     ready 2FF70002AC001477   23230002AC001477 free       FC <-- converted as target
3:2:4    target     ready 2FF70002AC001477   23240002AC001477 free       FC <-- converted as target
3:6:1      peer loss_sync                -       0002AC6A2867 rcip       IP
---------------------------------------------------------------------------



After converting to target also, the switch still doesn't show the WWNs

Step #3.showport -c
Result

3par cli% showport -c
N:S:P      Mode Device Pos Config     Topology  Rate Cls Mode_change
2:0:1 initiator  cage0   0  valid private_loop 4Gbps   3  prohibited
                 cage4   1  valid private_loop 4Gbps   3  prohibited
2:0:2 initiator  cage1   0  valid private_loop 4Gbps   3  prohibited
                 cage5   1  valid private_loop 4Gbps   3  prohibited
2:1:1    target    ---   -    ---          n/a   n/a n/a     allowed
2:1:2    target    ---   -    ---          n/a   n/a n/a     allowed
2:2:1 initiator  cage2   0  valid private_loop 4Gbps   3  prohibited
                 cage6   1  valid private_loop 4Gbps   3  prohibited
2:2:2 initiator  cage3   0  valid private_loop 4Gbps   3  prohibited
                 cage7   1  valid private_loop 4Gbps   3  prohibited
2:2:3    target    ---   -    --- private_loop 4Gbps   3     allowed <--Topology has to fabric instead of private_loop
2:2:4    target    ---   -    --- private_loop 4Gbps   3     allowed <--Topology has to fabric instead of private_loop
3:0:1 initiator  cage0   1  valid private_loop 4Gbps   3  prohibited
                 cage4   0  valid private_loop 4Gbps   3  prohibited
3:0:2 initiator  cage1   1  valid private_loop 4Gbps   3  prohibited
                 cage5   0  valid private_loop 4Gbps   3  prohibited
3:1:1    target    ---   -    ---          n/a   n/a n/a     allowed
3:1:2    target    ---   -    ---          n/a   n/a n/a     allowed
3:2:1 initiator  cage2   1  valid private_loop 4Gbps   3  prohibited
                 cage6   0  valid private_loop 4Gbps   3  prohibited
3:2:2 initiator  cage3   1  valid private_loop 4Gbps   3  prohibited
                 cage7   0  valid private_loop 4Gbps   3  prohibited
3:2:3    target    ---   -    --- private_loop 4Gbps   3     allowed <--Topology has to fabric instead of private_loop
3:2:4    target    ---   -    --- private_loop 4Gbps   3     allowed <--Topology has to fabric instead of private_loop
--------------------------------------------------------------------
   24



Step #4. Setup ports as fabric and instead of loop

Results:
To enable port on the switch:
3par cli% controlport offline  2:2:3
Are you sure you want to run controlport offline on port 2:2:3?
select q=quit y=yes n=no: y

3par cli% controlport config host -ct point   2:2:3
Are you sure you want to run controlport config host -ct point on port 2:2:3?
select q=quit y=yes n=no: y

3par cli% controlport rst  2:2:3
Are you sure you want to run controlport rst on port 2:2:3?
select q=quit y=yes n=no: y


>>>>>repeat the same other ports


Step #5. Finally it should look as below

3par cli% showport -c
N:S:P      Mode Device Pos Config     Topology  Rate Cls Mode_change
2:0:1 initiator  cage0   0  valid private_loop 4Gbps   3  prohibited
                 cage4   1  valid private_loop 4Gbps   3  prohibited
2:0:2 initiator  cage1   0  valid private_loop 4Gbps   3  prohibited
                 cage5   1  valid private_loop 4Gbps   3  prohibited
2:1:1    target    ---   -    ---          n/a   n/a n/a     allowed
2:1:2    target    ---   -    ---          n/a   n/a n/a     allowed
2:2:1 initiator  cage2   0  valid private_loop 4Gbps   3  prohibited
                 cage6   1  valid private_loop 4Gbps   3  prohibited
2:2:2 initiator  cage3   0  valid private_loop 4Gbps   3  prohibited
                 cage7   1  valid private_loop 4Gbps   3  prohibited
2:2:3    target    ---   -    ---       fabric 4Gbps   3     allowed <-- Mode as target and Topology fabric
2:2:4    target    ---   -    ---       fabric 4Gbps   3     allowed <-- Mode as target and Topology fabric
3:0:1 initiator  cage0   1  valid private_loop 4Gbps   3  prohibited
                 cage4   0  valid private_loop 4Gbps   3  prohibited
3:0:2 initiator  cage1   1  valid private_loop 4Gbps   3  prohibited
                 cage5   0  valid private_loop 4Gbps   3  prohibited
3:1:1    target    ---   -    ---          n/a   n/a n/a     allowed
3:1:2    target    ---   -    ---          n/a   n/a n/a     allowed
3:2:1 initiator  cage2   1  valid private_loop 4Gbps   3  prohibited
                 cage6   0  valid private_loop 4Gbps   3  prohibited
3:2:2 initiator  cage3   1  valid private_loop 4Gbps   3  prohibited
                 cage7   0  valid private_loop 4Gbps   3  prohibited
3:2:3    target    ---   -    ---       fabric 4Gbps   3     allowed <-- Mode as target and Topology fabric
3:2:4    target    ---   -    ---       fabric 4Gbps   3     allowed <-- Mode as target and Topology fabric
--------------------------------------------------------------------
   24

samsharefs -u -R [QFS share name]

Problem: changed the host ip and now not able to mount a QFS file system

server old ip : 1.10.10.1
server new ip: 10.1.1.1

Getting an error:
SC_mount() error: Transport endpoint is not connected


samshare -R shows old ip address of the server 

# samsharefs -u -R 
#
# Host file for family set 'share1'
#
# Version: 4    Generation: 18    Count: 6
# Server = host 0/titan, length = 192
#
1.10.10.1 1 0 server
1.10.10.2 2 0
1.10.10.3 3 0


Solution:
samsharefs -u -R

# samsharefs -u -R 
#
# Host file for family set 'share1'
#
# Version: 4    Generation: 18    Count: 6
# Server = host 0/titan, length = 192
#
10.1.1.1 1 0 server
10.1.1.2 2 0
10.1.1.3 3 0



 This procedure allows you to add a new client or to change IP addresses or add secondary servers.

Edit the file /etc/opt/SUNWsamfs/hosts. on the server to add the new client, change IP addresses or make any other change to the configuration of the file system.

Update the binary hosts file on the server:

samsharefs -u

if the file system is mounted OR

samsharefs -u  -R

if the file system is unmounted (counterintuitive, but correct).

Removing a client requires that you unmount the file system on the server, which means you must first unmount all clients. It is possible to unmount and unconfigure the client, then to do the server unconfiguration during scheduled downtime. Leaving the client in the configuration is a security hole, however, so it should be removed as soon as possible.

Solaris EFI and SMI format labels


Solaris EFI and SMI Labels

We ran into some disk corruption few days back and learned about Solaris new labeling format.
Also discovered one weird Solaris bug that is suppose to be fixed in coming releases.

This problematic device is a (155GB) LUN from IBM DS4800 storage only exported to one host.

More info on EFI
http://docs.sun.com/app/docs/doc/819-2723/disksconcepts-14?a=view


SMI is conventional format label with 0-6 partitions
EFI format is used with a disk greater than 1 terabyte.


Symptoms and Error:
1. Unable to mount the file systems
#mount /dev/rdsk/c4t600A0B80004715FC000007BC47FE38E6d0s6 /mnt
 I/O error (I don't have the exact error )

2. When ran fsck on the device, it gave up on one of the inodes and core dumped.

3. We were also getting this corrupt label magic error
WARNING: /scsi_vhci/ssd@g600a0b80004715fc000007bc47fe38e6 (ssd196):
        Corrupt label; wrong magic number
However this error was coming on almost all the devices on the system
We tried to label the disk using format and tried to print vtoc and it throws the below err.

4. Print vtoc error
# prtvtoc /dev/rdsk/c4t600A0B80004715FC000007BC47FE38E6d0s6
prtvtoc: /dev/rdsk/c4t600A0B80004715FC000007BC47FE38E6d0s6: Unable to read Disk geometry errno = 0x16

After you print vtoc if you go back to format again, it says disk is not formatted.

5. And finally when we decided to run newfs again I/O error.
# newfs /dev/rdsk/c4t600A0B80004715FC000007BC47FE38E6d0s6
/dev/rdsk/c4t600A0B80004715FC000007BC47FE38E6d0s6: I/O error

Solution:
The resolution here was when we format and label the device in EFI format we were able to run newfs and able to mount it. If we do conventional format than, it give a I/O when doing a newfs on it.

#format -e
and label it as EFI


Error with SMI label :
We tried experimenting by changing from slice 6 to slice 0

# prtvtoc /dev/dsk/c4t600A0B80004715FC000007BC47FE38E6d0s0
* /dev/dsk/c4t600A0B80004715FC000007BC47FE38E6d0s0 partition map
*
* Dimensions:
*     512 bytes/sector
*      64 sectors/track
*     128 tracks/cylinder
*    8192 sectors/cylinder
*   40320 cylinders
*   40318 accessible cylinders
*
* Flags:
*   1: unmountable
*  10: read-only
*
*                          First     Sector    Last
* Partition  Tag  Flags    Sector     Count    Sector  Mount Directory
       0      2    00          0 330285056 330285055
       1      3    01     262144    262144    524287
       2      5    01          0 330285056 330285055
       6      4    00     524288 329760768 330285055


SMI format:
# newfs /dev/rdsk/c4t600A0B80004715FC000007BC47FE38E6d0s0
newfs: construct a new file system /dev/rdsk/c4t600A0B80004715FC000007BC47FE38E6d0s0: (y/n)? y
/dev/rdsk/c4t600A0B80004715FC000007BC47FE38E6d0s0: cannot open

EFI Label works:

# newfs /dev/rdsk/c4t600A0B80004715FC000007BC47FE38E6d0s6
newfs: construct a new file system /dev/rdsk/c4t600A0B80004715FC000007BC47FE38E6d0s6: (y/n)? y
/dev/rdsk/c4t600A0B80004715FC000007BC47FE38E6d0s6:      329760768 sectors in 53672 cylinders of 48 tracks, 128 sectors
        161016.0MB in 3355 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:
 328829088, 328927520, 329025952, 329124384, 329222816, 329321248, 329419680,
 329518112, 329616544, 329714976


After it successfully completed newfs with EFI, we changed it again to SMI label

It started the newfs ok but again ended with I/O error

# newfs /dev/rdsk/c4t600A0B80004715FC000007BC47FE38E6d0s6
newfs: construct a new file system /dev/rdsk/c4t600A0B80004715FC000007BC47FE38E6d0s6: (y/n)? y
/dev/rdsk/c4t600A0B80004715FC000007BC47FE38E6d0s6:      329760768 sectors in 53672 cylinders of 48 tracks, 128 sectors
        161016.0MB in 3355 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:
 328829088, 328927520, 329025952, 329124384, 329222816, 329321248, 329419680,
 329518112, 329616544, 329714976
fsirand: Cannot open /dev/rdsk/c4t600A0B80004715FC000007BC47FE38E6d0s6: I/O error
/usr/sbin/fsirand /dev/rdsk/c4t600A0B80004715FC000007BC47FE38E6d0s6: failed, status = 256


Sample of both formats:

SMI Label
9. c6t50002AC0001D1477d0 <3pardata -vv-3111="-vv-3111" 2="2" 304="304" 860="860" 8="8" alt="alt" cyl="cyl" hd="hd" sec="sec">  701
          /scsi_vhci/ssd@g50002ac0001d1477

EFI Label
9. c6t50002AC0001D1477d0 <3pardata -vv-3111-1.00gb="-vv-3111-1.00gb">
          /scsi_vhci/ssd@g50002ac0001d1477

Wednesday, September 12, 2012

QFS does not support dynamic LUN sizing


Here is the scenario:

We have a QFS shared sam file system using 3 luns running Solaris 10 and QFS 5.2 as below:
1 x 2TB
1 x 2TB
1 x 1.5TB
The file system mounted from the above luns is 5.5TB
We extended the 3rd lun (1.5TB) to 2TB from storage side (3PAR)

The host sees it as 2TB, we updated the QFS config and tried to run growfs


format output:
32. c5t50002AC0000E1477d0 <3pardata -vv-3111-2.00tb="-vv-3111-2.00tb">  601
          /scsi_vhci/ssd@g50002ac0000e1477
33. c5t50002AC0000F1477d0 <3pardata -vv-3111-2.00tb="-vv-3111-2.00tb">  602
          /scsi_vhci/ssd@g50002ac0000f1477
34. c5t50002AC0001A1477d0 <3pardata -vv-3111-2.00tb="-vv-3111-2.00tb">  603   <-- changed from 1.5TB to 2TB
          /scsi_vhci/ssd@g50002ac0001a1477


umount fs
samd config
samgrowfs
mount fs

The file system is still 5.5TB

Unfortunately only thing we can do here is :
backup the file system, samfsdump  
recreate the file system, sammkfs -S
restore the file system again, samfsrestore