Jump to content


Photo

Populating Local Storage on XenServer 6.5

Started by Stephen D. Holder , 23 February 2015 - 11:07 PM
41 replies to this topic

Best Answer Tobias Kreidl , 04 March 2015 - 02:26 AM

From your earlier list, it would appear you'd want to do the local storage creation using partition /dev/cciss/c0d0p3  -- it that the partition you ran the command against?

 

xe sr-create content-type=user type=ext device-config:device=/dev/cciss/c0d0p3 shared=false name-label="Local storage"

 

run on that specific XenServer host should be all that is necessary.

 

-=Tobias

Stephen D. Holder Members

Stephen D. Holder
  • 123 posts

Posted 23 February 2015 - 11:07 PM

Greetings,

 

I'm building a PoC, VIAB. I got XenServer 6.5 vdimanager 5.4.5 with no problems. I stood up XenServer (upgraded from 6.2) and went to implement local storage, but it's not the same process as in XenServer 6.2.

 

There are a bunch of tutorials out there for adding local storage for XenServer 6.2, but I've only found one for XenServer 6.5.  I've gone through this person's steps; but I noticed that on my # lvscan, it's showing my one drive marked as inactive.

 

I've looked at the XenServer 6.5 manual and while it does indicate local storage as possible to use, it doesn't necessarily explain how to populate it.

 

Anyone out there have a step by step process on how to do this from an upgraded install or even a fresh build? Since this is all PoC, I have no problem blowing away everything and starting over, but just wanted to see others' thoughts.

 

Any help always appreciated.

 

Thanks



Tobias Kreidl CTP Member

Tobias Kreidl
  • 18,831 posts

Posted 23 February 2015 - 11:18 PM

Stephen,

It should work exactly the same way as before with the CLI. What error do you get if you try this? Did you try both LVM and ext as options? I assume the default one built on th einitial installation, correct? How large is the new local SR you are attempting to configure?

-=Tobias



Stephen D. Holder Members

Stephen D. Holder
  • 123 posts

Posted 25 February 2015 - 03:36 AM

Tobias thanks for your response.

 

This is what I'm getting when I attempt to follow  the link I provided above:

 

[root@NO0006 ~]# fdisk -l

 

WARNING: GPT (GUID Partition Table) detected on '/dev/cciss/c0d0'! The util fdisk doesn't support GPT. Use GNU Parted.

 

Disk /dev/cciss/c0d0: 146.7 GB, 146778685440 bytes

 

256 heads, 63 sectors/track, 17775 cylinders

 

Units = cylinders of 16128 * 512 = 8257536 bytes

 

           Device Boot      Start         End      Blocks   Id  System

 

/dev/cciss/c0d0p1   *           1       17776   143338559+  ee  EFI GPT

 

[root@NO0006 ~]# pvcreate /dev/cciss/c0d0p1

 

  Can't open /dev/cciss/c0d0p1 exclusively.  Mounted filesystem?

 

[root@NO0006 ~]#

 

 

I also had this other link but I since I can't even get past the normal local storage stage, didn't know how far I could get. I also notice that in XenCenter, the default  LocalStorage isn't present (the one with the check mark), whereas it is listed on some of my other PoC boxes.

 

Thoughts, comments?

 

Thanks



Stephen D. Holder Members

Stephen D. Holder
  • 123 posts

Posted 25 February 2015 - 03:46 AM

Thinking back a little further here, I believe the second link allowed me to "partition" the dom0 system drive away from the remaining HDD space and essentially allowed me to use the untapped space as local storage. My goal is to do this again (if I can) with XenServer 6.5.

 

Also if you notice in the second links picture, the Local storage (check mark) is there. It's not there on my instance, but I did follow this exact article back in XenServer 6.2 to get my local storage, and local ISOs. Of course in XenSever6.2 the local storage check mark object was there.  Not sure what I'm missing…



Tobias Kreidl CTP Member

Tobias Kreidl
  • 18,831 posts

Posted 25 February 2015 - 04:26 AM

Stephen,

You should not have to do a pvcreate and it probably is intefering with XenServer's ability to handle its own LVM configuration management.  Take a look at this article which is closer to your specific environment as far as the storage device naming is concerned:

http://greg.porter.name/wiki/HowTo:XenServer#Add_a_new_storage_repository_on_local_disk

Regards,

-=Tobias



Stephen D. Holder Members

Stephen D. Holder
  • 123 posts

Posted 25 February 2015 - 04:11 PM

Tobias,

 

Following your link, I get the following error,

 

The SR operation cannot be performed because a device underlying the SR is in use by the host

 

I do remember before in 6.2 I was able to share  dom0 with my LVM. Is that still possible today?

I'm running a Raid1 with 2 HDDs...nothing different...



Tobias Kreidl CTP Member

Tobias Kreidl
  • 18,831 posts

Posted 25 February 2015 - 04:25 PM

You should see multiple partitions -- with general installs, you'd see something like /dev/sda1, /dev/sda2, etc. but in your case I only see a single partition, which is very strange. Did you not specify local storage when you first installed XenServer, as this is the usual procedure one follows and it asks you whether you want to configure the rest of the vailable space as such?

-=Tobias



Stephen D. Holder Members

Stephen D. Holder
  • 123 posts

Posted 25 February 2015 - 04:49 PM

No clue, I usually just do the default next, next,next, fill in network info, next next, finish.

I may just tear this down and install a fresh 6.5 instance, as this was a upgrade from 6.2, maybe it had something to do with it?

 

Will keep you posted.



Tobias Kreidl CTP Member

Tobias Kreidl
  • 18,831 posts

Posted 25 February 2015 - 05:15 PM

Stephen,

I'd try a clean install if possible. SOmething doesn't look quite right, in particular because you seem to have ended up with one partition. How big is the total drive? It's not a software RAID configuration, is it?

-=Tobias



Todd Carter Members
  • #10

Todd Carter
  • 10 posts

Posted 25 February 2015 - 05:58 PM

I have the exact same issue with a test environment.  I'm using a DL360 G5 with a P400 Array controller.  6 drives in RAID 1+0.

I see the following from an fdisk -l command:

 

[root@XenTest0 ~]# fdisk -l
 
WARNING: GPT (GUID Partition Table) detected on '/dev/cciss/c0d0'! The util fdisk doesn't support GPT. Use GNU Parted.
 
 
Disk /dev/cciss/c0d0: 220.1 GB, 220122071040 bytes
256 heads, 63 sectors/track, 26657 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes
 
           Device Boot      Start         End      Blocks   Id  System
/dev/cciss/c0d0p1   *           1       26658   214962959+  ee  EFI GPT
[root@XenTest0 ~]# pvcreate /dev/cciss/c0d0p1
  Can't open /dev/cciss/c0d0p1 exclusively.  Mounted filesystem?

 

 
This was a fresh install with the drive selected for VM use and thin provisioning.  
 
There is no local storage showing via xencenter.  
I have tried the install with selecting the drive to be VM usage and an install without it being VM usage. Either way I cannot seem 
to setup a local storage repository.  
 
Todd


Todd Carter Members
  • #11

Todd Carter
  • 10 posts

Posted 25 February 2015 - 06:01 PM

Deleted



Stephen D. Holder Members
  • #12

Stephen D. Holder
  • 123 posts

Posted 25 February 2015 - 08:46 PM

Greetings folks,

 

So I blew everything away, at the hardware level, destroyed the Raid 1+0 and recreated. Tobias, this is a hardware raid config with a total size 138 GIG. 

 

The attached file is, from what I can tell, the only selectable option in terms of where to put VM's... I left it as default (did not select the thin provisioning)

 

Fast forward to the end of the install, I applied our steps above... 

 

 

[root@NO0006 ~]# fdisk -l

 

WARNING: GPT (GUID Partition Table) detected on '/dev/cciss/c0d0'! The util fdisk doesn't support GPT. Use GNU Parted.

 

 

Disk /dev/cciss/c0d0: 146.7 GB, 146778685440 bytes

256 heads, 63 sectors/track, 17775 cylinders

Units = cylinders of 16128 * 512 = 8257536 bytes

 

           Device Boot      Start         End      Blocks   Id  System

/dev/cciss/c0d0p1   *           1       17776   143338559+  ee  EFI GPT

 

[root@NO0006 ~]#

 

 

Looks like a no go, so I still have a single drive. I am using a HP Blade460c G1....

 

Thoughts..... comments...

 



Stephen D. Holder Members
  • #13

Stephen D. Holder
  • 123 posts

Posted 25 February 2015 - 09:04 PM

Greetings again....

 

I started looking online again for XenServer and local storage, and came acorss this link, http://support.citrix.com/article/CTX121313

 

I figured, I have nothing to lose, and so I went ahead and did steps one and two....

 

root@NO0006 ~]# cat /proc/partitions

major minor  #blocks  name

 

   7        0      57216 loop0

104        0  143338560 cciss/c0d0

104        1    4193297 cciss/c0d0p1

104        2    4193297 cciss/c0d0p2

104        3  134948911 cciss/c0d0p3

 

So, I see a bunch of "drives" listed, but when I......

 

[root@NO0006 ~]# ll /dev/disk/by-id

total 0

lrwxrwxrwx 1 root root 16 Feb 25 15:33 cciss-3600508b10010343956574f315a34000c -> ../../cciss/c0d0

[root@NO0006 ~]#

 

Theres only one drive listed... ugh -  what am I missing?



Todd Carter Members
  • #14

Todd Carter
  • 10 posts

Posted 25 February 2015 - 09:05 PM

Stephen,

I have been having the same issue with my test servers.   I can get them working just fine using a USB thumb drive as the boot device, but I really didn't want the long startup and shutdown times.  Should that be the default install?  With a USB/Flash device as the Xenserver install with RAID storage for VM's?  I'm stumped as all my 6.2 DL380 G7 servers are just using the RAID 1+0 as the Xenserver install and VM storage.  

 

Help?



Todd Carter Members
  • #15

Todd Carter
  • 10 posts

Posted 25 February 2015 - 09:11 PM

Just as a reference.  This is the exact server setup - just bigger drives, but the key difference is it is booting from a USB device.  This server works perfectly - even the Local storage showed up - 50 gigs of the jumpdrive.  

 

[root@XenTest1 ~]# cat /proc/partitions 
major minor  #blocks  name
 
   7        0      57240 loop0
   8        0   31272960 sda
   8        1    4193297 sda1
   8        2    4193297 sda2
 104        0  573367448 cciss/c0d0
  11        0    1048575 sr0
 253        0  573353984 dm-0
 254        0  104857600 tda
 254        1   25165824 tdb
[root@XenTest1 ~]# ll /dev/disk/by-id
total 0
lrwxrwxrwx 1 root root  9 Feb 24 11:51 usb-Lexar_JumpDrive_839005749 -> ../../sda
lrwxrwxrwx 1 root root 10 Feb 24 11:51 usb-Lexar_JumpDrive_839005749-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Feb 24 11:51 usb-Lexar_JumpDrive_839005749-part2 -> ../../sda2

 

So when you install with no array configured - then boot up it works as intended with sda's showing.  Then restart - setup the array and you can install a second local storage with no issues using the RAID 1+0 config just fine.

 

I'm stumped.



Tobias Kreidl CTP Member
  • #16

Tobias Kreidl
  • 18,831 posts

Posted 26 February 2015 - 12:25 AM

Stephen,

I would still try to connect to /cciss/c0d0p3 as this should be the unused portion of that device that can be purposed for local storage.

Again, I wonder what kind of disk device/ raid controller this configuration has, as this may be an important factor? This sounds like an old HP drive which may have issues, in particular if it's not on the HCL. Whatever system this is, is it running the latest firmware/BIOS updates? As a sanity check, if you have a spare box sitting around, you could try the same distro on it and see if you get any different results.

-=Tobias



Todd Carter Members
  • #17

Todd Carter
  • 10 posts

Posted 26 February 2015 - 05:04 PM

Tobias,

I don't know if Stephen has tried your solution, but I did.  It worked!  You win the prize!!  Now I wonder why it didn't automatically create that storage after the install?  

 

This is what I did to create the Local Storage:

 

[root@XenTest0 ~]# xe sr-create host-uuid=e1465bef-533e-48f7-9038-96d04506522f content-type=user type=ext device-config:device=/dev/cciss/c0d0p3 shared=false name-label="Local storage"
6480dea8-e704-46c9-1caa-19ab4803560b
 
Worked perfectly.  
This was on a DL380 G5 and DL360 G5 with smart array p400 controllers.  Same exact hardware in both.  
 
Thank you!  


Stephen D. Holder Members
  • #18

Stephen D. Holder
  • 123 posts

Posted 26 February 2015 - 05:16 PM

Wait, wait, wait gents.. let me catch up here....

 

>> I would still try to connect to /cciss/c0d0p3 as this should be the unused portion of that device that can be purposed for local storage.

 

Yes, I agree....  how do I "connect" to it? Using Todd's CML with my respective uuid's? 

 

Todd, were you also able to get the Local Storage default icon to appear in xencenter?

 

I'll be trying this out today and will post my results.

 

Thanks!



Todd Carter Members
  • #19

Todd Carter
  • 10 posts

Posted 26 February 2015 - 05:19 PM

Stephen,

Yes - it shows in Xencenter just like it should.  

 

Yeah you can use my syntax with your UUID and it should be good to go.

That's just how I have always added storage to my Xenservers - I'm sure there is another 

way, but I'm a creature of habit.



Stephen D. Holder Members
  • #20

Stephen D. Holder
  • 123 posts

Posted 26 February 2015 - 05:19 PM

Also Todd,

 

What do you get when you do a # lvscan ?

 

I still show my drive as 'inactive' , although I have not attempted Tobias's suggestion yet.