Linux: How to clear the cache from memory

Red Hat Enterprise Linux 4.6 and 5.0 introduced /proc/sys/vm/drop_caches, which allows the pagecache and slabcache to be cleared on demand.

To free the pagecache:

# sync; echo 1 > /proc/sys/vm/drop_caches

To free dentries and inodes:

# sync; echo 2 > /proc/sys/vm/drop_caches

To free pagecache, dentries and inodes:

# sync; echo 3 > /proc/sys/vm/drop_caches

It is recommended that sync be run prior to passing the values to /proc/sys/vm/drop_caches. Enabling drop_caches can cause deadlock if the system is under heavy memory and I/O load. It is not recommended to use this feature on system experiencing heavy load.

Posted in Uncategorized | Leave a comment

How To Make a USB Spy Camera

It’s not often you need a USB spy camera, but when you do, this is a quick and easy method. The setup is putting a USB camera into your your pocket then running the camera from your laptop stuffed in a computer bag. The situation reminds me of a perfect setup for college days where you need to video a test or capture some funny footage at a party.

Plenty of applications for this type of setup, check it out.

Posted in Uncategorized | Leave a comment

How to Change the TCP/IP timeout setting Aix / HP-UX / Solaris / Linux

Use the following steps to change the TCP/IP timeout value for your computer.

On AIX, run the following command:

no -o tcp_keepinit=<timeout_value>

where <timeout_value> is the length of the timeout period, in half seconds. To configure a timeout of 30 seconds, set the <timeout_value> value to 60.

On Solaris and HP-UX, run the following command:

ndd -set /dev/tcp tcp_ip_abort_cinterval <timeout_value>

where <timeout_value> is the length of the timeout period, in milliseconds. To configure a timeout of 30 seconds, set the <timeout_value> value to 30000.

On Linux, run the following command:

You can use /proc/sys/net/ipv4/tcp_keepalive_timeto setup new value.

The number of seconds a connection needs to be idle before TCP begins sending out keep-alive probes. Keep-alives are only sent when the SO_KEEPALIVE socket option is enabled. The default value is 7200 seconds (2 hours).

For example set value to 2400 seconds:

echo 2400 > /proc/sys/net/ipv4/tcp_keepalive_time

You can make changes to /proc filesystem permanently using /etc/sysctl.conf

To get timeout setting of tcp/ip :

HP-UX :

# ndd -get /dev/tcp tcp_ip_abort_cinterval
75000
#

Solaris:

bash-3.2# ndd -get /dev/tcp tcp_ip_abort_cinterval
180000
bash-3.2#

Aix:

# no -a | grep tcp_keepinit
tcp_keepinit = 150
#

Linux:

[root@jia ~]# cat /proc/sys/net/ipv4/tcp_keepalive_time
7200

Posted in Aix, HP-UX, Linux, Solaris | Leave a comment

How to Get UUID of Hard Disks and Mount using UUID in Linux

The Universally Unique Identifier can be used to identify a device independent form its mount point or device name. This is more and more important as many devices today support hot-plugging or are external anyway. Therefore it makes sometimes sense to access a device (for example in fstab) not by device name but by the UUID.

There are several ways to get the UUID. The first one uses the /dev/ directory. While you are on is you might want to check other by-* directories, I never knew of them.

[root@jira ~]# ls -l /dev/disk/by-uuid
total 0
lrwxrwxrwx. 1 root root 10 May 14 12:06 24136044-94a0-4106-9f06-1be49356b1d5 -> ../../sdc1
lrwxrwxrwx. 1 root root 10 May 14 11:55 69354ec2-9edd-48ed-833b-575bfe25622f -> ../../sdb1
lrwxrwxrwx. 1 root root 10 May 14 11:55 6f5ef646-a484-4b4e-9007-c58bdc85faff -> ../../sda3
lrwxrwxrwx. 1 root root 10 May 14 11:55 93acd8b4-5442-4f42-a4c9-a9ae45e165ef -> ../../sda1
lrwxrwxrwx. 1 root root 10 May 14 11:55 9798da8e-f4a8-4ada-91d9-3a2bda4285e5 -> ../../sda2
[root@jira ~]# cat /etc/fstab

#
# /etc/fstab
# Created by anaconda on Mon May 14 11:17:45 2012
#
# Accessible filesystems, by reference, are maintained under ‘/dev/disk’
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=6f5ef646-a484-4b4e-9007-c58bdc85faff /                       ext4    defaults        1 1
UUID=93acd8b4-5442-4f42-a4c9-a9ae45e165ef /boot                   ext4    defaults        1 2
UUID=69354ec2-9edd-48ed-833b-575bfe25622f /data01                 ext4    defaults        1 2
UUID=9798da8e-f4a8-4ada-91d9-3a2bda4285e5 swap                    swap    defaults        0 0
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0

[root@jira ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda3              67G  2.8G   61G   5% /
tmpfs                 3.9G  100K  3.9G   1% /dev/shm
/dev/sda1             194M   30M  154M  17% /boot
/dev/sdb1             493G  198M  467G   1% /data01
/dev/sdc1             493G  198M  467G   1% /data02

[root@jira ~]# blkid /dev/sda*
/dev/sda1: UUID=”93acd8b4-5442-4f42-a4c9-a9ae45e165ef” TYPE=”ext4″
/dev/sda2: UUID=”9798da8e-f4a8-4ada-91d9-3a2bda4285e5″ TYPE=”swap”
/dev/sda3: UUID=”6f5ef646-a484-4b4e-9007-c58bdc85faff” TYPE=”ext4″
[root@jira ~]#
[root@jira ~]#

Posted in Linux | Leave a comment

Creat Boot Device using EFI cli Commands

Just another way to configure your boot device, using efi cli:

We can list our current boot options using:

fs0:\> bcfg boot dump
The boot option list is:
01. VenHw(D65A6B8C-71E5-4DF0-A909-F0D2992B5AA9) “EFI Shell [Built-in]”
02. Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun6,Lun0)/HD(Part1,Sig478114DA-6FF6-11E0-8000-D6217B60E588)/\EFI\HPUX\hpux.efi “boot”
03. Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun6,Lun0)/HD(Part1,Sig478114DA-6FF6-11E0-8000-D6217B60E588)/\EFI\HPUX\hpux.efi “boot2″

We delete the old boot options from the original cloned virtual machine:
fs0:\> bcfg boot rm 03
bcfg: boot option 3 removed

fs0:\> bcfg boot rm 02
bcfg: boot option 2 removed

fs0:\>

And finally we add our new boot disk:

\> map
Device mapping table
fs0 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun6,Lun0)/HD(Part1,Sig478114DA-6FF6-11E0-8000-D6217B60E588)
blk0 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun1,Lun0)
blk1 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun2,Lun0)
blk2 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun3,Lun0)
blk3 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun4,Lun0)
blk4 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun6,Lun0)
blk5 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun6,Lun0)/HD(Part1,Sig478114DA-6FF6-11E0-8000-D6217B60E588)
blk6 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun6,Lun0)/HD(Part2,Sig478114EE-6FF6-11E0-8000-D6217B60E588)
blk7 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun6,Lun0)/HD(Part3,Sig47811502-6FF6-11E0-8000-D6217B60E588)
blk8 : Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun9,Lun0)

\> fs0:

fs0:\> cd \EFI\HPUX

fs0:\EFI\HPUX> ls
Directory of: fs0:\EFI\HPUX

04/26/11 01:29p 4,096 .
04/26/11 01:29p 4,096 ..
04/26/11 01:29p 698,356 hpux.efi
04/26/11 01:29p 31,232 nbp.efi
04/26/11 01:29p 12 AUTO
3 File(s) 729,600 bytes

fs0:\EFI\HPUX> bcfg boot add 1 hpux.efi “BOOT DEVICE”
Target = A
bcfg: Add boot option as 1

fs0:\EFI\HPUX> bcfg boot dump
The boot option list is:
01. VenHw(D65A6B8C-71E5-4DF0-A909-F0D2992B5AA9) “EFI Shell [Built-in]”
02. Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun6,Lun0)/HD(Part1,Sig478114DA-6FF6-11E0-8000-D6217B60E588)/\EFI\HPUX\hpux.efi “BOOT DISK”

fs0:\EFI\HPUX> bcfg boot mv 2 1
bcfg: boot option 2 moved to 1

fs0:\EFI\HPUX> bcfg boot dump
The boot option list is:
01. Acpi(PNP0A03,0)/Pci(0|0)/Scsi(Pun6,Lun0)/HD(Part1,Sig478114DA-6FF6-11E0-8000-D6217B60E588)/\EFI\HPUX\hpux.efi “BOOT DISK”
02. VenHw(D65A6B8C-71E5-4DF0-A909-F0D2992B5AA9) “EFI Shell [Built-in]”

EFI Boot Manager ver 1.10 [14.62] [Build: Mon Apr 26 10:55:36 2010]

Please select a boot option

BOOT DISK
EFI Shell [Built-in]
Boot option maintenance menu

Use ^ and v to change option(s). Use Enter to select an option

Posted in HP-UX | Leave a comment

Sun StorEdge 3511 installation and configration

pkgadd  -d  SUNWsccli SUNWscsa SUNWscsd SUNWscsu SUNWscui


SUNWscsd had a minor problem adding the ssconfig user, due to a uid conflict with the sysadmin user just created. I made ssconfig a duplicate of sysadmin – not sure that the home dir and shell and group are OK.


Rebooting, and… Although I didn’t touch the networking, it’s all messed up. I did run-after though, so perhaps the default route got toasted or something. Just had to replace the default route, because of the weird netmask. This probably should be fixed.


setenv auto-boot? false
reset-all
probe-scsi-all

{3} ok probe-scsi-all
/pci@1f,700000/scsi@2,1

/pci@1f,700000/scsi@2

Volume 0
Unit 0 Disk LSILOGIC1030 IM IM1000 143374706 Blocks, 70007 MB
Target 2
Unit 0 Disk SEAGATE ST373207LSUN72G 0354 143374738 Blocks, 70007 MB
Target 3
Unit 0 Disk SEAGATE ST373207LSUN72G 0354 143374738 Blocks, 70007 MB

/pci@1d,700000/SUNW,qlc@1
*************************** Local Loop Devices ***************************
Adapter loopId – 0
Device AL-PA a7 loopId 28 Hard-addr 28 Port WWN 216000c0ff89203a
Lun 0 DISK SUN StorEdge 3511 411I

/pci@1c,600000/SUNW,qlc@1
*************************** Local Loop Devices ***************************
Adapter loopId – 0
Device AL-PA a5 loopId 2a Hard-addr 2a Port WWN 226000c0ffa9203a
Lun 0 DISK SUN StorEdge 3511 411I


Found an article at http://66.102.7.104/search?q=cache:nJX8gZMhS-sJ:docs.cirkva.net/Sun/fc/816-7301-19.pdf+sccli+%22no+manageable+devices+found%22&hl=en&client=firefox-a
It indicates that devices will not be seen if mpxio is enabled in /kernel/drv/scsi_vhci.conf. However, mpxio is already disabled in this file. The article pertains to 3510′s, this is a 3511.


2005-08-17 Posted to http://forum.sun.com/forum.jspa?forumID=182 asking:

1) For an overview of the install process
2) Why I can see FC-looking stuff in probe-scsi-all but not on the OS itself
3) What we need to do to get serial communications going between our Cyclades and the 3511 with serial ports


esmft1-dcs DCS# cfgadm -al

Ap_Id Type Receptacle Occupant Condition
c0 scsi-bus connected configured unknown
c0::dsk/c0t0d0 CD-ROM connected configured unknown
c1 scsi-bus connected configured unknown
c1::dsk/c1t0d0 disk connected configured unknown
c1::dsk/c1t2d0 disk connected configured unknown
c1::dsk/c1t3d0 disk connected configured unknown
c2 scsi-bus connected unconfigured unknown
usb0/1 unknown empty unconfigured ok
usb0/2 unknown empty unconfigured ok
usb1/1 unknown empty unconfigured ok
usb1/2 unknown empty unconfigured ok


Installation doc:

http://www.sun.com/products-n-solutions/hardware/docs/html/816-7300-17/


4.9.1 Configuring a Host COM Port to Connect to a RAID Array (from the above installation document)

The RS-232 COM (serial) port on either controller module can be used to configure and monitor the RAID array using the controller firmware. It can be connected to a VT100 terminal, terminal emulation program, terminal server, or the serial port of a server.

1. Use a null modem serial cable to connect the COM port of the RAID array to the serial port on a host workstation.

A null modem serial cable is included in your package.

2. Set the serial port parameters on the workstation as follows:

* 38,400 baud

* 8 bit

* 1 stop bit

* No parity

If your host uses the Solaris operating system, see Section E.2, Using the tip Command for Local Access to the Array for instructions about setting up a tip session to communicate using the COM port.

To see platform-specific details for other operating systems, see the appendix that describes the operating system your server uses.


Appendix D.2 (StorEdge 3000 series) DB9 COM Port

The COM port is a female DB9 connector that requires a male DB9 null modem cable.

FIGURE D-2 RS-232 DB9 (EIA/TIA 574) View of the Male End Figure shows RS-232 DB9 (EIA/TIA 574) connector.
TABLE D-2 Pin Names

Pin No. Name Notes/Description

1 DCD Data Carrier Detect
2 RD Receive Data (also called RxD, Rx)
3 TD Transmit Data (also called TxD, Tx)
4 DTR Data Terminal Ready
5 GND Ground
6 DSR Data Set Ready
7 RTS Request To Send
8 CTS Clear To Send
9 RI Ring Indicator


Cyclades SM16 should have: TxD, RxD, RTS, CTS, GND, DCD, DTR, RI, DSR


Cyclades RJ45 to DB9 female, crossover

3 TxD -> 2 RxD
6 RxD -> 3 TxD
4 GND -> 5 GND
2 DTR -> 1 DCD
2 DTR -> 6 DSR *
7 DCD -> 4 DTR
8 DSR -> 4 DTR *
1 RTS -> 8 CTS
5 CTS -> 7 RTS


cyclades pinout not same as sun/cisco :( according to Alex : cyclades
rj45 to sun/cisco db9


adb0200 is connector number
on adapter says cyclades console


disable hw flow on cyclades side for storedge 3511. Dtr and dsr too?
Since storedge has only 3 live pins: gnd, txd, rxd


Alex believes we need str thru for 3511 to cyclades


05-8-18 3:55 pm
cyclades empirical pinout w alex
xmit 3 – nonzero v means output
gnd 4?
Rcv 6 – no v means input

matches cyclades’ diagram

nothing’s floating

if you connect a 6v to another port, and the v is 0, then that pin
is floating. If not floating, v should go to 6.

What if connect a 5 to a 12? Discuss later


ttyC17 for 3511 on console.nac


25 pin rs-232 is standardized less than 9 pin


look at edge symmetrically on edge, comparing two rj45 cables. plastic
thingy should point off in same direction: connectors should be oriented
the same.


thank tri for 3310 comments and loaning laptop!


Tri’s laptop: std 9 pin pc connector
compaq armada e500
5 gnd
3 xmt
2 rcv

because connecting 5 to 3 gives nonzero as does 5 to 2


two kinds of “twist”? Xmt/rcv vs all pins? Probably more than that, really :)


alex trying to connect hyperterminal on tri’s laptop to console server
via 1st 3511 serial cable

ignoring it on both ends


Alex willing to loop back dtr


S80conserver stop


2005-08-18 4:38 pm
Francisco’s going to play with sccli


i’m in minicom now on console.nac


Alex’s oscilloscope – sees data from conserve.nac when Judy types

can tell bps – 9600

leads to question “why can’t laptop and console.nac talk then”?

likely a wiring problem

conserve – oscilloscope – laptop bad
conserve – oscilloscope good

now it’s working (conserve to tri’s laptop) – why?


05-8-18 4:57 pm
Dan attempts to turn off rts/cts flow control via stty:

console-dcs) cat no-rts-cts
#!/bin/bash

set -x

exec < /dev/ttyC17

stty -crtscts 38400

# sleep 5 days
sleep $[60*60*24*5]


Checking if a process is active (EG “console esmf3511a”):

console-dcs) cat process-active
#!/bin/bash

function usage
{
echo “Usage: $0 pid” 1>&2
exit 1
}

if [ "$#" != 1 ]
then
usage
fi

PID=”$1″

LINES=”$(maxtime 10 strace -p “$PID” 2>&1 | wc -l)”
kill -CONT “$PID”
if [ "$LINES" -gt 1 ]
then
echo “$LINES systems calls”, returning true
exit 0
else
echo “$LINES systems calls”, returning false
exit 1
fi
console-dcs)


cutting lines present in 1
5 in cyc adapter – still working
7 dcd – still good
8: dsr – still good
2 dtr – orange – still good
4 lines left
dtr cut – still working

because sun only uses 3 lines, we needed to verify if other lines are
actually needed


set to 38400 in conserver default, works


38400 just for ttyC17 attempted


tri’s laptop to 3511 using “flip cable”
not working, but it says 9600 in hyperterminal

before change speed check one more thing : measure electrically sound

Alex says it looks good

adding scope, redundant, doing anyway, scope not showing anything

going to 38400
com1

still not seeing anything in scope

Alex double checking connections
seem fine

switched to other serial port on 3511
on physically lower serial port now (of two total serial ports)
getting data, but hitting enter gives nothing, ctrl-c did though!

trying higher serial port again: enter worked now: bottom woke up top?

Trying 9600 on lower port – will 3511 adapt?


back to where we were cablewise,

red positive on this one
green negative

25 pin ground works
rj conn ground doesn’t show up because it moves around

blinking means transmission

want green to no lights or red to no lights, but not “color to color”,
which means a conflict. Dark to dark (no leds lit) is no problem

If you use Alex’s breakout box, be sure to turn it off when you’re done,
so the batteries don’t run down
Uses 9v batteries

absence of the light is 0 or ground

can’t see if something’s floating with this particular breakout box,
but a better one could


Approximately 9:20AM, 2005-08-19, called Dynamic Systems. Tried to reach
Ray first – no answer. Called inside sales (310) 337-4400 ext. 0, reached
someone. She indicated that someone would call me back within 15 minutes.

Immediate phone questions

Proportionalize urgency:
0) Hard deadline on Monday
1) I was on vacation until Tuesday
2) Tuesday I studied QFS
3) Wednesday I studied QFS
4) Thursday I worked with Judy and Alex on the serial comm
5) Today I’m scrambling to get an overview of the process :(

Overview of installation process:
0) General steps
1) What packages
2) What config files (mcf only?)
3) What commands

Communication with 3511:
1) Do we truly require 2 serial connections and not just one?
2) Can we do the configuration via fibre instead of serial, or are there
things that can only be done via serial?
3) Can we do the configuration via ethernet, once we’ve assigned an IP
address to the firmware?
4) Most important one? If configuring via serial, what keystroke will
refresh the screen? Our conserver is a bit confused by the running
count of seconds (or something like that). Tried mrxvt and xterm,
neither wanting to refresh screen or display something that looks useful.


2005-08-19 11AM

Sent growfs question to comp.unix.solaris


vt100 ansi

^L

storage download
san foundation packages search for san
4.4.6 tiny, script installit: 80 M

need all recommended patches!

3511 packages
sccli – only, for now
gui packages
storaid – manage reporting

san? Yes, we need the SAN packages, even if we’re only doing NAS.
Steve believed he had told me this before. I have nothing about it in
my notes from the meeting we had with DynSys and Sun.

Front and back of LUN, remainder in background

Yes I can call Steve Scharf’s cell phone for help. See palm address book.

top controller (top serial port) is primary, bottom controller (bottom
serial port) is secondary. Will only need bottom controller if top
controller has problems.

Steve reiterated that we’re going to require all of the recommended
patches – “I mentioned that”, this is another thing that’s not in my
notes, but I was probably assuming that autoinstall would include them,
which it doesn’t – or at least didn’t.


My growfs was taking forever, so I interrupted it by sending a break
and reset-all’ing. However, a subsequent growfs panicked the system.
:( I probably should’ve done something with -s, but why is this so
silly-complicated?

Anyway, I’m going to have to reinstall now.


2005-08-19

I’ve now tried both minicom and console/conserver, sending break, sending
^L, sending ^R, sending ^C. None of these are working. In console I
tried all 5-6 break sequences available – none appeared to do anything,
and in minicom I tried the only one available – and it got stuck.

Then tried ^A-^Z (except ^S) via console/conserver, but none of them
did anything useful.


2005-08-19 11:24

I’ve had a “recommended patches” download going via mozilla on esmft1
for a while now. I have a notify-when-up on it. It’s going to /var/tmp
for now at least.


Related software appears to be at:

http://www.sun.com/download/index.jsp?cat=Systems%20Administration&tab=3&subcat=Storage%20Management


I finally found it much more quickly, by giving up on the sun search
engine, and instead using google groups. Then within about 5 or 10
minutes, I found this:

http://www.sun.com/storage/san

https://sdlcweb4b.sun.com/ECom/EComActionServlet/DownloadPage:~:com.sun.sunit.sdlc.content.DownloadPageInfo;jsessionid=F3E5C27BCDDC688E25FE7435B338B724;jsessionid=F3E5C27BCDDC688E25FE7435B338B724

…and verified that the SFS stuff is something that Francisco had
already obtained for me. :( Too many cooks for too little communication.


2005-08-19 12:20PM

Found pkgadd’d all the SFS stuff, left voicemail for Steve Scharf
indicating I’d found it using google, and indicating that the serial
stuff is still troublesome, and also that I’d still like to know if it’s
OK to reboot the 3511 stuff or somehow enable a break sequence

Now I’m extracting the sun recommended patches.

My rsync backup is still going – it clearly won’t be the last


2005-08-19 12:22PM

Ran out of “disk space” during unzip of recommended patches

Removed split-out version of SFS for Sol 9

Re-unzip’ing recommended patches


sun.com/download
indexed by letter
search with ^F


2005-08-19 12:45PM

rsync (drsbackup) completed. Rerunning it

Have installit downloaded now (prior to rsync reinitiation)

2005-08-19 1:59PM

Lunch complete. :) At Engineering Gateway. Initiated one last rsync
prior to reinstall from CD


v440 is coming up off the cdrom for an install

RAID controllers are showing useful output, but ignoring my inputs
completely. I’ve commented out the ttyC17 (esmf3511a) entry on
conserver.cf (?) and restarted conserver. Next I’ll restart minicom on
ttyC17 and reboot the RAID controllers again.


2005-08-19 2:40PM

The serial problem is apparently due to:

LG:0 NOTICE: CHL:2 ID:0 Starting Media Scan

…which seems to be uninterruptible, and takes forever. Discovered by
running minicom on ttyC17 during a reboot of the RAID controllers.

The reinstall of the v440 is underway.


2005-08-19 3:05PM

The reinstall without choppy partitions is underway on the v440


2005-08-19 3:21PM

Just left a voicemail for Steve Scharf about the serial issue – which
I believe is probably due to this “media scan” thing (cut and pasted
below). Also, the Solaris 9 reinstall is adding packages now, with a
percent meter.

3511

�…….�…………… Notification ……………�…�
o 0 o oB/So
o .����oLG:0 NOTICE: CHL:2 ID:0 Starting Media Scan o o
o . o o. o
o .����………………………………………�. o
o 0 10 20 30 40 50 60 70 80 90 100 o
…………………………………………………�

.�������������������������������������Ŀ
. PC Graphic(ANSI Mode) .
. Terminal(VT100 Mode) .
. PC Graphic(ANSI+Color Mode) .
. Show Transfer Rate+Show Cache Status .
.��������������������������������������.

ESC:View Next Message |Ctrl+C:Clear All Events |Ctrl+L:Refresh Screen


3511 specific – 3510 is different:

0 1 host channels
2 3 drive channels
4 5 can be either

both host and drive channels are paired up on primary and secondary:
0 to 0, 5 to 5

ports 0 and 1 can be hooked up via 2 connectors each?

JBOD’s cannot be used


An expansion unit. An expansion unit consists of a chassis with disk
drives and I/O expansion modules. The expansion unit does not include
an I/O controller module. The expansion unit connects to and is managed
by a RAID array


Number of disks supported:

Up to 12 per array or per expansion unit, with a minimum of 4 plus 1 spare


Number of expansion units supported:

Up to 8 for a Sun StorEdge 3510 FC array. Up to 5 for a Sun StorEdge
3511 SATA array


SPP: Fibre Channel Small Form-Factor Pluggable


Supported RAID levels:
0, 1, 3, 5, 1+0, 3+0, and 5+0


Field replaceable units:
# Power supply and fan modules
# I/O controller modules and I/O expansion modules
# I/O expansion modules
# Battery board module
# Disk drive modules


Configuration and monitoring done via:

# In-band Fibre Channel ports
# Out-of-band 10/100BASE-T Ethernet port
# RS-232 connectivity
# Enclosure monitoring by SCSI Enclosure Services (SES)


Nice overview of configuration process:

http://www.sun.com/products-n-solutions/hardware/docs/html/816-7300-17/ch05_overview.html#pgfId-999482


Use logical drives, not logical volumes


Because the communication protocol changes from version to version,
you must install both the agent and console when upgrading. If different
versions of the agent and console co-exist, Sun StorEdge Configuration
Service is not able to discover previously configured arrays.


Important nouns:

agent
Sun storage configuration service
CLI
Config tool
Sun StorEdge Diagnostic Reporter
console


The current “Sun recommended patches” may not be what’s required.
It may turn out that we’ll have to look at the release notes for the
versions of patches listed there. :(


2005-08-20 2:24PM

copied back over all the QFS and 3511 related stuff (included current sun
recommended patches), ran installit, affirmed installation of patch pro,
but patch pro blew up without a proxy, so no patch pro to see if our
patches are suitable. When installit completed, it indicated a reboot.


2005-08-20 2:28PM
Also had to pkadd these:

SUNWsccli/ SUNWscsa/ SUNWscsd/ SUNWscsu/ SUNWscui/

…and now sccli does something a lot more interesting :)


Interesting commands:

/opt/SUNWsscs/sbin/sccli (a para-CLI)
/opt/SUNWsscs/sscsconsole/ssconsole (gives a GUI, demands a password)


An excellent URL about software configuration, stepwise, of a 3510 array:

http://www.zazzybob.com/3510.html

It appears to use Veritas instead of QFS, but hopefully the 3510/3511
stuff is relevant. :)


What worked:

esmft1-root sbin) sccli –list
/dev/rdsk/c4t40d0s2 SUN StorEdge 3511 SN#09203A
esmft1-root sbin)

esmft1-root sbin) sccli /dev/rdsk/c4t40d0s2 show logical-volumes
sccli: selected device /dev/rdsk/c4t40d0s2 [SUN StorEdge 3511 SN#09203A]
esmft1-root sbin)

esmft1-root sbin) sccli /dev/rdsk/c4t40d0s2 show logical-disks
sccli /dev/rdsk/c4t40d0s2 show logical-drives
sccli: selected device /dev/rdsk/c4t40d0s2 [SUN StorEdge 3511 SN#09203A]
LD LD-ID Size Assigned Type Disks Spare Failed Status

I can’t delete the logical disks yet, probably because they are mapped
to LUN’s. More later.

sccli show disks says we have 44 drives

Since we have 44 drives, and dynsys was advising 10 disks per RAID 5
(wow), I suppose that means we’ll have 4 global spares – and we’ll
probably have to monitor this somewhat closely.

sccli> show channels
Ch Type Media Speed Width PID / SID


0 Host FC(L) 2G Serial 40 / NA
1 Host FC(L) ASYNC Serial NA / 42
2 Drive FC(L) 2G Serial 14 / 15
3 Drive FC(L) 2G Serial 14 / 15
4 Host FC(L) 2G Serial 44 / NA
5 Host FC(L) ASYNC Serial NA / 46
6 Host LAN ASYNC Serial NA / NA
sccli>

Trying to toast the preexisting lun maps:
sccli> show lun-maps
Ch Tgt LUN ld/lv ID-Partition Assigned Filter Map


0 40 0 ld0 59501AF8-00 Primary
1 42 0 ld1 14FF1600-00 Secondary
sccli>

2005-08-20 3:50PM
I’m winding up using the serial interface, but Bob’s sccli document
is still providing a good general idea of what steps are required,
because the terminology appears consistent across interfaces into the
RAID controllers. I’ve deleted the LUN maps, and I’ve deleted the
logical drives.

I’m now creating a RAID 5, with a 256M stripe size from 10 disks,
including “one parity drive”. It should be about 381G in size. Wait,
that’s not right. The disks are each 381 gig :)

_————————————————————————
ld0 59501AF8 58.59GB Primary RAID0 2 0 0 Good
ld1 14FF1600 58.59GB Secondary RAID0 2 0 0 Good
esmft1-root sbin)


2005-08-20 3:59PM

Problem? These 10 disk RAID 5′s are adding up to 3.27 terabytes, but
the maximum LUN size is supposed to be 2 terabytes. Does that mean
we’ll need more parity disks than proposed? Can we chop our RAID 5′s
into multiple LUN’s or multiple slices (probably not multiple slices)?
really 1.6T LUN limit on Solaris 9 – and that’s only with a kernel patch.


2005-08-20 4:11PM

Enabled a 300 second automatic cache flush, then turned it off


cache policy is sequential, but could be changed to random. Probably
would have


sun case id 64704670 – 2 T lun vs 3.27 T RAID 5′s


2005-08-21 11:25AM
Discovered from home earlier, that the serial connection to the RAID
controllers was broken again. Drove to work, rebooted a bit, flipped
things around a bit, eventually found that if I pulled the serial cable
out of port 17 on the cyclades hardware and put it instead into port 21,
all was well again.

I also just tried all three terminal emulations on the RAID controllers,
and found that vt100 works best. There’s also a color mode, but the
box characters looked wrong.


2005-08-21 11:42AM
Tried xterm, mrxvt, rxvt, konsole, gnome-terminal, with each of the
three terminal emulations available. Then I tried an mrxvt with a few
different “ansi” or “microsoft” fonts, but these didn’t work out either.
Then I tried pterm with what its default font is, and it seems to be
working pretty well in ansi color mode.


2005-08-21 12:05PM
Renamed esmf3511a to broken, and mode port 21 esmf3511a – on
conserver.nac. There’s a comment -suggesting- breakage as well


2005-08-21 12:09PM
Just discovered that the drive numbers are neither consecutive, nor
100% drives.

Specifically:

0-11 are 381G drives
12 is StorEdge
13-15 are empty
16-27 are 381G drives?
28 is another StorEdge
29-31 are empty
34-43 are 381G drives

12+12+10


Interesting commands in sccli:

show configuration
show disks
show network-parameters
show redundancy-mode
show rs232-configuration
show sata-router
show sata-mux
upload controller-configuration <file>
download controller-configuration
configure network-interface lan0 [options]
configure global-spare <disk>


sccli> show configuration

* inquiry-data

Vendor: SUN
Product: StorEdge 3511
Revision: 411I
Peripheral Device Type: 0xd
NVRAM Defaults: 411I 3511 S429T
Bootrecord version: 1.31H
Serial Number: 09203A
Page 80 Serial Number: 09203A00000000FFFFFFFF
Page 83 Logical Unit Device ID: 600C0FF00000000009203A0000000000
Page 83 Target Device ID: 206000C0FF09203A
Page D0 Fibre Channel Address: A7 (id 40)
Page D0 Node Name: 206000C0FF09203A
Page D0 Port Name: 216000C0FF89203A
Ethernet Address: 00:C0:FF:09:20:3A
Device Type: Primary
unique-identifier: 09203A
controller-name: “”

* network-parameters

ip-address: 0.0.0.0
netmask: 0.0.0.0
gateway: 0.0.0.0
mode: static

* host-parameters

max-luns-per-id: 32
queue-depth: 1024
fibre connection mode: loop

* drive-parameters

spin-up: disabled
reset-at-power-up: enabled
disk-access-delay: 15s
scsi-io-timeout: 30s
queue-depth: 32
polling-interval: 0ms
enclosure-polling-interval: 30s
auto-detect-swap-interval: 0ms
smart: enabled
auto-global-spare: disabled

* redundancy-mode

Primary controller serial number: 8045200
Redundancy mode: Active-Active
Redundancy status: Enabled
Secondary controller serial number: 8044489

* cache-policy

mode: write-back
optimization: sequential

* RS232-configuration

sccli: retrieving rs232 configuration: error: retrieving rs232
configuration failure

* channels

Ch Type Media Speed Width PID / SID


0 Host FC(L) 2G Serial 40 / NA
1 Host FC(L) ASYNC Serial NA / 42
2 Drive FC(L) 2G Serial 14 / 15
3 Drive FC(L) 2G Serial 14 / 15
4 Host FC(L) 2G Serial 44 / NA
5 Host FC(L) ASYNC Serial NA / 46
6 Host LAN ASYNC Serial NA / NA

* disks

Ch Id Size Speed LD Status IDs Rev


2 0 372.61GB 200MB NONE FRMT BSUN
S/N KRFS26RAH8KPHC
2 1 372.61GB 200MB NONE FRMT BSUN
S/N KRFS26RAH8ET5C
2 2 372.61GB 200MB NONE FRMT BSUN
S/N KRFS26RAH8GV2C
2 3 372.61GB 200MB NONE FRMT BSUN
S/N KRFS26RAH8EL8C
2 4 372.61GB 200MB NONE FRMT BSUN
S/N KRFS26RAH8KR4C
2 5 372.61GB 200MB NONE FRMT BSUN
S/N KRFS26RAH8EU1C
2 6 372.61GB 200MB NONE FRMT BSUN
S/N KRFS26RAH8GVEC
2 7 372.61GB 200MB NONE FRMT BSUN
S/N KRFS26RAH8EJBC
2 8 372.61GB 200MB NONE FRMT BSUN
S/N KRFS26RAH8EHTC
2 9 372.61GB 200MB NONE FRMT BSUN
S/N KRFS26RAH8EPDC
2 10 372.61GB 200MB NONE FRMT BSUN
S/N KRFS26RAH94BTD
2 11 372.61GB 200MB NONE FRMT BSUN
S/N KRFS26RAH7MT9C
2 16 372.36GB 200MB NONE NEW BSUN
S/N KRFS06RAH88RDC
2 17 372.36GB 200MB NONE NEW BSUN
S/N KRFS06RAH88U1C
2 18 372.36GB 200MB NONE NEW BSUN
S/N KRFS06RAH87GWD
2 19 372.36GB 200MB NONE NEW BSUN
S/N KRFS06RAH88NEC
2 20 372.36GB 200MB NONE NEW BSUN
S/N KRFS06RAH88UBC
2 21 372.36GB 200MB NONE NEW BSUN
S/N KRFS06RAH86YVC
2 22 372.36GB 200MB NONE NEW BSUN
S/N KRFS06RAH88KGC
2 23 372.36GB 200MB NONE NEW BSUN
S/N KRFS06RAH86X6C
2 24 372.36GB 200MB NONE NEW BSUN
S/N KRFS06RAH88SUC
2 25 372.36GB 200MB NONE NEW BSUN
S/N KRFS06RAH7HLNC
2 26 372.36GB 200MB NONE NEW BSUN
S/N KRFS06RAH87ELD
2 27 372.36GB 200MB NONE NEW BSUN
S/N KRFS06RAH88R1C
2 32 372.36GB 200MB NONE NEW BSUN
S/N KRFS06RAH89SNC
2 33 372.36GB 200MB NONE NEW BSUN
S/N KRFS06RAH894KC
2 34 372.36GB 200MB NONE NEW BSUN
S/N KRFS06RAH88SPC
2 35 372.36GB 200MB NONE NEW BSUN
S/N KRFS06RAH6T52C
2 36 372.36GB 200MB NONE NEW BSUN
S/N KRFS06RAH784ZC
2 37 372.36GB 200MB NONE NEW BSUN
S/N KRFS06RAH4VA6C
2 38 372.36GB 200MB NONE NEW BSUN
S/N KRFS06RAH89XPC
2 39 372.36GB 200MB NONE NEW BSUN
S/N KRFS06RAH89UZC
2 40 372.36GB 200MB NONE NEW BSUN
S/N KRFS06RAH88Z7C
2 41 372.36GB 200MB NONE NEW BSUN
S/N KRFS06RAH88RBC
2 42 372.36GB 200MB NONE NEW BSUN
S/N KRFS06RAH88U5C
2 43 372.36GB 200MB NONE NEW BSUN
S/N KRFS06RAH89Y1C

* logical-drives

* logical-volumes

* partitions

sccli: no logical drives found

* lun-maps

* SES

Ch Id Chassis Vendor/Product ID Rev PLD WWNN WWPN


2 12 09203A SUN StorEdge 3511F A 0413 1000 204000C0FF09203A
214000C0FF09203A
Topology: loop(a)
2 28 008EE5 SUN StorEdge 3511F D 0413 1000 205000C0FF008EE5
215000C0FF008EE5
Topology: loop(a)
2 44 008EFB SUN StorEdge 3511F D 0413 1000 205000C0FF008EFB
215000C0FF008EFB
Topology: loop(a)
3 12 09203A SUN StorEdge 3511F A 0413 1000 204000C0FF09203A
224000C0FF09203A
Topology: loop(b)
3 28 008EE5 SUN StorEdge 3511F D 0413 1000 205000C0FF008EE5
225000C0FF008EE5
Topology: loop(b)
3 44 008EFB SUN StorEdge 3511F D 0413 1000 205000C0FF008EFB
225000C0FF008EFB
Topology: loop(b)

* port-WWNs

Ch Id WWPN


0 40 216000C0FF89203A
1 42 226000C0FFA9203A
4 44 256000C0FFC9203A
5 46 266000C0FFE9203A

* inter-controller-link

inter-controller-link upper channel 0: connected
inter-controller-link lower channel 0: connected
inter-controller-link upper channel 1: connected
inter-controller-link lower channel 1: connected
inter-controller-link upper channel 4: disconnected
inter-controller-link lower channel 4: disconnected
inter-controller-link upper channel 5: disconnected
inter-controller-link lower channel 5: disconnected

* battery-status

Upper Battery Type: 1
Upper Battery Manufacturing Date: Thu Feb 17 00:00:00 2005
Upper Battery Placed In Service: Thu Jun 9 03:33:30 2005
Upper Battery Expiration Date: Sat Jun 9 03:33:30 2007
Upper Battery Status: good

Lower Battery Type: 1
Lower Battery Manufacturing Date: Thu Feb 17 00:00:00 2005
Lower Battery Placed In Service: Thu Jun 9 03:33:29 2005
Lower Battery Expiration Date: Sat Jun 9 03:33:29 2007
Lower Battery Status: good

* sata-router

Encl-ID Encl-SN Ch Slot Rev Boot-rev CSB HW-rev ST-rev


0 09203A 2 upper DP0555a 0548 0500 11 0552
1 008EE5 2 upper DP0555a 0548 0500 11 0552
2 008EFB 2 upper DP0555a 0548 0500 11 0552
0 09203A 3 lower DP0555a 0548 0500 11 0552
1 008EE5 3 lower DP0555a 0548 0500 11 0552
2 008EFB 3 lower DP0555a 0548 0500 11 0552

* sata-mux

36 mux boards found

Ch Id Mux-SN Mux-Type PC150/Rev PC150/Boot


2 0 009331 A/A BB42 0300
2 1 009332 A/A BB42 0300
2 2 009333 A/A BB42 0300
2 3 009334 A/A BB42 0300
2 4 009335 A/A BB42 0300
2 5 009336 A/A BB42 0300
2 6 009337 A/A BB42 0300
2 7 009338 A/A BB42 0300
2 8 009339 A/A BB42 0300
2 9 00933A A/A BB42 0300
2 10 00933B A/A BB42 0300
2 11 00933C A/A BB42 0300
2 16 009079 A/A BB42 0300
2 17 00907A A/A BB42 0300
2 18 00907B A/A BB42 0300
2 19 00907C A/A BB42 0300
2 20 00907D A/A BB42 0300
2 21 00907E A/A BB42 0300
2 22 00907F A/A BB42 0300
2 23 009080 A/A BB42 0300
2 24 009081 A/A BB42 0300
2 25 009082 A/A BB42 0300
2 26 009083 A/A BB42 0300
2 27 009084 A/A BB42 0300
2 32 0090C1 A/A BB42 0300
2 33 0090C2 A/A BB42 0300
2 34 0090C3 A/A BB42 0300
2 35 0090C4 A/A BB42 0300
2 36 0090C5 A/A BB42 0300
2 37 0090C6 A/A BB42 0300
2 38 0090C7 A/A BB42 0300
2 39 0090C8 A/A BB42 0300
2 40 0090C9 A/A BB42 0300
2 41 0090CA A/A BB42 0300
2 42 0090CB A/A BB42 0300
2 43 0090CC A/A BB42 0300

* FRUs

7 FRUs found in chassis SN#09203A at ch 2 id 12

Name: FC_CHASSIS_BKPLN
Description: SATA,Chassis+Backplane, 2U
Part Number: 370-6775
Serial Number: 09203A
Revision: 01
Manufacturing Date: Sun May 15 05:19:24 2005
Manufacturing Location: Suzhou,China
Manufacturer JEDEC ID: 0×0301
FRU Location: FC MIDPLANE SLOT
Chassis Serial Number: 09203A

Name: FC_RAID_IOM
Description: SE3511 I/O w/SES RAID SATA 2U
Part Number: 370-6773
Serial Number: GH100X
Revision: 03
Manufacturing Date: Wed Jun 8 20:22:42 2005
Manufacturing Location: Milpitas California, USA
Manufacturer JEDEC ID: 0×0301
FRU Location: UPPER FC RAID IOM SLOT
Chassis Serial Number: 09203A

Name: BATTERY_BOARD
Description: BATTERY 2U, FC/SATA
Part Number: 370-6799
Serial Number: GJ02AR
Revision: 01
Manufacturing Date: Tue Mar 22 06:15:04 2005
Manufacturing Location: Penang,Malaysia
Manufacturer JEDEC ID: 0×0301
FRU Location: UPPER BATTERY BOARD SLOT
Chassis Serial Number: 09203A

Name: AC_POWER_SUPPLY
Description: AC PWR SPLY FAN MOD 2U FC/SATA
Part Number: 370-6776
Serial Number: GM1LN4
Revision: 01
Manufacturing Date: Sat Apr 9 02:54:44 2005
Manufacturing Location: Irvine California, USA
Manufacturer JEDEC ID: 0x048F
FRU Location: RIGHT AC PSU SLOT #1 (RIGHT)
Chassis Serial Number: 09203A

Name: AC_POWER_SUPPLY
Description: AC PWR SPLY FAN MOD 2U FC/SATA
Part Number: 370-6776
Serial Number: GM1MDH
Revision: 01
Manufacturing Date: Sun Apr 10 03:44:25 2005
Manufacturing Location: Irvine California, USA
Manufacturer JEDEC ID: 0x048F
FRU Location: AC PSU SLOT #0 (LEFT)
Chassis Serial Number: 09203A

Name: FC_RAID_IOM
Description: SE3511 I/O w/SES RAID SATA 2U
Part Number: 370-6773
Serial Number: GH104L
Revision: 03
Manufacturing Date: Wed Jun 8 20:23:24 2005
Manufacturing Location: Milpitas California, USA
Manufacturer JEDEC ID: 0×0301
FRU Location: LOWER FC RAID IOM SLOT
Chassis Serial Number: 09203A

Name: BATTERY_BOARD
Description: BATTERY 2U, FC/SATA
Part Number: 370-6799
Serial Number: GJ0299
Revision: 01
Manufacturing Date: Mon Mar 21 20:03:34 2005
Manufacturing Location: Penang,Malaysia
Manufacturer JEDEC ID: 0×0301
FRU Location: LOWER BATTERY BOARD SLOT
Chassis Serial Number: 09203A

5 FRUs found in chassis SN#008EE5 at ch 2 id 28

Name: FC_CHASSIS_BKPLN
Description: SATA,Chassis+Backplane, 2U
Part Number: 370-6775
Serial Number: 008EE5
Revision: 01
Manufacturing Date: Tue May 24 17:29:05 2005
Manufacturing Location: Milpitas,CA,USA
Manufacturer JEDEC ID: 0×0301
FRU Location: FC MIDPLANE SLOT
Chassis Serial Number: 008EE5

Name: FC_JBOD_IOM
Description: SE3511 I/O w/SES JBOD SATA 2U
Part Number: 370-6774
Serial Number: GG02A7
Revision: 02
Manufacturing Date: Tue May 17 07:35:35 2005
Manufacturing Location: Milpitas,CA,USA
Manufacturer JEDEC ID: 0×0301
FRU Location: UPPER FC JBOD IOM SLOT
Chassis Serial Number: 008EE5

Name: AC_POWER_SUPPLY
Description: AC PWR SPLY FAN MOD 2U FC/SATA
Part Number: 370-6776
Serial Number: GM1JKV
Revision: 01
Manufacturing Date: Sat Apr 2 01:09:02 2005
Manufacturing Location: Irvine California, USA
Manufacturer JEDEC ID: 0x048F
FRU Location: RIGHT AC PSU SLOT #1 (RIGHT)
Chassis Serial Number: 008EE5

Name: AC_POWER_SUPPLY
Description: AC PWR SPLY FAN MOD 2U FC/SATA
Part Number: 370-6776
Serial Number: GM1JKU
Revision: 01
Manufacturing Date: Sat Apr 2 00:59:29 2005
Manufacturing Location: Irvine California, USA
Manufacturer JEDEC ID: 0x048F
FRU Location: AC PSU SLOT #0 (LEFT)
Chassis Serial Number: 008EE5

Name: FC_JBOD_IOM
Description: SE3511 I/O w/SES JBOD SATA 2U
Part Number: 370-6774
Serial Number: GG02A3
Revision: 02
Manufacturing Date: Tue May 17 07:30:29 2005
Manufacturing Location: Milpitas,CA,USA
Manufacturer JEDEC ID: 0×0301
FRU Location: LOWER FC JBOD IOM SLOT
Chassis Serial Number: 008EE5

5 FRUs found in chassis SN#008EFB at ch 2 id 44

Name: FC_CHASSIS_BKPLN
Description: SATA,Chassis+Backplane, 2U
Part Number: 370-6775
Serial Number: 008EFB
Revision: 01
Manufacturing Date: Tue May 24 17:18:41 2005
Manufacturing Location: Milpitas,CA,USA
Manufacturer JEDEC ID: 0×0301
FRU Location: FC MIDPLANE SLOT
Chassis Serial Number: 008EFB

Name: FC_JBOD_IOM
Description: SE3511 I/O w/SES JBOD SATA 2U
Part Number: 370-6774
Serial Number: GG02AB
Revision: 02
Manufacturing Date: Tue May 17 06:33:35 2005
Manufacturing Location: Milpitas,CA,USA
Manufacturer JEDEC ID: 0×0301
FRU Location: UPPER FC JBOD IOM SLOT
Chassis Serial Number: 008EFB

Name: AC_POWER_SUPPLY
Description: AC PWR SPLY FAN MOD 2U FC/SATA
Part Number: 370-6776
Serial Number: GM1JLD
Revision: 01
Manufacturing Date: Sat Apr 2 01:11:02 2005
Manufacturing Location: Irvine California, USA
Manufacturer JEDEC ID: 0x048F
FRU Location: RIGHT AC PSU SLOT #1 (RIGHT)
Chassis Serial Number: 008EFB

Name: AC_POWER_SUPPLY
Description: AC PWR SPLY FAN MOD 2U FC/SATA
Part Number: 370-6776
Serial Number: GM1JL9
Revision: 01
Manufacturing Date: Sat Apr 2 01:03:47 2005
Manufacturing Location: Irvine California, USA
Manufacturer JEDEC ID: 0x048F
FRU Location: AC PSU SLOT #0 (LEFT)
Chassis Serial Number: 008EFB

Name: FC_JBOD_IOM
Description: SE3511 I/O w/SES JBOD SATA 2U
Part Number: 370-6774
Serial Number: GG02BE
Revision: 02
Manufacturing Date: Tue May 17 08:26:22 2005
Manufacturing Location: Milpitas,CA,USA
Manufacturer JEDEC ID: 0×0301
FRU Location: LOWER FC JBOD IOM SLOT
Chassis Serial Number: 008EFB


sccli> configure network-interface lan0 ip-address 192.168.1.18
netmask 255.255.255.0 gateway 192.168.1.12
sccli: changes will not take effect until controller is reset
sccli> reset controller


Apparently, since some sort of reset or other I did, the RAID controllers’
device names on the V440 are now /dev/es/ses0 (primary) and /dev/es/ses1
(secondary)


We actually have 36 drives, in 3 blocks of 12. The numbers are not
consecutive. It’s 0-11, 16-27, 32-43. Planning to make 0,1, 16,17,
32,33 global spares, and 2-12, 18-27 and 34-43 each 10 disk RAID-5′s.
But this changed later!

# create global spares:
esmft1-root sbin) ./sccli /dev/es/ses0 configure global-spare 2.0
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
esmft1-root sbin) ./sccli /dev/es/ses0 configure global-spare 2.1
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
esmft1-root sbin) ./sccli /dev/es/ses0 configure global-spare 2.16
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
esmft1-root sbin) ./sccli /dev/es/ses0 configure global-spare 2.17
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
esmft1-root sbin) ./sccli /dev/es/ses0 configure global-spare 2.32
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
esmft1-root sbin) ./sccli /dev/es/ses0 configure global-spare 2.33
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]

# create our 3 RAID 5′s:
esmft1-root sbin) ./sccli /dev/es/ses0 create logical-drive raid5
2.2,2.3,2.4,2.5,2.6,2.7,2.8,2.9,2.10,2.11
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
sccli: created logical drive 1E7C869C
esmft1-root sbin) ./sccli /dev/es/ses0 create logical-drive raid5
2.18,2.19,2.20,2.21,2.22,2.23,2.24,2.25,2.26,2.27
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
sccli: created logical drive 57C47980
esmft1-root sbin) ./sccli /dev/es/ses0 create logical-drive raid5
2.34,2.35,2.36,2.37,2.38,2.39,2.40,2.41,2.42,2.43
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
sccli: created logical drive 37EBBD13
esmft1-root sbin)

# Wait for the RAID 5′s to finish initializing:
notify-when-up -f ‘./sccli /dev/es/ses0 show logical-drives | grep -i
initing’ -m $[60*60*5] -i 20
# It’s been chugging 38 minutes so far, and I’ve changed the notify-when-up to:
notify-when-up -f ‘./sccli /dev/es/ses0 show logical-drives | grep -i
initing’ -m $[60*60*24*2]
# IE, wait for two days before getting impatient

# it took about 14 hours to initialize the RAID 5′s:
esmft1-root sbin) ./sccli /dev/es/ses0 show logical-drives
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
LD LD-ID Size Assigned Type Disks Spare Failed Status


ld0 1E7C869C 3.27TB Primary RAID5 10 6 0 Good
ld1 57C47980 3.27TB Primary RAID5 10 6 0 Good
ld2 37EBBD13 3.27TB Primary RAID5 10 6 0 Good
esmft1-root sbin)


Someone on comp.unix.solaris suggests that using > 2T LUN’s isn’t
going to work, and suggests partitioning the RAID 5′s (on the 3511?).

But when I try to do that, I’m getting:

smft1-root sbin) ./sccli /dev/es/ses0 show partitions
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
LD/LV ID-Partition Size


ld0-00 1E7C869C-00 0MB
ld1-00 57C47980-00 0MB
ld2-00 37EBBD13-00 0MB

esmft1-root sbin) ./sccli /dev/es/ses0 configure partition 1E7C869C-00 delete
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
sccli: cannot delete only partition

esmft1-root sbin) ./sccli /dev/es/ses0 configure partition 1E7C869C-00
1714421MB
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
sccli: cannot increase size of only partition

esmft1-root sbin) ./sccli /dev/es/ses0 configure partition 1E7C869C-01
1714421MB
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
sccli: not enough space available from previous partition


Since the partitioning isn’t working out, I’m going to just go ahead
and try the huge LUN’s:

esmft1-root sbin) ./sccli /dev/es/ses0 map ld0 0.40.0
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
sccli: mapping ld0-00 to 0.40.0
esmft1-root sbin) ./sccli /dev/es/ses0 map ld1 0.40.1
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
sccli: mapping ld1-00 to 0.40.1
esmft1-root sbin)
esmft1-root sbin) ./sccli /dev/es/ses0 map ld2 0.40.2
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
sccli: mapping ld2-00 to 0.40.2
esmft1-root sbin)

esmft1-root sbin) add-device
esmft1-root sbin)

Format’s autoconfigure says:
The capacity of this LUN is too large.
Reconfigure this LUN so that it is < 2TB.
Auto configure failed


Steve Scharf e-mailed a bit ago:

Hey, Dan. A few suggestions:

1. Get a direct serial connection to the array, use the supplied serial
cable. Working with the SE 3511 UI is very easy and straightforward. Do
this if your serial connections continue to be a problem.

2. Make sure the array firmware is 4.11 or newer. This gives the
quick initialization, and numerous other features and bug fixes. Very
important. It should already be up-to-date, if not the patch is 113724.

3. Don’t use Logical Volumes or NRAID. Keep with Logical Disks, then
partition and present. The space calculations were done with 5+1 RAID 5
in all of the expansion trays, with one hot spare in the controller tray.

4. Multi Terabyte support with Solaris 9 is from 08/03 and newer. The
QFS filesystem then provides virtually unlimited filesystem support.

5. Enable MPXIO Fibre Channel mutltitasking:

Add to /kernel/drv/scsi_vhci.conf:
device-type-scsi-optionslist
= \
“SUN StorEdge 3511″,\
“symmetric-option”;
symmetric-option =
0×1000000;
EIS-CD: …/
sun/tools/storage/SE3x10/3511 in file

6. If there are any issues with the LUNs you have built, delete them
and recreate. You can do this with the UI, check to make sure that the
default is to do the quick initialization – it should take just a few
minutes to initialize – not the hours that it was taking before!

7. Make sure that you understand how the Primary and Secondary channels
are set up, and how they interract. This will determine how your LUNs
are presented to the host.

I hope that helps!

steve


I can’t believe they’re now saying 5+1′s!


Unmapping LUN’s:

(No, not the correct method, despite the lack of errors)
esmft1-root sbin) ./sccli /dev/es/ses0 unmap partition ld0
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
esmft1-root sbin) ./sccli /dev/es/ses0 unmap partition ld1
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
esmft1-root sbin) ./sccli /dev/es/ses0 unmap partition ld2
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]

Correct method:
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
Ch Tgt LUN ld/lv ID-Partition Assigned Filter Map


0 40 0 ld0 1E7C869C-00 Primary
0 40 1 ld1 57C47980-00 Primary
0 40 2 ld2 37EBBD13-00 Primary
esmft1-root sbin) ./sccli /dev/es/ses0 unmap partition 0.40.0
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
esmft1-root sbin) ./sccli /dev/es/ses0 unmap partition 0.40.1
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
esmft1-root sbin) ./sccli /dev/es/ses0 unmap partition 0.40.2
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
esmft1-root sbin) ./sccli /dev/es/ses0 show lun-maps
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
esmft1-root sbin)


Unconfiguring global spares:

esmft1-root sbin) ./sccli /dev/es/ses0 unconfigure global-spare 2.0
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
esmft1-root sbin) ./sccli /dev/es/ses0 unconfigure global-spare 2.1
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
esmft1-root sbin) ./sccli /dev/es/ses0 unconfigure global-spare 2.16
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
esmft1-root sbin) ./sccli /dev/es/ses0 unconfigure global-spare 2.17
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
esmft1-root sbin) ./sccli /dev/es/ses0 unconfigure global-spare 2.32
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
esmft1-root sbin) ./sccli /dev/es/ses0 unconfigure global-spare 2.33
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
esmft1-root sbin)


Deleting logical drives:

esmft1-root sbin) ./sccli /dev/es/ses0 delete logical-drive ld0
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
sccli: ld0: deleted logical drive
esmft1-root sbin) ./sccli /dev/es/ses0 delete logical-drive ld1
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
sccli: ld1: deleted logical drive
esmft1-root sbin) ./sccli /dev/es/ses0 delete logical-drive ld2
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
sccli: deleting logical drive: ld2: error: bad logical drive id in
library database
esmft1-root sbin) ./sccli /dev/es/ses0 show logical-drives
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
LD LD-ID Size Assigned Type Disks Spare Failed Status


ld0 57C47980 3.27TB Primary RAID5 10 0 0 Good
esmft1-root sbin) ./sccli /dev/es/ses0 delete logical-drive ld0
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
sccli: ld0: deleted logical drive
esmft1-root sbin) ./sccli /dev/es/ses0 show logical-drives
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
esmft1-root sbin)

Looks like it was renumbering the drives to start from 0, when I deleted 0.


2005-08-22 10:46AM
Creating smaller logical drives this time:

esmft1-root sbin) ./sccli /dev/es/ses0 show logical-drives
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
LD LD-ID Size Assigned Type Disks Spare Failed Status


ld0 57C47980 3.27TB Primary RAID5 10 0 0 Good
esmft1-root sbin) ./sccli /dev/es/ses0 create logical-drive raid5
2.0,2.1,2.2,2.3,2.4,2.5
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
sccli: created logical drive 495AC0FE
esmft1-root sbin) ./sccli /dev/es/ses0 create logical-drive raid5
2.6,2.7,2.8,2.9,2.10,2.11
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
sccli: created logical drive 6FF7990D
esmft1-root sbin) ./sccli /dev/es/ses0 create logical-drive raid5
2.16,2.17,2.18,2.19,2.20,2.21
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
sccli: created logical drive 2E105DC7
esmft1-root sbin) ./sccli /dev/es/ses0 create logical-drive raid5
2.22,2.23,2.24,2.25,2.26,2.27
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
sccli: created logical drive 0BE08141
esmft1-root sbin) ./sccli /dev/es/ses0 create logical-drive raid5
2.34,2.35,2.36,2.37,2.38,2.39
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
sccli: created logical drive 0A213AD7
esmft1-root sbin) ./sccli /dev/es/ses0 show logical-drives
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
LD LD-ID Size Assigned Type Disks Spare Failed Status


ld0 495AC0FE 0MB Primary RAID5 6 0 0 Initing
ld1 6FF7990D 0MB Primary RAID5 6 0 0 Initing
ld2 2E105DC7 0MB Primary RAID5 6 0 0 Initing
ld3 0BE08141 0MB Primary RAID5 6 0 0 Initing
ld4 0A213AD7 0MB Primary RAID5 6 0 0 Initing
esmft1-root sbin)

I numbered the last one “wrong”, so:

esmft1-root sbin) ./sccli /dev/es/ses0 delete logical-drive ld4
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
sccli: ld4: deleted logical drive
./sccli /dev/es/ses0 create logical-drive raid5 2.32,2.33,2.34,2.35,2.36,2.37

…and now we should have consecutive numbers at the end, for creating
global spares.


2005-08-22 10:50AM
Redoing the global spare assignments:

esmft1-root sbin) ./sccli /dev/es/ses0 configure global-spare 2.38
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
esmft1-root sbin) ./sccli /dev/es/ses0 configure global-spare 2.39
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
esmft1-root sbin) ./sccli /dev/es/ses0 configure global-spare 2.40
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
esmft1-root sbin) ./sccli /dev/es/ses0 configure global-spare 2.41
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
esmft1-root sbin) ./sccli /dev/es/ses0 configure global-spare 2.42
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]
esmft1-root sbin) ./sccli /dev/es/ses0 configure global-spare 2.43
sccli: selected device /dev/es/ses0 [SUN StorEdge 3511 SN#09203A]


2005-08-22 10:54AM

I have two notify-when-up’s on the init’s. One is the usual, and one
will page me when the initializations are done. Let’s hope it doesn’t
take 18 hours again, since I didn’t get any responses about how to turn
on quick init.


Good doc:

http://www.sun.com/products-n-solutions/hardware/docs/html/817-3711-13/index.html


A list of Sun documents about 3511′s:

http://docs.sun.com/app/docs/coll/3511FCarray


2005-08-22 1:41PM

I finally got into the 3511 by ethernet, and shortly afterward was able
to reenable the serial port. It turned out the machine didn’t like the
long password I had set previously, but I shortened it up, and it let
me right in. :-S


2005-08-22 1:47PM

I found a way to get the init progress out of the serial interface (the
network interface is slower, believe it or not, even though I dropped the
BPS on the serial interface to 9600 – it seems that the network interface
is very high latency or something). They’re all 5 just over 25% done.


2005-08-22 1:58PM

Just left another voicemail for Steve Scharf, reading him my list of
questions from my latest e-mail basically.

I also just found that if I change something on the 3511 RAID controller
via the network, I also see it on the serial port, and vice-versa.


2005-08-22 2:33PM

Turns out it’s “online initialization mode” that completes fast – almost
immediately. It’s easy to find serially or via the network, but I don’t
know where it’d be via sccli

Set stripe size to 256K, from 128K default.

Told it to use the redundant RAID controller on each creation – not yet
sure if this is sufficient for failover.


2005-08-2:42PM

A “SID” pertains to the secondary controller.

A “PID” pertains to the primary controller.


Checking for problems:

sccli:

show battery-status
show channels
show configuration
show controller-name
show disks
show drive-parameters
show enclosure-status
show FRUs
show redundancy-mode
show ses


esmft1-root sbin) cat check-3511
#!/usr/bin/env bash

(
./sccli /dev/es/ses2 show battery-status
./sccli /dev/es/ses2 show channels
./sccli /dev/es/ses2 show configuration
./sccli /dev/es/ses2 show controller-name
./sccli /dev/es/ses2 show disks
./sccli /dev/es/ses2 show drive-parameters
./sccli /dev/es/ses2 show enclosure-status
./sccli /dev/es/ses2 show FRUs
./sccli /dev/es/ses2 show redundancy-mode
./sccli /dev/es/ses2 show ses
) > current

OUTPUT=”$(diff prior current)”
if [ "$OUTPUT" = "" ]
then
echo ‘All (checked) is well’
else
echo Errors:
echo “$OUTPUT”
fi | mailx -s “$(hostname) QFS/3511 differences” strombrg@uci.edu

esmft1-root sbin)

Posted in SAN | Leave a comment

Configuring File System on HP-UX using LVM

1. Create Volume Group
Note: the following example is using the disk c0t3d5, the volume group vg01, the logical volume lvtest, and mount point /test

1.1 Identify the disks to be used for LVM  and create the missing device files

# insf -eC disk

# ioscan -nfC disk

1.2 Create a LVM data structure on each identified disk

# pvcreate /dev/rdsk/c0t3d5

Note: if the disk was previously used in another VG, use the following command instead:

# pvcreate -f /dev/rdsk/ c0t3d5

1.3 Collect all the physical volumes to form a new volume group

1.3.1 Go to dev directory (/dev)

# cd /dev

1.3.2 Create VG name

# mkdir vg01

1.3.3 Make directory and special file in VG

# mknod /dev/vg01/group c 64 0×010000

Note: the group number (last parameter – 0×010000 ) is in hexadecimal and should be different for each volume group

1.3.4 Create the volume group

# vgcreate -s [pe_size] -e [max_pe] /dev/vg01 /dev/dsk/ c0t3d5

Note: when a volume group is created without define pe_size and max_pe parameter, the maximum physical extents per volume (max_pe) will be set to the max_pe of the largest physical volume (PV). The effect of not setting the max_pe parameter would be that any PV added to the volume group in the future regardless of there size will be limited to the volume groug creation value of max_pe. Therefore, consider increasing the max_pe to accommodate PV’s that may likely be larger than the largest PV used to create the Volume Group. The formula to use to determine the value is:

physical_extent_size * max_pe = size_of_the_disk.

Posted in HP-UX | Leave a comment

FC Zoning and FC Discovery process

The short answer

If you’re familiar with FC Zoning as well as the FC protocol and don’t require a detailed explanation, the short answer is; “You no longer have a choice.  As of today, all of the FC/FCoE switches supported by EMC provide hardware enforcement for both “WWPN” and “Domain, Port” based zones”.  For the sake of completeness, there are some situations where hardware enforcement is effectively disabled but as long as your fan-in and fan-out ratios remain below 1:64 or 64:1 and/or you’re not using NPIV, you won’t need to worry about this.

Read on if you’d like a bit more detail.

The long answer…

As I started writing this section it quickly became apparent that I would need to provide an introduction to zoning and this leads to a discussion about FC Login, discovery, etc.  So I’ll start with the basics first and then get a bit more detailed as I go.  To start with, let’s assume a configuration similar to the following.

 

Starting from the left, the configuration consists of:

1)      A Host containing a single HBA/CNA port that has a WWPN (World Wide Port Name) of 10:00:00:00:00:00:00:00 and was assigned an FCID (Fibre Channel IDentifier) of 030100 during the Fabric login process.

2)      A FC Fabric containing two FC switches:

  • FC/FCoE Switch Domain 3; and
  • FC/FCoE Switch Domain 4

3)      A Storage array containing a port that has a WWPN of 50:00:09:71:20:30:40:50 and was assigned an FCID of 040200 during the Fabric login process.

A few points to take note of:

  • This configuration could be all FC, all FCoE or a combination of both.
  • The HBA/CNA and Storage Array ports both have a WWPN that is assigned to the port in some vendor specific way AND an FCID that is assigned to each port by the switch during Fabric Login.
  • The middle byte of the FCIDs that I have shown correspond to the physical interface and this is not always the case (especially in Cisco environments)
  • I will only be talking about Open Systems hosts in this post.  Apologies to FICON users, you’ll have to wait for FC-SB-5 to be finished before any of this applies to you.

What is a zone, zone set, configuration, etc

A zone is a collection of WWPNs, FCIDs or both that have been associated with one another for the purpose of allowing them to freely access one another.  Zones have to be added to a zone set or configuration and then activated onto a fabric in order for the access defined in the zone to become effective.  For example in the diagram below, I’ve updated the example topology so that it now shows a single zone named “TEST” that is a part of the Zone set/configuration “Test CFG” and contains two WWPN members.

A couple of important points to note:

1)      For all practical purposes, the zone set “Test CFG” could have been activated on any switch in the Fabric.  This is because when a zone set is activated it is pushed to every switch in the fabric simultaneously.

2)      As soon as the zone set has been activated, the zone members will be allowed to discover one another.  This is where the difference between hard zoning and soft zoning starts but before I dive into those details let’s talk about FC discovery first.

The FC Discovery process

In order for an HBA/CNA or storage port to use a fabric, it has to login, perform registration and then perform discovery.  This process is illustrated in the following diagram and explained in more detail in the text that follows.

 

Each time an FC port initializes, it must perform some kind of login process in order for it to be able to use the fabric.  In practice each HBA/CNA uses a slightly different login process but they all have certain things in common.  One example is the need to transmit FLOGI (Fabric Login) and receive an ACC (accept) from the fabric before attempting to do anything else.  I point this out because although in practice all of the HBA/CNA or storage port implementations that I am familiar with will perform the same basic steps, the order of steps 5, 7 and 9 may be slightly different and the exact commands used within each step may vary as well.

Step 0 (Not shown in diagram)

Assuming a port is initializing from the power off or loss of signal/sync state, speed negotiation and Link Initialization will be performed.  At the end of the Link Initialization process, the HBA/CNA or Storage port that is initializing will just be passing IDLE frames back and forth with the switch port it has been connected to and both ports will be considered to be in the ACTIVE state.

Step 1 (FLOGI)

FLOGI (Fabric Login) is the first frame transmitted by an end device that is attempting to attach to a switch.  The FLOGI contains many bits of information about this initializing end device (N_Port), but for the sake of the discussion on zoning, we only need to recognize that the initializing N_Port’s WWPN (World Wide Port Name) is included in the FLOGI.  As shown previously, this WWPN can be used in a zone to allow the initializing N_Port to access another N_Port.

Step 2 (FLOGI ACC)

Assuming the switch is functioning properly, is not too busy and there are no configuration parameters set on the switch that would prevent a particular N_Port from logging in, the switch will respond to the FLOGI with an FLOGI ACC.  The format of the FLOGI ACC is identical to the FLOGI request but the information contained within it will be specific to the responding switch/switch port.  Also, a VERY IMPORTANT piece of information that is relevant to zoning enforcement known as the FCID (Fibre Channel IDentifier) is provided to the N_Port in the FLOGI ACC.  Unlike the WWPN, this FCID will be present in every frame that will be transmitted by the N_Port and as you will see, the FCID effectively becomes the N_Port’s identity while logged into the fabric.  The relationship a WWPN has with the FCID it has been assigned by the fabric is one of the factors that allows for zoning to be enforced in hardware.

Step 3 (PLOGI NS)

One the FLOGI has been accepted by the switch, the N_Port will login with the Name Server.  Again, this has to be done in order for the N_Port to be able to register with and send queries to the Name Server.

Step 4 (PLOGI ACC)

