Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I installed XenServer 6.0 on a machine with 2 drives (80GB SSD and 1TB SATA). My goal is to have some space for local storage where I can put ISO (since it will be very difficult to access the box physically, and I would prefer to install VMs from ISOs and not from CDs).

However, no matter what I specify for LVM, the only filesystem on sda is 4G (and only 2GB is available). XenCenter shows me plenty of disk space available for VMs; but that doesn't help me with ISOs.

Is it possible to increase local storage? I haven't started building VMs yet - so now is ideal time to partition the disk the way it should be. But parted is not installed - and I suspect for a reason.

Here is the output from pvdisplay:

[root@xenserver ~]# pvdisplay
--- Physical volume ---
PV Name               /dev/sdb
VG Name               VG_XenStorage-a7bbe7ea-f205-5f25-4ef8-daec4e08bcb2
PV Size               931.51 GB / not usable 6.41 MB
Allocatable           yes
PE Size (KByte)       4096
Total PE              238464
Free PE               238463
Allocated PE          1
PV UUID               yqrKQi-l8mD-k3mo-PxEs-M0bK-7xx3-17nnzE

"/dev/sda3" is a new physical volume of "66.53 GB"
--- NEW Physical volume ---
PV Name               /dev/sda3
VG Name
PV Size               66.53 GB
Allocatable           NO
PE Size (KByte)       0
Total PE              0
Free PE               0
Allocated PE          0
PV UUID               HlXvAo-f6gw-eqMz-5Y1d-YzYi-19tK-xZTWoE

So, the real question is, how can I make use of 66GB on /dev/sda3 without breaking anything in XenServer?

share|improve this question
add comment

2 Answers

From archy.net:

Type : fdisk -l

you’ll see the list of all volumes and hard drives, then :

Type : pvcreate /dev/sdb

sdb is my new volume

and then to configure it as a local storage :

Type : xe sr-create type=lvm content-type=user device-config:device=/dev/disk/by-id/scsi-SATA_ST3320620AS_5QF7QZZL name-label=”LOCAL SR”

scsi-SATA_ST3320620AS_5QF7QZZL is the name of my volume, you’ll have to change this value with your own, and name-label is the name you want to give to your local storage.

and this is it !

Remark : If your XenServer is a pool, you need to put it off, follow above steps and put back the XenServer in your pool.

share|improve this answer
    
Thanks. yes, I saw that... unfortunately, it didn't work (pvcreate gave an error). Interestingly, I found the answer half hour after I posted the question. I'll put it as a separate answer, to simplify reading. –  Felix Mar 11 '12 at 0:27
    
ah nice, glad you found out :D –  Lucas Kauffman Mar 11 '12 at 8:59
add comment
up vote 2 down vote accepted

Apparently, when XenServer gets installed, physical volume get created, but nothing else. So, the steps to get are the following (see more detailed explanation here.

vgcreate VGLocal /dev/sda3 
lvcreate -n -L 66GB LVLocal VGLocal
mke2fs -j /dev/VGLocal/LVLocal
mkdir /var/opt/xen/iso_import/
mount /dev/VGLocal/LVLocal /var/opt/xen/iso_import/

Then configure as local storage...

By the way, configuring local storage with xe sr-create didn't work out, either. What worked was xe-mount-iso-sr /var/opt/xen/iso_import/ -o bind

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.