Add Active external storage to xen server

When you try to add external storage disk to  any virtual machine on the xen server.

It will not show you ‘No’ under the active option in storage option of xen server.

You can see  the disk path is ‘unknown’ instead of /dev/xvd.

Note:-disk is active only if path of the disk is /dev/svd.

You need to click on ‘Activate’ option .

But problem you will may face is ,the ‘Activate’ button is disable(you can not click on it).

blog_image_xen_servewr

 

 

solution:-

Install xen server tools to your OS.

check you Linux version:

 

64 bit or 32 bit…and according to that …download a package – ‘xe-guest-utillities_6.2.0-1120_amd64.deb/rpm’

 

And install this package.

After successful installation ,you will able to click on ‘Aticvate’ option.

After making it active,disk’s path will be shown, /dev/xvd.

you can check it by firing following command-

‘fdisk -l’

you can see 2 disks…one at /dev/xvda

and newly created at  /dev/xvdb or xvdc and so on.

After all above procedure, you will add external storage(active) to xen server.

 

iSCSI – how coomunicate using commands

iSCSI commands:-

In SCISI computer storage , computers and storage devices use a client-server model of communication. The computer is a client which requests the storage device to perform a service, e.g., to read or write data. The SCSI command architecture was originally defined for parallel buses but has been carried forward with minimal change for use with Fiber Channel, iSCSI, Serial Attached iSCSI, and other transport layers.

In the SCSI protocol, the initiator  sends a SCSI command information unit to the target device. Data information units may then be transferred between the computer and device. Finally, the device sends a response information unit to the computer.

SCSI commands are sent in a Command Descriptor Block (CDB), which consists of a one byte operation code (opcode) followed by five or more bytes containing command-specific parameters. Upon receiving and processing the CDB the device will return a status code byte and other information.

iscsi

 

By carrying SCSIcommands over IP networks, iSCSI is used to facilitate data transfers over intranets and to manage storage over long distances. iSCSI can be used to transmit data over Local Area Networks(LANs), Wide Area Networks (WANs), or the Internet and can enable location-independent data storage and retrieval.

iSCSI works by transporting block-level data between an iSCSI initiator on a server and an iSCSI target on a storage device. The iSCSI protocol encapsulated SCSI commands and assembles the data in packets for the TCP/IP layer. Packets are sent over the network using a point-to-point connection. Upon arrival, the iSCSI protocol disassembles the packets, separating the SCSI commands so the operating system (OS) will see the storage as a local SCSI device that can be formatted as usual. Today, some of iSCSI’s popularity in small to midsize businesses (SMBs) has to do with the way server vitulization makes use of storage pools. In a vitalized environment, the storage pool is accessible to all the hosts within the cluster and the cluster nodes nodes communicate with the storage pool over the network through the use of the iSCSI protocol.

iSCSI (SCSI over the internet)

iSCSI:- SCSI over the internet.

SCSI (Small computer system interface) – It is the set of standards (protocol) to connecting and transferring data between volumes(machines/peripheral devices ).

The SCSI standards define commands, protocols, electrical and optical interfaces.

SCSI is most commonly used for hard disk drive and tape drives, but it can connect a wide range of other devices, including scanners and CD drives, although not all controllers can handle all devices.

By carrying SCSI commands over IP networks, iSCSI is used to facilitate data transfers over intranets and to manage storage over long distances.

iSCSI can be used to transmit data over local area networks (LANs), wide area networks (WANs), or the Internet and can enable location-independent data storage and retrieval.

Typically, a computer is an initiator and a data storage device is a target. As in a client-server architecture, an initiator is analogous to the client, and a target is analogous to the server.

SCSI initiator:-

In computer data storage, a SCSI initiator is the endpoint that initiates a SCSI session, that is, sends a SCSI command. The initiator usually does not provide any Logical Unit Number (LUNs).

SCSI target:-

On the other hand, a SCSI target is the endpoint that does not initiate sessions, but instead waits for initiators’ commands and provides required input/output data transfers. The target usually provides to the initiators one or more LUNs because otherwise no read or write command would be possible.

sshpass is not working

When you are tying to sshpass from another machine. You may suffer from Following problem:-

When you enter a command for sshpass , you will not get prompt of new machine you wanted to login.You will get a prompt of your current machine.

example:

root@local$  sshpass -p ‘password’ ssh usenarme@172.22.25.25

after fired this command  get a prompt of your current machine.

like

root@local$

Solution:-

In that case.Login to your machine you want to sshpass.

install sshpass (sudo apt-get install sshpass)

After installation , please reboot your machine.(that is the most important thing )

and try the sshpass command again.

You will be able to login your desired machine.

example:

root@local$  sshpass -p ‘password’ ssh usenarme@172.22.25.25

you will get a prompt .

root@remote$

The above prompt is the prompt of a machine.You wanted to  login using sshpass.

 

 

Install and setup DevStack on Linux

Step 1:

Take a fresh/new Linux machine/virtual machine.

Step 2:

Install  ‘git’ on that machine.  (sudo apt-get install git)

Step 3:

Download/clone DevStack using git.

(git clone https://git.openstack.org/openstack-dev/devstack)

Step 4:

You will found a ‘devstack’ directory.

Go to that directory.(cd devstack)

You will find a file ‘stackrc’.

Do following changes in that file.

you will find  a line -GIT_BASE=${GIT_BASE:-git://git.openstack.org}’

line number may 169(may variable).

Remove/comment out this line.

Insert the line – ‘GIT_BASE=${GIT_BASE:-https://www.github.com}’

 

Step 5:

Copy the file local.conf from ‘devstack/samples’ directory to ‘devstack’ directory and remove the rest contents and put only the following lines in it :

[[local|localrc]]

 

ENABLED_SERVICES+=,q-svc,q-agt,q-dhcp,q-l3,q-meta,neutron

ENABLED_SERVICES+=,heat,h-api,h-api-cfn,h-api-cw,h-eng

LOGFILE=/opt/stack/logs/stack.sh.log

VERBOSE=True

LOG_COLOR=True

SCREEN_LOGDIR=/opt/stack/logs

 

Step 6:

Run stack.sh(cd devstack and ./stack.sh with non sudo user (strictly))

./stack.sh will ask you for password 5-6 times.

Provide the same password all the time.

It will take around 30-45 mins to run the script.

Step 7:

After successful installation at the end, it will show you following

4 important things.

host ip, Horizon’s (devstack’s dashboard) ip address ,default users,password.

Save those things , those will be require in future to run any devstack commands.