Category Archives: Storage Technologies

Mount and Unmount a SAN drive from within Windows 2003

As LUN is to be treated as a single disk in Disk manager on windows Serve 2003, to unmount a drive (LUN from SAN) on Windows Server 2003

you can use mountvol.exe commands in the cmd window or script (.cmd / batch files)

Mountvol (without parameters) will list all Volume GUIDs, example:


in this case the volume with GUID 6e900029-ebef-11dd-8b53-806d6172696f

is mounted under D:\

to unmount, type

mountvol D:\ /D

to mount, type
mountvol D:\ \\?\Volume{6e900029-ebef-11dd-8b53-806d6172696f}\

for help, type

mountvol /?

Creates, deletes, or lists a volume mount point.

MOUNTVOL [drive:]path VolumeName
MOUNTVOL [drive:]path /D
MOUNTVOL [drive:]path /L

path        Specifies the existing NTFS directory where the mount
point will reside.
VolumeName  Specifies the volume name that is the target of the mount
/D          Removes the volume mount point from the specified directory.
/L          Lists the mounted volume name for the specified directory.

Possible values for VolumeName along with current mount points are:






Logical Unit Number masking

Logical Unit Number Masking or LUN masking is an authorization process that makes a Logical Unit Number available to some hosts and unavailable to other hosts.

LUN masking is mainly implemented at HBA level. The security benefits of LUN masking implemented at HBAs are limited, since with many HBAs it is possible to forge source addresses (WWNs/MACs/IPs) and compromise the access. Many storage controllers also support LUN masking. When LUN masking is implemented at the storage controller level, the controller itself enforces the access policies to the device and as a result it is more secure. However, it is mainly implemented not as a security measure per se, but rather as a protection against misbehaving servers which may corrupt disks belonging to other servers. For example, Windows servers attached to a SAN will, under some conditions, corrupt non-Windows (Unix, Linux, NetWare) volumes on the SAN by attempting to write Windows volume labels to them. By hiding the other LUNs from the Windows server, this can be prevented, since the Windows server does not even realize the other LUNs exist.

Logical unit number

In computer storage, a logical unit number, or LUN, is a number used to identify a logical unit, which is a device addressed by the SCSI protocol or protocols which encapsulate SCSI, such as Fibre Channel or iSCSI. A LUN may be used with any device which supports read/write operations, such as a tape drive, but is most often used to refer to a logical disk as created on a SAN. Though not technically correct, the term “LUN” is often also used to refer to the logical disk itself.


To provide a practical example, a typical disk array has multiple physical SCSI ports, each with one SCSI target address assigned. An administrator may format the disk array as a RAID and then partition this RAID into several separate storage-volumes. To represent each volume, a SCSI target is configured to provide a logical unit. Each SCSI target may provide multiple logical units and thus represent multiple volumes, but this does not mean that those volumes are concatenated. The computer that accesses a volume on the disk array identifies which volume to read or write with the LUN of the associated logical unit.

In another example: a single disk-drive has one physical SCSI port. It usually provides just a single target, which in turn usually provides just a single logical unit whose LUN is zero. This logical unit represents the entire storage of the disk drive.


How to select a LUN: In the early versions of SCSI, an initiator delivers a Command Descriptor Block (CDB) to a target (physical unit) and within the CDB is a 3-bit LUN field to identify the logical unit within the target. In current SCSI, the initiator delivers the CDB to a particular logical unit, so the LUN appears in the transport layer data structures and not in the CDB.

LUN vs. SCSI Device ID: The LUN is not the only way to identify a logical unit. There is also the SCSI Device ID, which identifies a logical unit uniquely in the world. Labels or serial numbers stored in a logical unit’s storage volume often serve to identify the logical unit. However, the LUN is the only way for an initiator to address a command to a particular logical unit, so initiators often create, via a discovery process, a mapping table of LUN to other identifiers.

Context sensitive: The LUN identifies a logical unit only within the context of a particular initiator. So two computers that access the same disk volume may know it by different LUNs.

LUN 0: There is one LUN which is required to exist in every target: zero. The logical unit with LUN zero is special in that it must implement a few specific commands, most notably Report LUNs, which is how an initiator can find out all the other LUNs in the target. But LUN zero need not provide any other services, such as a storage volume.

Many SCSI targets contain only one logical unit (so its LUN is necessarily zero). Others have a small number of logical units that correspond to separate physical devices and have fixed LUNs. A large storage system may have up to thousands of logical units, defined logically, by administrative command, and the administrator may choose the LUN or the system may choose it.

cXtXdXsX nomenclature in Unix

From the computer perspective, SCSI LUN is only a part of the full SCSI address. The full device’s address is made from the:

c-part: controller ID of the host bus adapter,
t-part: target ID identifying the SCSI target on that bus,
d-part: disk ID identifying a LUN on that target,
s-part: slice ID identifying a specific slice on that disk.

In the Unix family of operating systems, these IDs are often combined into a single “name”. For example, /dev/dsk/c1t2d3s4 would refer to controller 1, target 2, disk 3, slice 4. Presently Solaris, HP-UX, NCR, and others continue to use “cXtXdXsX” nomenclature, while AIX has abandoned it in favor of more familiar names.
Other uses

The term logical unit number also applies to an input/output access channel within certain programming languages.
Fortran I/O

For example, in FORTRAN, some input/output statements such as the READ or WRITE statements contain an ordered pair of numbers which identifies the LUN of the file or other data source or destination, and (usually) also, the FORMAT of the data to be read or written, as in this example:

WRITE (5,32)

where 5 is the LUN of the target file or device, and 32 is the label of the FORMAT statement for the write.

World Wide Name