Assuming the switch is functioning properly and is not too busy, it will respond to the PLOGI with PLOGI ACC.  The format of the PLOGI ACC is identical to the PLOGI request but the information contained within it will be specific to the responding switch/switch port.

Step 5 (Register with the Name Server)

Once the attaching N_Port is logged into the Name Server it may register with it.  There are many different registration commands that an N_Port could use but a typical one is RFT_ID or in plain English “Register the specified FC-4 Type for the provided FCID”.  In this case we will assume that all N_Ports involved either have or will register an FC-4 Type of “SCSI-FCP”.  Note, although it’s a bit out of scope for this post, I will mention that this isn’t usually the case.  Many N_Ports (especially targets) choose to register with the Name Server in multiple ways, the purpose for doing so is to ensure that no matter what Name Server query an initiator uses, the target will always be discoverable.

Step 6 (Name Server Accepts registrations)

Assuming the switch is functioning properly and is not too busy, it will accept the registrations.  If this fails, an attaching N_Port should retry.

Step 7 (SCR – State Change Registration)

The attaching N_Port will perform a full registration for RSCNs.  By doing so, the N_Port is requesting the switch to send it a Registered State Change Notification (RSCN) every time something in the fabric changes.  These changes currently include events like the addition and removal of a Domain (e.g., switch) as well as a zoning change being made to the fabric that impacts the device.

Step 8 (Fabric Controller accepts the State Change Registration)

Assuming the switch is functioning properly and is not too busy, it will accept the SCR

Step 9 (Query the Name Server)

At this point in the login process the attaching N_Port will query the Name Server in an attempt to discover what other devices are logged into the fabric and available for it to communicate with.  Since I stated that we would assume all N_Ports in the fabric would register an FC-4 type of SCSI-FCP (see step 5), we’ll assume that the attaching N_Port will use a Name Server query called GID_FT or in plain English “Get Port Identifiers for the devices that registered the specified FC-4 type” and will specify an FC-4 of SCSI-FCP.

And finally … information directly relevant to the topic of Hard Zoning versus soft zoning.

Step 10 (Name Server response to queries)

In response to the Name Server query, the switch will return a list of port identifiers (i.e., 030100 and 040200).  More specifically, the switch will only return the Port IDs for other FC devices that:

  1. have registered an FC-4 of SCSI-FCP (since that is what we queried for); AND
  2. share a common zone with the device that queried the Name Server.

For example, in the following diagram Host 1, Storage 1A and Storage 1B are all in the same Zone.  If any of these devices were to query the Name Server, they should only get 3 Port IDs back.  In the case of a switch that only supports “soft zoning”; zoning is enforced by allowing N_Ports to discover only those Port IDs that are associated with N_Ports that they have been granted access to (via zoning).  Port IDs associated with N_Ports that do not share a common zone with the querying N_Port will not be returned in Name Server responses.  

The downside of soft zoning is the switch does nothing to prevent a rogue host from transmitting frames directly to another N_Port’s Port ID.  To some this represents a serious security flaw and it’s hard to argue against this point.  However, in practice, this behavior is more of a problem when you had a malfunctioning adapter or an incorrectly programmed driver that would insist on communicating with another device even if access to that device was removed via a zoning change.
Step 11+ (End to End PLOGI) see diagram below

Once an N_Port discovers the other port IDs it can communicate with, it will perform an end to end PLOGI with them.  In practice only Hosts (Initiators) end up performing this PLOGI and they are usually smart enough to not PLOGI themselves.

When the initiator transmits the PLOGI, it will set the D_ID (Destination ID ) of the frame to be equal to one of the Port IDs returned from the Name Server and it will set the S_ID (Source ID) of the frame to be equal to its own Port ID (assigned in FLOGI ACC).

When the switch receives the end to end PLOGI, if it supports Hard zoning, it will check the D_ID of the frame and make sure that the specified S_ID is allowed to access (is zoned to have access) the specified D_ID.  If yes, the PLOGI is forwarded on to the destination if not, the PLOGI is dropped.  This is what is commonly referred to as Hard Zoning or Hardware enforced zoning.   Since the PLOGI is dropped, the login process never continues past this point.  I’ve heard but have not been able to confirm in the lab that some switch vendors implement hard zoning by trapping all PLOGIs from N_Ports at the fabric ingress port and forwarding them to the control plane of the switch.  The control plane then only forwards those PLOGI frames that should be allowed.

 

Posted in SAN | Leave a comment

Splunk + OSSEC Integration

The status of the next version of the OSSEC web interface is one of the more commonly asked questions on the mailing list and is currently #2 on the community requested feature list (http://ossec.uservoice.com).

While web interfaces are nice to have, many of us suffer from information island overload by having dedicated web interfaces for each application. This is why I was stoked when the syslog ouput feature was announced last summer (http://www.ossec.net/dcid/?p=139) and officially added in version 1.6. Now I can incorporate OSSEC alerts into my SIM/SIEM or log management tool of choice, which not only eliminates the need for a dedicated OSSEC web interface but also allows for simplified incident analysis through aggregation and correlation.

In my environment, we chose Splunk based on its quick search and endless customization. Getting OSSEC alerts into Splunk is a breeze. Just grab the free license version of Splunk, install the Splunk for OSSEC app, and point the OSSEC syslog output to your Splunk server. BAM! Instant wui 0.4.

The Splunk-for-OSSEC application is a community project that was started by myself and Elazar Broad. The initial goal of this application was to provide the same set of reports that can be obtained through ossec-reportd. From there we’ve also added several other useful features:

  1. Top rules last 24 hrs
  2. Top source IP last 24 hrs
  3. Top user last 24 hrs
  4. Bruteforce top source IP last 24 hrs
  5. OSSEC rules for last hour
  6. OSSEC alert levels for last 24 hrs
  7. IP Geolocation lookups
  8. whois lookups
  9. rDNS lookups
  10. web attack and bruteforce tags.

OSSEC and Splunk configuration instructions

More details at the ossec wiki.

  1. Inside ossec.conf add a syslog_output block specifying your Splunk system IP address and the port it is listening on:

<syslog_output>
<server>172.10.2.3</server>
<port>10002</port>
</syslog_output>

  1. Now you need to enable the syslog_output module and restart OSSEC:

#/var/ossec/bin/ossec-control enable client-syslog
#/var/ossec/bin/ossec-control restart

  1. On the Splunk side, add this stanza to inputs.conf:

$SPLUNK_HOME/etc/system/local/inputs.conf

[udp://172.10.2.4:10002] #IP address of OSSEC server
disabled = false
sourcetype = ossec

By setting the sourcetype as OSSEC you’re ready to take advantage of the Splunk for OSSEC app which can be found here: http://www.splunkbase.com/apps/All/Security/app:Splunk+for+OSSEC.

  1. Make sure you update any local or network firewalls that this communication is traversing and then restart Splunk.

# $SPLUNK_HOME/bin/splunk restart

Splunk:
http://www.splunk.com/download

Splunk-for-OSSEC:
http://www.splunkbase.com/apps/All/Security/app:Splunk+for+OSSEC#

Posted in Linux | Leave a comment

EMC PowerPath Migration Enabler – Host Copy (Windows)

Requirements:

  • PowerPath, at least version 5.1 SP1 (I would suggest at least 5.3 if running Windows 2003/2008)
  • PowerPath Migration Enabler key (host-copy)
  • Supported storage array for target and destination

Details:

To explain this migration technique a little more, PPME is a block level migration.  It migrates the blocks on the LUN using the host to process the migration.  This can cause performance degradation depending on how active the host is and the throttle you specify during the synchronization. Since the migration is at the block level, whatever the filesystem/alignment offset on the source LUN is exactly what gets migrated. You can migrate to a larger LUN but NOT to a smaller LUN.
If you need to make a configuration change to the filesystem, such as correcting an alignment offset issue, PPME is NOT the tool.  EMC Open Migrator (OM), however, can do that. OM can migrate LUNs online, but the setup and takedown require reboots (no less than three). I digress, let’s get on with the PPME migration.

Process:

The high-level process to complete a migration with PPME is this:

  • powermig setup -src <pseduoname> -tgt <pseudoname> -techtype hostcopy
  • powermig sync -handle <x>
  • powermig query -handle <x>
  • powermig throttle -handle <x> -throttlevalue <y>
  • powermig selecttarget -handle <x>
  • powermig commit -handle <x>
  • powermig cleanup -handle <x>

Note: Adding -noprompt to many of these commands, specifically those that take action, prevent the yes/no prompt.

A live example for this migration…….

C:\Documents and Settings\Administrator>powermt set policy=co dev=all

C:\Documents and Settings\Administrator>powermt save

C:\Documents and Settings\Administrator>powermt display dev=all
Pseudo name=harddisk2
CLARiiON ID=CK200064900482 [NOZOMI_SUP_SG]
Logical device ID=600601607BD01A00F68F2AAC48C3DB11 [LUN 77]
state=alive; policy=CLAROpt; priority=0; queued-IOs=0
Owner: default=SP B, current=SP B       Array failover mode: 1
==============================================================================
—————- Host —————   – Stor -   — I/O Path -  — Stats —
### HW Path                 I/O Paths    Interf.   Mode    State  Q-IOs Errors
==============================================================================
3 port3\path0\tgt0\lun0     c3t0d0    SP A5     active  alive      0      7
3 port3\path0\tgt1\lun0     c3t1d0    SP B4     active  alive      0      1

Pseudo name=harddisk3
CLARiiON ID=CK200064900482 [NOZOMI_SUP_SG]
Logical device ID=60060160C2021B00D8807DC433F7DD11 [LUN 72]
state=alive; policy=CLAROpt; priority=0; queued-IOs=1
Owner: default=SP A, current=SP A       Array failover mode: 1
==============================================================================
—————- Host —————   – Stor -   — I/O Path -  — Stats —
### HW Path                 I/O Paths    Interf.   Mode    State  Q-IOs Errors
==============================================================================
3 port3\path0\tgt0\lun1     c3t0d1    SP A5     active  alive      1      7
3 port3\path0\tgt1\lun1     c3t1d1    SP B4     active  alive      0      1

Pseudo name=harddisk4
CLARiiON ID=CK200064900482 [NOZOMI_SUP_SG]
Logical device ID=60060160416121000560A5593994E111 [LUN 301]
state=alive; policy=CLAROpt; priority=0; queued-IOs=0
Owner: default=SP B, current=SP B       Array failover mode: 1
==============================================================================
—————- Host —————   – Stor -   — I/O Path -  — Stats —
### HW Path                 I/O Paths    Interf.   Mode    State  Q-IOs Errors
==============================================================================
3 port3\path0\tgt0\lun2     c3t0d2    SP A5     active  alive      0      1
3 port3\path0\tgt1\lun2     c3t1d2    SP B4     active  alive      0      1

Pseudo name=harddisk5
CLARiiON ID=FCN00120800055 [SG_NOZOMI-SUP]
Logical device ID=6006016010A030009C49FE259E94E111 [LUN 300]
state=alive; policy=CLAROpt; priority=0; queued-IOs=0
Owner: default=SP B, current=SP B       Array failover mode: 4
==============================================================================
—————- Host —————   – Stor -   — I/O Path -  — Stats —
### HW Path                 I/O Paths    Interf.   Mode    State  Q-IOs Errors
==============================================================================
3 port3\path0\tgt2\lun0     c3t2d0    SP B1     active  alive      0      1

C:\Documents and Settings\Administrator>powermig setup -src harddisk4 -tgt harddisk5 -techtype hostcopy

Setup migration? [yes]/no: y

Migration Handle = 1

C:\Documents and Settings\Administrator>powermig info -all
==========================================
Hnd  Source     Target         Tech  State
===  =========  =========  ========  =====
1  harddisk4  harddisk5  HostCopy  setup

C:\Documents and Settings\Administrator>powermig info -all
==========================================
Hnd  Source     Target         Tech  State
===  =========  =========  ========  =====
1  harddisk4  harddisk5  HostCopy  setup

C:\Documents and Settings\Administrator>powermig query -handle 1

Handle: 1
Source: harddisk4
Target: harddisk5
Technology: HostCopy
Migration state: setup

C:\Documents and Settings\Administrator>powermig sync -handle 1

Start sync? [yes]/no: y

C:\Documents and Settings\Administrator>powermig query -handle 1

Handle: 1
Source: harddisk4
Target: harddisk5
Technology: HostCopy
Migration state: syncing
Percent InSync: 0%
Throttle Value: 2
Suspend time: 5

C:\Documents and Settings\Administrator>powermig query -handle 1

Handle: 1
Source: harddisk4
Target: harddisk5
Technology: HostCopy
Migration state: syncing
Percent InSync: 67%
Throttle Value: 2
Suspend time: 5

C:\Documents and Settings\Administrator>powermig pause -handle 1

Pause migration? [yes]/no: y

PPME error(4): Not in proper state to perform the requested operation

C:\Documents and Settings\Administrator>powermig query -handle 1

Handle: 1
Source: harddisk4
Target: harddisk5
Technology: HostCopy
Migration state: sourceSelected

C:\Documents and Settings\Administrator>powermt display dev=all
Pseudo name=harddisk2
CLARiiON ID=CK200064900482 [NOZOMI_SUP_SG]
Logical device ID=600601607BD01A00F68F2AAC48C3DB11 [LUN 77]
state=alive; policy=CLAROpt; priority=0; queued-IOs=0
Owner: default=SP B, current=SP B       Array failover mode: 1
==============================================================================
—————- Host —————   – Stor -   — I/O Path -  — Stats —
### HW Path                 I/O Paths    Interf.   Mode    State  Q-IOs Errors
==============================================================================
3 port3\path0\tgt0\lun0     c3t0d0    SP A5     active  alive      0      7
3 port3\path0\tgt1\lun0     c3t1d0    SP B4     active  alive      0      1

Pseudo name=harddisk3
CLARiiON ID=CK200064900482 [NOZOMI_SUP_SG]
Logical device ID=60060160C2021B00D8807DC433F7DD11 [LUN 72]
state=alive; policy=CLAROpt; priority=0; queued-IOs=0
Owner: default=SP A, current=SP A       Array failover mode: 1
==============================================================================
—————- Host —————   – Stor -   — I/O Path -  — Stats —
### HW Path                 I/O Paths    Interf.   Mode    State  Q-IOs Errors
==============================================================================
3 port3\path0\tgt0\lun1     c3t0d1    SP A5     active  alive      0      7
3 port3\path0\tgt1\lun1     c3t1d1    SP B4     active  alive      0      1

Pseudo name=harddisk4
CLARiiON ID=CK200064900482 [NOZOMI_SUP_SG]
Logical device ID=60060160416121000560A5593994E111 [LUN 301]
state=alive; policy=CLAROpt; priority=0; queued-IOs=0
Owner: default=SP B, current=SP B       Array failover mode: 1
==============================================================================
—————- Host —————   – Stor -   — I/O Path -  — Stats —
### HW Path                 I/O Paths    Interf.   Mode    State  Q-IOs Errors
==============================================================================
3 port3\path0\tgt0\lun2     c3t0d2    SP A5     active  alive      0      1
3 port3\path0\tgt1\lun2     c3t1d2    SP B4     active  alive      0      1

Pseudo name=harddisk5
CLARiiON ID=FCN00120800055 [SG_NOZOMI-SUP]
Logical device ID=6006016010A030009C49FE259E94E111 [LUN 300]
state=alive; policy=CLAROpt; priority=0; queued-IOs=0
Owner: default=SP B, current=SP B       Array failover mode: 4
==============================================================================
—————- Host —————   – Stor -   — I/O Path -  — Stats —
### HW Path                 I/O Paths    Interf.   Mode    State  Q-IOs Errors
==============================================================================
3 port3\path0\tgt2\lun0     c3t2d0    SP B1     active  alive      0      1

C:\Documents and Settings\Administrator>powermig query -handle 1

Handle: 1
Source: harddisk4
Target: harddisk5
Technology: HostCopy
Migration state: sourceSelected

C:\Documents and Settings\Administrator>powermig selectTarget -handle 1

Transition to targetSelected state? [yes]/no: y

C:\Documents and Settings\Administrator>powermig query -handle 1

Handle: 1
Source: harddisk4
Target: harddisk5
Technology: HostCopy
Migration state: targetSelected

C:\Documents and Settings\Administrator>powermig commit -handle 1

Commit migration? [yes]/no: y

C:\Documents and Settings\Administrator>powermig query -handle 1

Handle: 1
Source: harddisk4
Target: harddisk5
Technology: HostCopy
Migration state: committed

C:\Documents and Settings\Administrator>powermt display dev=all
Pseudo name=harddisk2
CLARiiON ID=CK200064900482 [NOZOMI_SUP_SG]
Logical device ID=600601607BD01A00F68F2AAC48C3DB11 [LUN 77]
state=alive; policy=CLAROpt; priority=0; queued-IOs=0
Owner: default=SP B, current=SP B       Array failover mode: 1
==============================================================================
—————- Host —————   – Stor -   — I/O Path -  — Stats —
### HW Path                 I/O Paths    Interf.   Mode    State  Q-IOs Errors
==============================================================================
3 port3\path0\tgt0\lun0     c3t0d0    SP A5     active  alive      0      7
3 port3\path0\tgt1\lun0     c3t1d0    SP B4     active  alive      0      1

Pseudo name=harddisk3
CLARiiON ID=CK200064900482 [NOZOMI_SUP_SG]
Logical device ID=60060160C2021B00D8807DC433F7DD11 [LUN 72]
state=alive; policy=CLAROpt; priority=0; queued-IOs=1
Owner: default=SP A, current=SP A       Array failover mode: 1
==============================================================================
—————- Host —————   – Stor -   — I/O Path -  — Stats —
### HW Path                 I/O Paths    Interf.   Mode    State  Q-IOs Errors
==============================================================================
3 port3\path0\tgt0\lun1     c3t0d1    SP A5     active  alive      1      7
3 port3\path0\tgt1\lun1     c3t1d1    SP B4     active  alive      0      1

Pseudo name=harddisk4
CLARiiON ID=FCN00120800055 [SG_NOZOMI-SUP]
Logical device ID=6006016010A030009C49FE259E94E111 [LUN 300]
state=alive; policy=CLAROpt; priority=0; queued-IOs=0
Owner: default=SP B, current=SP B       Array failover mode: 4
==============================================================================
—————- Host —————   – Stor -   — I/O Path -  — Stats —
### HW Path                 I/O Paths    Interf.   Mode    State  Q-IOs Errors
==============================================================================
3 port3\path0\tgt2\lun0     c3t2d0    SP B1     active  alive      0      1

Pseudo name=harddisk5
CLARiiON ID=CK200064900482 [NOZOMI_SUP_SG]
Logical device ID=60060160416121000560A5593994E111 [LUN 301]
state=alive; policy=CLAROpt; priority=0; queued-IOs=0
Owner: default=SP B, current=SP B       Array failover mode: 1
==============================================================================
—————- Host —————   – Stor -   — I/O Path -  — Stats —
### HW Path                 I/O Paths    Interf.   Mode    State  Q-IOs Errors
==============================================================================
3 port3\path0\tgt0\lun2     c3t0d2    SP A5     active  alive      0      1
3 port3\path0\tgt1\lun2     c3t1d2    SP B4     active  alive      0      1

C:\Documents and Settings\Administrator>powermig query -handle 1

Handle: 1
Source: harddisk4
Target: harddisk5
Technology: HostCopy
Migration state: committed

C:\Documents and Settings\Administrator>powermig cleanup -handle 1

Cleanup migration? [yes]/no: y

C:\Documents and Settings\Administrator>powermig query -handle 1

PPME error(6): Handle not found

C:\Documents and Settings\Administrator>

 

The detailed process to complete a migration with PPME is this:

  1. Install PowerPath and/or PPME
    • Be sure to use a custom install and choose Migration Enabler as an option.  This is a default installation I use because it doesn’t cost anything to install and does not interfere with any other functionality.
    • Supposedly you can install PPME after PowerPath without a reboot, but the few times I did that, I had to reboot. This would be the ONLY reboot during the entire process.
  2. Prepare/present the target LUN.
    • Once the LUN is accessible to the host, this is all that is necessary. There is no need to prepare the filesystem or alignment offset.  In fact, whatever is done to the destination LUN will be overwritten by the storage migration.
  3. License PPME using the PowerPath Licensing Tool.
  4. Setup the migration session using the command:
    powermig setup -src <source_pseduoname> -tgt <target_pseudoname> -techtype hostcopy
    Where source_pseudoname is whatever PowerPath lists as the hosts LUN name.  For instance, harddisk1.  The same goes for target_pseudoname. This creates the relationship of the migration, using a session ID for all future tasks. Keep note of the session ID that is provided by PPME.
  5. Next is to start the synchronization.  If there is going to be a negative performance impact for the migration, it will be during the synchronization.
    powermig sync -handle <x>
    Where <x> is the session ID. This starts the synchronization of the migration at a throttle level of 2 on a scale of 0-9.  0 is the fastest and 9 is the slowest.  I found that using 2 was acceptable for most of the migrations I completed. If I thought that was going to be be too aggressive, I set the throttle to a value of 5.  The migration takes longer to complete, but the IO contention was far less.
    At this point, data is copied from source to target while the read requests are serviced and the writes are mirrored to source and target.
  6. Since the synchronization starts at a throttle of 2, there may be times when you need to slow it down or speed it up for whatever reason. This is NOT required, but if you need to the command is:
    powermig throttle -handle <x> -throttlevalue <y>
    Where <y> is a value from 0-9. Again, 0 is the fastest and 9 is the slowest.
  7. To check the status of the migration, enter the command:
    powermig query -handle <x>
    The output will give you the percentage complete and give you an idea as to when the synchronization will be complete.
  8. Once the status of the synchronization is listed as “sourceselected”, it is time to finish the migration.  One thing to note, is that it is still possible to backout of this migration. Enter the following command to select the target LUN:
    powermig selecttarget -handle <x>
    At this point, the read requests are serviced by the target and the writes continue to be mirrored.
  9. Now is the time to have the owner validate that the migration is acceptable.  If performance is not as expected, you can still backout of the migration by selecting the source (selectsource) and cleanup the migration as specified below, however that is not what we are after, is it?! If validation is successful, enter the following command to commit the change:
    powermig commit -handle <x>
    The reads and writes are solely serviced by the target LUN and the source LUN is no longer being used.
  10. At this point, you can no longer backout the change.  The source LUN, however, is still presented to the host and the underlying filesystem is still valid. You have two choices on how to proceed:
    • Cleaning up the migration as documented by the PowerPath guide
      • This is destructive to the source LUN, as the guide says that it removes some data.  What that data contains is beyond me, but the end result is that the data on the LUN is not longer accessible by any host.
        powermig cleanup -handle <x>
    • My preferred option is to remove the LUN from host access and then forcing the session cleanup. That provides the ability to mount that LUN on a different host, or back to the original host if there was a need.  I would rename the LUN with the date of the migration and the name of the host. I would then leave that LUN bound for a week before destroying it, call me paranoid or over cautious.
      powermig cleanup -handle <x> -force
  11. This completes the migration.
Posted in SAN | Leave a comment