Monthly Archives: July 2014

Why SAN is Expensive

Storage area network, an architecture to remotely attach computer storage. SAN devices connect to a number of servers using fibre channel. Most SAN systems use the small computer system interface protocol. An add-on card must be installed in each computer that will be connected to
a SAN device. A SAN is seen by a connected server as a local drive. Since the SAN serves data only as raw disk blocks, the server itself must provide file management.

SAN protocols include Fibre Channel, iSCSI, ATA over Ethernet (AoE) and HyperSCSI.

A NAS is a single storage device that operate on data files.Typically makes Ethernet and TCP/IP connections.

Both NAS and SAN over come the limitations of the traditionally used Direct Attached Storage (DAS).NAS appears to the client OS (operating system) as a file server (the client can map network drives to shares on that server) whereas a disk available through a SAN still appears to the client OS as a disk, visible in disk and volume management utilities (along with
client’s local disks), and available to be formatted with a file system and mounted.
SAN
SAN Fabric
The hardware that connects workstations and servers to storage devices in a SAN is referred to as a “fabric.” The SAN fabric enables any-server-to-any-storage device connectivity through the use of Fibre Channel switching technology.

SAN-SWITCH  SAN-Fibercable

Manufactors

brocade
http://www.brocade.com/products/all/switches/index.page
http://www.brocade.com/solutions-technology/technology/san-fabric-technology/index.page

ibm
http://www-03.ibm.com/systems/in/networking/switches/san/entry/
http://pic.dhe.ibm.com/infocenter/svc/ic/index.jsp?topic=%2Fcom.ibm.storage.svc.console.doc%2Fs

vc_sanfabricoverview_27wwma.html
http://www.redbooks.ibm.com/abstracts/sg246384.html?Open

hp
http://www8.hp.com/us/en/products/data-storage/data-storage-products.html?compURI=1410821#.Ut6y

X_u6at8
http://www8.hp.com/us/en/products/switches/#!view=column&page=1

cisco
http://www.cisco.com/en/US/products/hw/ps4159/
http://www.cisco.com/en/US/products/ps7079/

sgi
http://www.sgi.com/products/storage/infrastructure/

dell
http://www.dell.com/in/business/p/fibrechannel-switches

List of Fibre Channel switches
http://en.wikipedia.org/wiki/List_of_Fibre_Channel_switches
http://en.wikipedia.org/wiki/Fibre_Channel
http://en.wikipedia.org/wiki/Fibre_Channel_switch

emc
http://india.emc.com/storage/connectrix/connectrix.htm#!switches

 

What is Windows Management Instrumentation

WMI is Microsoft’s implementation of the Web-Based Enterprise Management (WBEM) and Common Information Model (CIM) standards from the Distributed Management Task Force (DMTF).

Windows Management Instrumentation (WMI) is the infrastructure for management data and operations on Windows-based operating systems. You can write WMI scripts or applications to automate administrative tasks on remote computers but WMI also supplies management data to other parts of the operating system and products.Also can be used in all Windows-based applications, and is most useful in enterprise applications and administrative scripts.

Click Start, click Run, type wmimgmt.msc, and then click OK.

Below a document

iSCSI initiator installations in CENTOS

# yum install iscsi-initiator-utils

configuration
Open /etc/iscsi/iscsid.conf with vi text editor:
# vi /etc/iscsi/iscsid.conf

Setup username and password:
node.session.auth.username = My_ISCSI_USR_NAME
node.session.auth.password = MyPassword
discovery.sendtargets.auth.username = My_ISCSI_USR_NAME
discovery.sendtargets.auth.password = MyPassword

Where,

node.session.* is used to set a CHAP username and password for initiator authentication by the target(s).
discovery.sendtargets.* is used to set a discovery session CHAP username and password for the initiator authentication by the target(s)

Now start the iscsi service:
# /etc/init.d/iscsi start

Discover targets
# iscsiadm -m discovery -t sendtargets -p 192.168.1.5
# /etc/init.d/iscsi restart

Now there should be a block device under /dev directory.
# fdisk -l

or

# tail -f /var/log/messages
Output:

Oct 10 12:42:20 ora9is2 kernel:   Vendor: EQLOGIC   Model: 100E-00           Rev: 3.2
Oct 10 12:42:20 ora9is2 kernel:   Type:   Direct-Access                      ANSI SCSI revision: 05
Oct 10 12:42:20 ora9is2 kernel: SCSI device sdd: 41963520 512-byte hdwr sectors (21485 MB)
Oct 10 12:42:20 ora9is2 kernel: sdd: Write Protect is off
Oct 10 12:42:20 ora9is2 kernel: SCSI device sdd: drive cache: write through
Oct 10 12:42:20 ora9is2 kernel: SCSI device sdd: 41963520 512-byte hdwr sectors (21485 MB)
Oct 10 12:42:20 ora9is2 kernel: sdd: Write Protect is off
Oct 10 12:42:20 ora9is2 kernel: SCSI device sdd: drive cache: write through
Oct 10 12:42:20 ora9is2 kernel:  sdd: unknown partition table
Oct 10 12:42:20 ora9is2 kernel: sd 3:0:0:0: Attached scsi disk sdd
Oct 10 12:42:20 ora9is2 kernel: sd 3:0:0:0: Attached scsi generic sg3 type 0
Oct 10 12:42:20 ora9is2 kernel: rtc: lost some interrupts at 2048Hz.
Oct 10 12:42:20 ora9is2 iscsid: connection0:0 is operational now

Format and Mount iSCSI Volume
# fdisk /dev/sdd
# mke2fs -j -m 0 -O dir_index /dev/sdd1

or

# mkfs.ext3 /dev/sdd1
If your volume is large size like 1TB, run mkfs.ext3 in background using nohup:
# nohup mkfs.ext3 /dev/sdd1 &

Mount new partition:
# mkdir /mnt/iscsi
# mount /dev/sdd1 /mnt/iscsi

Mount iSCSI drive automatically at boot time
# chkconfig iscsi on

Open /etc/fstab file and append config directive:
/dev/sdd1 /mnt/iscsi ext3 _netdev 0 0

iSCSI initiator installations in Ubutu

Install
#sudo apt-get install open-iscsi

configurations
Once the open-iscsi package is installed, edit /etc/iscsi/iscsid.conf changing the following:
node.startup = automatic
You can check which targets are available by using the iscsiadm utility. Enter the following in a terminal:
sudo iscsiadm -m discovery -t st -p 192.168.0.10

-m: determines the mode that iscsiadm executes in.

-t: specifies the type of discovery.

-p: option indicates the target IP address.
If the target is available you should see output similar to the following:
192.168.0.10:3260,1 iqn.1992-05.com.emc:sl7b92030000520000-2

The iqn number and IP address above will vary depending on your hardware.

You should now be able to connect to the iSCSI target, and depending on your target setup you may have to enter user credentials. Login to the iSCSI node:

sudo iscsiadm -m node –login

Check to make sure that the new disk has been detected using dmesg:

dmesg | grep sd

[    4.322384] sd 2:0:0:0: Attached scsi generic sg1 type 0
[    4.322797] sd 2:0:0:0: [sda] 41943040 512-byte logical blocks: (21.4 GB/20.0 GiB)
[    4.322843] sd 2:0:0:0: [sda] Write Protect is off
[    4.322846] sd 2:0:0:0: [sda] Mode Sense: 03 00 00 00
[    4.322896] sd 2:0:0:0: [sda] Cache data unavailable
[    4.322899] sd 2:0:0:0: [sda] Assuming drive cache: write through
[    4.323230] sd 2:0:0:0: [sda] Cache data unavailable
[    4.323233] sd 2:0:0:0: [sda] Assuming drive cache: write through
[    4.325312]  sda: sda1 sda2 < sda5 >
[    4.325729] sd 2:0:0:0: [sda] Cache data unavailable
[    4.325732] sd 2:0:0:0: [sda] Assuming drive cache: write through
[    4.325735] sd 2:0:0:0: [sda] Attached SCSI disk
[ 2486.941805] sd 4:0:0:3: Attached scsi generic sg3 type 0
[ 2486.952093] sd 4:0:0:3: [sdb] 1126400000 512-byte logical blocks: (576 GB/537 GiB)
[ 2486.954195] sd 4:0:0:3: [sdb] Write Protect is off
[ 2486.954200] sd 4:0:0:3: [sdb] Mode Sense: 8f 00 00 08
[ 2486.954692] sd 4:0:0:3: [sdb] Write cache: disabled, read cache: enabled, doesn’t
support DPO or FUA
[ 2486.960577]  sdb: sdb1
[ 2486.964862] sd 4:0:0:3: [sdb] Attached SCSI disk

In the output above sdb is the new iSCSI disk. Remember this is just an example; the output you see on your screen will vary.

Next, create a partition, format the file system, and mount the new iSCSI disk. In a terminal enter:

sudo fdisk /dev/sdb
n
p
enter
w

Now format the file system and mount it to /srv as an example:

sudo mkfs.ext4 /dev/sdb1
sudo mount /dev/sdb1 /srv

Finally, add an entry to /etc/fstab to mount the iSCSI drive during boot:

/dev/sdb1       /srv        ext4    defaults,auto,_netdev 0 0

Microsoft iSCSI

Microsoft iSCSI is a cost saving product for Small Business Infrastructures.

Microsoft iSCSI

SCSI and ISCSI Technologies

SCSI and ISCSI Technologies used in computer systems to connect your computer to another peripherals.

SCSI is an intelligent, peripheral, buffered, peer to peer interface developed by Shugart Associates in 1981.Up to 8 or 16 devices can be attached to a single bus. There can be any number of hosts and peripheral devices but there should be at least one host.

iSCSI an Internet Protocol (IP)-based storage networking standard for linking data storage facilities.

SCSI and ISCSI Technologies

 

More you read from
http://en.wikipedia.org/wiki/SCSI
http://en.wikipedia.org/wiki/Iscsi

Other readings

What is the differences between DAS,NAS and SAN
https://teckadmin.wordpress.com/2014/01/21/das-nas-san/

Network File systems
https://teckadmin.wordpress.com/2014/01/19/nfs-cifs-iscsi-file-systems/

How to set up cheap NAS storage using OpenNAS
https://teckadmin.wordpress.com/category/storage-technologies/page/2/

How to boot windows from a SAN storage
https://teckadmin.wordpress.com/2014/01/21/microsoft-windows-boot-from-san/

Using command to get memory informations in windows

Findout Available Local Memory
——————————-
systeminfo |find “Available Physical Memory”

systeminfo | findstr /C:”Total Physical Memory”

Remote system
—————
systeminfo /s:hostname | findstr “Physical”
systeminfo /s <system> /u <username> /p <password>
wmic /node:”IP” /user:IP\username “MEMPHYSICAL”

Total Memory in system
———————-
wmic memorychip get capacity
wmic OS get TotalVisibleMemorySize /Value
wmic computersystem get TotalPhysicalMemory
wmic memphysical list full
wmic memorychip list full

Free memory
———–
wmic OS get FreePhysicalMemory /Value

Note:in xp can use ‘mem’ command

Powershell command
——————-
(Get-WMIObject Win32_PhysicalMemory |  Measure-Object Capacity -Sum).sum/1GB

Information about your memory
——————————
wmic MemoryChip get BankLabel, Capacity, MemoryType, TypeDetail, Speed

Memorychip information
———————-
wmic memorychip list full
wmic memorychip get capacity

TASKLIST displays the process ID number for each running task
————————————————————-
Tasklist /M

Find more memory using application
tasklist /fi “memusage gt 1000000”

Remotely
——–
tasklist /s:IP /fi “memusage gt 1000000”

Powershell command
——————-
get-process | where-object {$_.WorkingSet -gt 100000000}

memory healths checks and report
——————————-
perfmon /report

Route commands in Dos and Linux

Dos command route
——————-
Command to manually configure the routes in the routing table

Syntax

ROUTE [-f] [-p] [-4|-6] command [destination]
[MASK netmask]  [gateway] [METRIC metric]  [IF interface]

-f           Clears the routing tables of all gateway entries.  If this is
used in conjunction with one of the commands, the tables are
cleared prior to running the command.

-p           When used with the ADD command, makes a route persistent across
boots of the system. By default, routes are not preserved
when the system is restarted. Ignored for all other commands,
which always affect the appropriate persistent routes.This
option is not supported in Windows 95.

-4           Force using IPv4.

-6           Force using IPv6.

command      One of these:
PRINT     Prints  a route
ADD       Adds    a route
DELETE    Deletes a route
CHANGE    Modifies an existing route
destination  Specifies the host.
MASK         Specifies that the next parameter is the ‘netmask’ value.
netmask      Specifies a subnet mask value for this route entry.
If not specified, it defaults to 255.255.255.255.
gateway      Specifies gateway.
interface    the interface number for the specified route.
METRIC       specifies the metric, ie. cost for the destination.

All symbolic names used for destination are looked up in the network database
file NETWORKS. The symbolic names for gateway are looked up in the host name
database file HOSTS.

If the command is PRINT or DELETE. Destination or gateway can be a wildcard,
(wildcard is specified as a star ‘*’), or the gateway argument may be omitted.

If Dest contains a * or ?, it is treated as a shell pattern, and only
matching destination routes are printed. The ‘*’ matches any string,
and ‘?’ matches any one char. Examples: 157.*.1, 157.*, 127.*, *224*.

Pattern match is only allowed in PRINT command.
Diagnostic Notes:
Invalid MASK generates an error, that is when (DEST & MASK) != DEST.
Example> route ADD 157.0.0.0 MASK 155.0.0.0 157.55.80.1 IF 1
The route addition failed: The specified mask parameter is invalid.
(Destination & Mask) != Destination.

Examples:

> route PRINT
> route PRINT -4
> route PRINT -6
> route PRINT 157*          …. Only prints those matching 157*

> route ADD 157.0.0.0 MASK 255.0.0.0  157.55.80.1 METRIC 3 IF 2
destination^      ^mask      ^gateway     metric^    ^
Interface^
If IF is not given, it tries to find the best interface for a given
gateway.
> route ADD 3ffe::/32 3ffe::1

> route CHANGE 157.0.0.0 MASK 255.0.0.0 157.55.80.5 METRIC 2 IF 2

CHANGE is used to modify gateway and/or metric only.

> route DELETE 157.0.0.0
> route DELETE 3ffe::/32

Command         Purpose
add             Adds a route.
change             Modifies an existing route.
delete             Deletes a route or routes.
print             Prints a route or routes.

Route add

route add “destination” mask “subnetmask” “gateway” metric “costmetric” if “interface”

Eg.
route add -p 10.0.0.0 mask 255.0.0.0 192.168.0.1 metric 2

In simple route add -p 10.0.0.0 mask 255.0.0.0 192.168.0.1

Routes added by using the -p option are stored in the Windows registry under the following key:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip \Parameters\PersistentRoutes

To delete the route to the destination 10.41.0.0 with the subnet mask of 255.255.0.0, type:

route delete 10.41.0.0 mask 255.255.0.0

To delete all routes in the IP routing table that begin with 10., type:

route delete 10.*

To change the next hop address of the route with the destination of 10.41.0.0 and the subnet mask of 255.255.0.0 from 10.27.0.1 to 10.27.0.25, type:

route change 10.41.0.0 mask 255.255.0.0 10.27.0.25

Linux route command
——————–
Display Existing Routes
$ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     *               255.255.255.0   U     0      0        0 eth0

$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
0.0.0.0         192.168.1.10    0.0.0.0         UG    0      0        0 eth0

Adding a Default Gateway
$ route add default gw 192.168.1.10

List Kernel’s Routing Cache Information
$ route -Cn
Kernel IP routing cache
Source          Destination     Gateway         Flags Metric Ref    Use Iface
192.168.1.157   192.168.1.51    192.168.1.51          0      0        1 eth0
192.168.1.157   74.125.236.69   192.168.1.10          0      0        0 eth0

Reject Routing to a Particular Host or Network
$ route add -host 192.168.1.51 reject
$ route add -net 192.168.1.0 netmask 255.255.255.0 reject

Windows command Fsutil

Fsutil is a command-line utility that you can use to perform many FAT and NTFS file system related tasks, such as managing reparse points, managing sparse files, dismounting a volume, or extending a volume.

C:\windows\system32>fsutil
—- Commands Supported —-

8dot3name       8dot3name managment
behavior        Control file system behavior
dirty           Manage volume dirty bit
file            File specific commands
fsinfo          File system information
hardlink        Hardlink management
objectid        Object ID management
quota           Quota management
repair          Self healing management
reparsepoint    Reparse point management
resource        Transactional Resource Manager management
sparse          Sparse file control
transaction     Transaction management
usn             USN management
volume          Volume management

C:\windows\system32>fsutil fsinfo
—- FSINFO Commands Supported —-

drives          List all drives
drivetype       Query drive type for a drive
volumeinfo      Query volume information
ntfsinfo        Query NTFS specific volume information
statistics      Query file system statistics

Some examples
————-
Create a new file of a specific size(Arbitrary Size)

FSUTIL file createnew filename

C:\>fsutil file createnew test.txt 100
File C:\test.txt is created

possibly very large, with this utility is very easy to create a 10GB file, use the following:

fsutil file createnew bigfile.out 10737418240

Create a hardlink

FSUTIL hardlink create new_filename existing_filename

fsutil hardlink create c:\foo.txt c:\bar.txt

Set the zero data for a file

FSUTIL file setzerodata offset=val length=val filename

fsutil file setzerodata offset=100 length=150 C:\Temp\sample.txt

C:\windows\system32>fsutil fsinfo drives

Drives: C:\

C:\windows\system32>fsutil fsinfo drivetype c:
c: – Fixed Drive

C:\windows\system32>fsutil fsinfo statistics c:
File System Type :     NTFS

UserFileReads :        322574
UserFileReadBytes :    5475978240
UserDiskReads :        316161
UserFileWrites :       87461
UserFileWriteBytes :   4716495608
UserDiskWrites :       92814
MetaDataReads :        37771
MetaDataReadBytes :    411365376
MetaDataDiskReads :    54770
MetaDataWrites :       37664
MetaDataWriteBytes :   190550016
MetaDataDiskWrites :   48367

MftReads :             34323
MftReadBytes :         374571008
MftWrites :            24323
MftWriteBytes :        106967040
Mft2Writes :           0
Mft2WriteBytes :       0
RootIndexReads :       0
RootIndexReadBytes :   0
RootIndexWrites :      0
RootIndexWriteBytes :  0
BitmapReads :          23
BitmapReadBytes :      5316608
BitmapWrites :         10492
BitmapWriteBytes :     60985344
MftBitmapReads :       6
MftBitmapReadBytes :   24576
MftBitmapWrites :      1492
MftBitmapWriteBytes :  6963200
UserIndexReads :       19868
UserIndexReadBytes :   101777408
UserIndexWrites :      10613
UserIndexWriteBytes :  49397760
LogFileReads :         7
LogFileReadBytes :     28672
LogFileWrites :        46987
LogFileWriteBytes :    395644928
LogFileFull :          0

C:\windows\system32>

Reffer
https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/fsutil.mspx?mfr=true
http://technet.microsoft.com/en-us/library/cc753059.aspx

Windows command Typeperf

The typeperf command writes performance data to the command window or to a log file.

typeperf <counter [counter …]> [options]
typeperf -cf <filename> [options]
typeperf -q [object] [options]
typeperf -qx [object] [options]

Eg.
typeperf “\Processor)_Total)\% Processor Time”
typeperf -cf counters.txt -si 5 -sc 50 -f TSV -o domain2.tsv
typeperf -qx PhysicalDisk -o counters.txt
typeperf “\memory\available bytes”

usages
—–

C:\>typeperf /?

Typeperf writes performance data to the command window or to a log file. To
stop Typeperf, press CTRL+C.

Usage:
typeperf { <counter [counter …]> | -cf <filename> | -q [object]
| -qx [object] } [options]

Parameters:
<counter [counter …]>       Performance counters to monitor.

Options:
-?                            Displays context sensitive help.
-f <CSV|TSV|BIN|SQL>          Output file format. Default is CSV.
-cf <filename>                File containing performance counters to
monitor, one per line.
-si <[[hh:]mm:]ss>            Time between samples. Default is 1 second.
-o <filename>                 Path of output file or SQL database. Default
is STDOUT.
-q [object]                   List installed counters (no instances). To
list counters for one object, include the
object name, such as Processor.
-qx [object]                  List installed counters with instances. To
list counters for one object, include the
object name, such as Processor.
-sc <samples>                 Number of samples to collect. Default is to
sample until CTRL+C.
-config <filename>            Settings file containing command options.
-s <computer_name>            Server to monitor if no server is specified
in the counter path.
-y                            Answer yes to all questions without prompting.

Note:
Counter is the full name of a performance counter in
“\\<Computer>\<Object>(<Instance>)\<Counter>” format,
such as “\\Server1\Processor(0)\% User Time”.

Examples:
typeperf “\Processor(_Total)\% Processor Time”
typeperf -cf counters.txt -si 5 -sc 50 -f TSV -o domain2.tsv
typeperf -qx PhysicalDisk -o counters.txt

%d bloggers like this: