Mar 16, 2018

How To Resize a Storage Repository (SR) in XenServer

The other weekend I got a disk space alert from my backup server in my Arizona data center. This happens occasionally. Since this is a VM, I usually just increase the virtual disk, then extend the drive in Windows. No big deal. Well this time, I couldn't extend the virtual drive without first increasing the size of my storage repository (SR).

Well, increasing the size of a storage repository in XenServer isn't as easy as in VMWare, but it's still not that difficult. You just have to SSH into your XenServers to do it, and it only takes 11 steps really:

  • On your SAN, extend the volume/LUN
  • SSH into your master node
  • Run xe sr-list name-label=<your SR name you want to resize>. Note the uuid of the SR.
  • Run pvscan | grep <the uuid you noted in the previous step>. Note the device name (eg: PV /dev/sdj )
  • Run echo 1 > /sys/block/device/device/rescan (e.g. echo 1 > /sys/block/sdj/device/rescan)
  • Run pvresize <device name> (eg: pvresize /dev/sdj )
  • Run xe sr-scan <the uuid you noted in step 3>
  • Verify that the XE host sees the larger physical disk by running: pvscan | grep <the uuid you noted in step 3>
  • SSH into each slave nodes
  • Run pvresize <device name> (eg: pvresize /dev/sdj )
  • Run xe sr-scan <the uuid you noted in step3>
That's it, now when you look in XenCenter, you should see that your SR has been resized accordingly.

[H/T cdillard]



Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | stopping spam