Saturday, October 13, 2012

How to rename QFS fsname?


1: umount /new

2: vi /etc/vfstab     change new to new4
3: vi mcf      change new to new4 in all places.

cat /etc/opt/SUNWsamfs/mcf

new4                                            500    ms      new4   on        shared
/dev/dsk/c6t600A0B80004715700000074D47FD082Ed0s0 501    md      new4   on
/dev/dsk/c6t600A0B8000471570000007D247FD0A22d0s0 502    md      new4   on
/dev/dsk/c6t600A0B80004715700000086F49F1D551d0s0 504    md      new4   on


4: samd config
5: samfsck -F -R new4          (this will change the file system name to new4)

Example:
bash-3.00# samfsck -F -R new4
name:     bcombackups       version:     2A    shared
First pass
ALERT:  ino 1743721017.967461289, Object flag set, should be clear, meta_flag 1, size 8581431105406506118
ALERT:  ino -796177020.1556009446, Object flag set, should be clear, meta_flag 0, size 3201155233938255577
ALERT:  ino 22367104.671481968, Object flag set, should be clear, meta_flag 0
ALERT:  ino 700653835.-1820544200, Object flag set, should be clear, meta_fla
ALERT:  ino -2107630336.-937590376, Object flag set, should be clear, meta_fl
ALERT:  ino 738287680.101681192, Object flag set, should be clear, meta_flag
ALERT:  ino 503702500.2047090706, Object flag set, should be clear, meta_flag
ALERT:  ino -445008776.-1635288612, Object flag set, should be clear, meta_fl
ALERT:
Second pass
Third pass
ALERT:  Invalid block:        ino 1853 marked damaged
NOTICE: ino 2214.1,     Repaired link count from 688 to 674
ALERT:  Invalid block:        ino 4218 marked damaged
ALERT:  Invalid block:        ino 5893 marked damaged
ALERT:  Invalid block:        ino 8836 marked damaged
ALERT:  Invalid block:        ino 12528 marked damaged
ALERT:  Invalid block:        ino 16594 marked damaged
ALERT:  Invalid block:        ino 18916 marked damaged

Inodes processed: 8066560

total data kilobytes       = 5858959296
total data kilobytes free  = 1617932544
NOTICE: Reclaimed 332916064256 bytes

Another example:
root@dam-app2 # samfsck -F -R new4
name:     opsbackup       version:     2A    shared
First pass
Second pass
Third pass

Inodes processed: 2048

total data kilobytes       = 3382270208
total data kilobytes free  = 3382259904



6: mount new4

new4                  4.7T    34G   4.7T     1%    /nearline3


Netgear N600 and DOCSIS 3.0

I've been in IT Infrastructure and Operations world for more 15 years now, helping companies and folks to resolve all sorts of performance issues. Here is my horrible experience with internet connection @ home :)

I have been using ATT for almost a decade and finally decided to go to Comcast.
I upgraded to a DOCSIS 3.0 Motorola modem SB6120 router and also bought a Netgear N600 wireless dual band router for Comcast internet to avoid any monthly charges at all.

Configured and customized router to whatever I wanted, internet all good. By the way I have CAT 6 structured wiring at my home covers almost all the rooms.

The problem I was having was that when connecting to the internet through the wifi,
there was a lag and websites would load way slower.

Symptoms:
Frankly I didn't notice any lags, however my wife started complaining that her vpn drops connection after we switched to Comcast. And its horribly slow compared to AT&T. We were ATT Pro which was 3mbps and Comcast promised at least 10 mbps. Speedtest confirm its double the speed, it never resulted in less than 22mbps. Now, mathematically there is no way internet will be slow. So, I ignore the problem. The complain continues so finally I decided to spend some time with issue.

I still cannot see the difference visually with google.com or yahoo.com

But, yes it can be better there is some lag of 3-5 seconds while pulling the site which may be annoying to some.
The problem became very obvious when I started a download, it was 70KB/s, that means my internet speed is only 560kbps


Troubleshooting steps:
#Packet loss:
The first thing i noticed was the packet loss. While pinging the router after every 25 packets of 1ms latency there are 4 packets which is 100ms. Called Netgear, spend couple of hrs. with tech support, they tried lots of combination with no security, changing to different channels, (I believe 6 and 11 are reliable :-)), I had already downloaded inSSIDer to see if there is any interference with channels neighbors are using, recycle the modem, re flash the modem etc. finally changed default fragmentation length from 2346 to 2345 and there was some improvement in packet loss. But ultimately gave up.

#Wireless speed test
Tried a speedtest using wireless, it says 22Mbps however download sucks (50-100 KB/s)

#Wired speedtest
Tried a speedtest directly connecting to router, it says 22Mbps however download still sucks (50-100 KB/s)

#Connected directly to modem
Now connected directly to modem, speedtest is good 27mbps and so is the download speed (2.4 MB/s)
so now the problem boils down to router.

I google'd the Netgear problem with Comcast and found that we have disable WWM for Netgear. It was already disabled when I had initially configured it. Again played with few things no change. There were lot of suggestion to change the router and go with Comcast router.

However, I decided to reset the router again. used all the default option to connect wirelessly.

What's the download speed 4MB/s !!

Now I have backup of N600 old config and new config which works with expected speed. The problem is the netgear.cfg is encrypted and so do we want to solve this problem now. May be .. whenever time permits next time..

I took me more than a month to solve my home internet speed :(

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.