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










List of Fibre Channel 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

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


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
# /etc/init.d/iscsi restart

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


# tail -f /var/log/messages

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


# 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

#sudo apt-get install open-iscsi

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

-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:,1

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

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

Other readings

What is the differences between DAS,NAS and SAN

Network File systems

How to set up cheap NAS storage using OpenNAS

How to boot windows from a SAN storage

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”

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


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
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 MASK IF 1
The route addition failed: The specified mask parameter is invalid.
(Destination & Mask) != Destination.


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

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


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

> route DELETE
> 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”

route add -p mask metric 2

In simple route add -p mask

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 with the subnet mask of, type:

route delete mask

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 and the subnet mask of from to, type:

route change mask

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

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

Adding a Default Gateway
$ route add default gw

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

Reject Routing to a Particular Host or Network
$ route add -host reject
$ route add -net netmask 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.

—- 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



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]

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”


C:\>typeperf /?

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

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

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

-?                            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
-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.

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

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: