Showing posts with label iSCSI. Show all posts
Showing posts with label iSCSI. Show all posts

Tuesday, June 23, 2009

Expanding a XenServer iSCSI Storage Repository

We use XenServer with a Dell MD3000i as our iSCSI Storage Repository. In my previous post, I went over how to increase the size of a Virtual Disk on the MD3000i. Now I'll go over how to make XenServer see the larger size virtual disk.

There are two methods to go about doing this - one is command line driven, the other is done though Xen Center. I'm not much on command lines, so I'll start with the latter.

Make sure you read all instructions before starting.

Expand Using Xen Center 5.x
  1. Identify the iSCSI SR to adjust. Document all settings.
  2. Shut down all guests using this iSCSI SR.
  3. Make sure you have all iSCSI settings documented.
  4. Right click on the iSCSI SR, select Detach.
  5. Right click on the iSCSI SR, select Reattach.
  6. Depending on your configuration, you may need to reenter some settings.

Expand using the Xen console

1. Shutdown all virtual machines on the SR.

2. Note the Universally Unique Identifier (UUID) of the Storage Repository. Use the xe sr-list command on the XenServer host and identify the SR by its name label.

3. Identify the Physical Block Device (PBD) UUID corresponding to the SR. Use the following command on XenServer:

    # xe sr-param-list uuid=|grep PBD
    where is the UUID of the SR noted in step 2.

4. Unplug the Physical Block Device (PBD) corresponding to the Storage Repository.

    # xe pbd-unplug uuid=
    where is the UUID of PBD noted in step 3.

5. Plug the PBD.

    # xe pbd-plug uuid=

6. Find the physical volume device SCSI device mapping name on which the SR exists.
Identify the Volume Group (VG) corresponding to the SR.
Issue the following command on XenServer host:

    # pvs

The output of this command should be similar to one below:

PV VG
Fmt Attr PSize PFree
/dev/sdd VG_XenStorage-058e9a1d-9b7e-71bc-7a4c-5b78d6e30bcb lvm2 a- 80.00G 38.00G
/dev/sde VG_XenStorage-4684b6c6-be6d-6267-b7b5-834a1fd30f65 lvm2 a- 59.99G 45.99G

    The volume groups (VG) are named as VS_XenStorage-. Using the SR UUID noted in step 2, identify the correct volume group and the corresponding Physical Volume (PV) from the output of the above command.

7. Resize the Physical Volume:

    # pvresize /dev/sd

8. Scan the Storage Repository:

    # xe sr-scan uuid=


Dell MD 3000i - Expandng a Virtual Disk

Unlike a lot of companies, we don't purchase our iSCSI arrays full of drives. We add them as we go, increasing the size of certain virtual disks.

The instructions below will help you add a new disk to a Disk Group, then expand a virtual disk:

Step 1 - Adding a drive to a Disk Group

  1. Open the Dell Modular Disk Storage Manager
  2. Click the Modify Tab
  3. Click Add Free Capacity (Physical Disks)
  4. Follow the prompts (this is the easy part)
This step can take some time to complete. Depending on the size and type of RAID you are running, it may take over a day to complete. It will not take the disk group down, but may slow things a bit.

Step 2 - Expanding a Virtual Disk

  1. Determine the amount of space you wish to add in bytes. I recommend that you use this calculator.
  2. On the computer running Dell Modular Disk Storage Manger, open a command prompt.
  3. Navigate to Program Files\Dell\MD Storage Manager\Cli
  4. Use the smcli command to expand the disk. Examples below:
Basic Syntax
smcli ArrayName -c "set virtualDisk ["virtualdiskname"] addCapacity=virtualdiskcapacityinbytes;"

Example
Lets say I have a:
MD3000i called Array001
A Virtual Disk called VD_Test
And I wanted to add 136 GB of space.

The command would look like this:
smcli -n Array001 -c "set virtualdisk [\"VD_Test\"] addCapacity=146028888064;"


Now this expands the virtual disk on the MD3000i, but the OS will not recognize it. You will need to use Disk Manager to expand the volume in Windows. In our case, we're using the MD3000i as a XenServer storage repository. There will be a future article on expanding the XenServer SR.