Jump to content


Photo

xe sr-create, local ISO SR on larger drive

Started by Glyn Burton , 30 December 2008 - 10:40 AM
8 replies to this topic

Glyn Burton Members

Glyn Burton
  • 14 posts

Posted 30 December 2008 - 10:40 AM

Hello and Happy New Year to everyone,

I have been searching high and low on this forum and using Google for a method of having an ISO repository on the local XenServer 5.0 but utilising the spare space on /dev/sda3 (the partition that would normally be utilised for local VM storage - I happen to be using Intel FakeRAID instead for my local VM storage, therefore sda3 is available and around 60GB in size).

All the searches I found refer to either the Dom0 / Xen-specific ISO location /var/opt/xen/iso_import/, which is limited in space and not generally recommended for use in this way or by mounting an ISO library from a separate server be it CIFS, NFS or other networked technology.

I have tried various combinations of the "xe sr-create" and "xe pbd-create" commands without any success in creating a local ISO SR on the spare sda3 partition.

I welcome any input from fellow forum members.

Many thanks in advance,

Glyn,
IM&T Operations Manager for Health Services,
XenServer 5.0, HP Integrated and Express editions.



Dmitry Kushak Citrix Employees

Dmitry Kushak
  • 677 posts

Posted 31 December 2008 - 12:47 AM

Glyn

some forum users say XS admin guide instructions mentioned in this post do not work, I've retested this and they actually do deliver what's required.

See: http://docs.xensource.com/XenServer/4.1.0/1.0/en_gb/guest.html#iso_local_copies

I created a test filesystem on /dev/sdb1, then mounted it under /mnt/iso, then ran:
> xe sr-create type=iso content-type=iso shared=false host-uuid=f197e1ab-5df3-4408-bc43-c910a66544c5 name-label=ISOLOCAL device-config:location=/mnt/iso device-config:legacy_mode=true

This created an ISOLOCAL iso SR on my XS host. Please try and let us know the results.

Regards
Dmitry



Glyn Burton Members

Glyn Burton
  • 14 posts

Posted 31 December 2008 - 09:40 AM

Thank you for the quick response Dmitry. I had given it my best attempts to achieve this sort of setup but could not figure out how to mount a drive in the "Xen" way - or to put it another way, the usual fstab and mount commands, from what I have read, are ignored by Dom0 and possibly won't survive a reboot (hence the need to run "xe" commands). My attempt at using the "device-config:location=/dev/sda3" parameter and variations of it did not work.

So I guess my next question is may I crib your method to mount the file system on /mnt/iso? And will it needed formatting before use?

Many thanks,

Glyn.



Glyn Burton Members

Glyn Burton
  • 14 posts

Posted 31 December 2008 - 11:23 AM

With a deep breath I did the following:

# mkfs.ext3 /dev/sda3
# mkdir /mnt/iso

Edited in vi the /etc/fstab file and added the following:

/dev/sda3 /mnt/iso ext3 defaults 1 1

# reboot

Upon restart and logging in continued with the following:

# mount
/dev/sda3 on /mnt/iso type ext3 (rw)

(and exhaled with relief!)

From this it would appear that the information I had gathered was either incorrect or written for an earlier version of XenServer (or possibly a pre-Citrix purchase version of Xen). The mount point is remembered and safe through a reboot.

I continued further using your command reference:

xe host-list

(grabbed the UUID for the host)

xe sr-create type=iso content-type=iso shared=false host-uuid=8373c193-096f-45d5-9f02-8df5d74c10a1 name-label=LocalISO device-config:location=/mnt/iso device-config:legacy_mode=true

This appeared to work and the XenCenter showed the LocalISO repository. However on copying ISO images from a CIFS share to the new local mount-point the system reported the file system was full! Further investigation revealed that the mount-point for /dev/sda3 disappears and reverts to a directory on / instead, hence the space filling up so quickly.

It's a case of close but no cigar! Perhaps I am overlooking something real simple that can be pointed out to me?

Many thanks,

Glyn.



Arnim Schindler Members

Arnim Schindler
  • 61 posts

Posted 01 January 2009 - 06:16 PM

Hi Glyn,

I also tried many hours on the xe sr-create command without success.

The thing to solve your problem is quite simple:
You dont need the xe sr-create.

Just do a "xe-mount-iso-sr /mnt/iso -o bind".
That's all.

You can later rename the ISO repository in XenCenter.

Greetings
Arnim



Glyn Burton Members

Glyn Burton
  • 14 posts

Posted 02 January 2009 - 09:22 PM

That's exactly the end-result I was after Arnim, and it survives a reboot too which is fantastic.

I will write up a full step-by-step "howto" of all the above details to aid others trying to acheive a local ISO repository in XenServer early next week (when I am back infront of the server) and post it below.

My thanks to everyone who offered their input on this thread. Kindest regards,

Glyn.



Michael O'Neill Members

Michael O'Neill
  • 2 posts

Posted 01 February 2009 - 08:06 AM

maybe this?

http://community.citrix.com/blogs/citrite/moneil920/2009/01/26/How+to+configure+an+NFS+based+ISO+SR+using+local+storage+on+a+XenServer5+Host



Akhilesh Shirbhate Members

Akhilesh Shirbhate
  • 32 posts

Posted 24 April 2009 - 07:57 PM

Did you get a chance to the detailed HOWTO? If yes, can you please post the link here?
Thanks.



Alessandro Surace Members

Alessandro Surace
  • 5 posts

Posted 26 November 2009 - 01:42 PM

Hi All,
here a small howto I've writed just now:
- How to create a remote (ISCSI) - Local iso Storare repository
- Find the iscsi device on target 192.168.12.150
iscsiadm --mode discovery --type sendtargets --portal 192.168.12.150
- Login
iscsiadm --mode node --targetname iqn.2006-01.com.openfiler:tsn.b7e0ace4f73f --portal 192.168.12.150 --login
- Find the new disk
dmesg
- Partition the disk as a net whole partition
fdisk /dev/sdc
n p 1 [enter] [enter] w

- Prepare the new device and mount-point
mkfs.ext3 /dev/sdc1
mkdir /mnt/iso
mount /dev/sdc1 /mnt/iso/
echo "/dev/sdc1 /mnt/iso ext3 defaults 1 1" >> /etc/fstab

- Create a shared SR which mount a remote/local ISO repository
xe-mount-iso-sr /mnt/iso/ -o bind

- Now you can Use all the ISO Included in /mnt/iso



Give Us feedback