A World Wide Name (WWN) or World Wide Identifier (WWID) is a unique identifier used in storage technologies including Fibre Channel, Advanced Technology Attachment (ATA) or Serial Attached SCSI (SAS).

A WWN may be employed in a variety of roles, such as a serial number or for addressability; for example, in Fibre Channel networks, a WWN may be used as a WWNN (World Wide Node Name) to identify a switch, or a WWPN (World Wide Port Name) to identify an individual port on a switch. Two WWNs which do not refer to the same thing should always be different even if the two are used in different roles, i.e. a role such as WWPN or WWNN does not define a separate WWN space. The use of burned-in addresses and specification compliance by vendors is relied upon to enforce uniqueness.


Each WWN is an 8 or 16 byte number, the length and format of which is determined by the most significant four bits, which are referred to as an NAA (Network Address Authority.) The remainder of the value is derived from an IEEE OUI (often the term “Company Identifier” is used as a synonym for OUI) and vendor-supplied information. Each format defines a different way to arrange and/or interpret these components. OUIs are used with the U/L and multicast bits zeroed, or sometimes even omitted (and assumed zero.)

The WWN formats include:[1]

“Original” IEEE formats are essentially a two-byte header followed by an embedded MAC-48/EUI-48 address (which contains the OUI.) The first 2 bytes are either hex 10:00 or 2x:xx (where the x’s are vendor-specified) followed by the 3-byte OUI and 3 bytes for a vendor-specified serial number. Thus, the difference between NAA 1 format and NAA 2 format is merely the presence of either a zero pad or an extra 3 nibbles of vendor information.
“Registered” IEEE formats dispense with padding and place the OUI immediately after the NAA. The OUI is no longer considered to be part of a MAC-48/EUI-48 address. For NAA 5 format, this leaves 9 contiguous nibbles for a vendor-defined value. This is the same format used by the companion NAA 6 format, the only difference being a 16-byte number space is assumed, rather than an 8-byte number space. This leaves a total of 25 contiguous nibbles for vendor-defined values.
“Mapped EUI-64” formats manage to fit an EUI-64 address into an 8-byte WWN. Since the NAA is mandatory, and takes up a nibble, this represents a four-bit deficit. These four bits are recouped through the following tricks: First, two bits are stolen from the NAA by allocating NAAs 12, 13, 14, and 15 to all refer to the same format. Second, the remaining two bits are recouped by omitting the U/L and multicast bits from the EUI-64’s OUI. When reconstructing the embedded EUI-64 value, the U/L and multicast bits are assumed to have carried zero values.


WWN addresses are predominantly represented as colon separated hexadecimal octets, MSB-first, with leading zeros — similar to Ethernet’s MAC address. However, there is much variance between vendors.[2]
List of OUIs commonly seen as WWN Company Identifiers

00:50:76 IBM
00:17:38 IBM, formerly XIV.
00:A0:98 NetApp
00:01:55 Promise Technology
00:60:69 Brocade Communications Systems
00:05:1E Brocade Communications Systems, acquired in purchase of Rhapsody Networks
00:60:DF Brocade Communications Systems, formerly CNT Technologies Corporation
00:05:30 Cisco
00:05:73 Cisco
00:05:9b Cisco
00:E0:8B QLogic HBAs, original identifier space
00:1B:32 QLogic HBAs. new identifier space starting to be used in 2007
00:C0:DD QLogic FC switches
00:90:66 QLogic formerly Troika Networks
00:11:75 QLogic formerly PathScale, Inc
08:00:88 Brocade Communications Systems, formerly McDATA Corporation. WWIDs begin with 1000.080
00:60:B0 Hewlett-Packard – Integrity and HP9000 servers. WWIDs begin with 5006.0b0
00:11:0A Hewlett-Packard – ProLiant servers. Formerly Compaq. WWIDs begin with 5001.10a
00:01:FE Hewlett-Packard – EVA disk arrays. Formerly Digital Equipment Corporation. WWIDs begin with 5000.1fe1 or 6000.1fe1
00:17:A4 Hewlett-Packard – MSL tape libraries. Formerly Global Data Services. WWIDs begin with 200x.0017.a4
00:60:48 EMC Corporation, for Symmetrix DMX
00:00:97 EMC Corporation, for Symmetrix VMAX
00:60:16 EMC Corporation, for CLARiiON/VNX
00:60:E8 Hitachi Data Systems
00:10:86 ATTO Technology
00:23:29 DDRdrive LLC, for DDRdrive X1
00:A0:B8 Symbios Logic Inc.
00:0C:50 Seagate Technology
00:00:C9 Emulex
00:14:EE Western Digital


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



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

Difference between a Basic Disks and Dynamic Disks

what is a basic disk?
The term basic disk refers to a disk that contains partitions, such as primary partitions and logical drives, and these in turn are usually formatted with a file system to become a volume for file storage. Basic disks provide a simple storage solution that can accommodate a useful array of changing storage requirement scenarios.
For backward compatibility, basic disks usually use the same Master Boot Record (MBR) partition style as the disks used by the Microsoft MS-DOS operating system and all versions of Windows but can also support GUID Partition Table (GPT) partitions on systems that support it.

what is a dynamic disk?
Dynamic disks have the ability to create volumes that span multiple disks (spanned and striped volumes) and the ability to create fault-tolerant volumes (mirrored and RAID-5 volumes). Like basic disks, dynamic disks can use the MBR or GPT partition styles on systems that support both. All volumes on dynamic disks are known as dynamic volumes. Dynamic disks offer greater flexibility for volume management because they use a database to track information about dynamic volumes on the disk and about other dynamic disks in the computer. Because each dynamic disk in a computer stores a replica of the dynamic disk database, for example, a corrupted dynamic disk database can repair one dynamic disk by using the database on another dynamic disk.

%d bloggers like this: