When installing a XenServer there is a question in the setup wizard which asks where to place the virtual machine files. You can choose your storage and even the remaining space on the boot disk. But where to place to ISO files then? You have to create a NFS share or SMB or whatever to accomplish that. But in a 1 host environment it handy to have it on the same host. I will explain how-to use the remaining free space on the boot disk for an ISO storage repository.
First open the XenServer host console.
Check the current partition table: fdisk –l
As you can see in the screenshot, my boot partition is the /dev/sda1 (SD = Mass Storage Drive, A = First Registered Device, 1 = First Partition)
To get more info on this disk type: gdisk /dev/sda –l
Now you see that there are 3 partitions on my disk: 2x 4GB (SDA1/SDA2) and 1 with the rest (SDA3).
I will use the /dev/sda3 for ISO repository.
Format the /dev/sda3 with the following command: mkfs.ext3 /dev/sda3
After the format is done, we are gone mount it to /mnt/iso.
Create the iso directory: mkdir /mnt/iso
Mount the partition: mount –t ext3 /dev/sda3 /mnt/iso/
The mount must be active after a reboot. So add it to the fstab script: echo “/dev/sda3 /mnt/iso ext3 defaults 1 1” >> /etc/fstab
Make it available in XenServer: xe-mount-iso-sr /mnt/iso –o bind
Use FileZilla to make a SFTP connection to the XenServer host and to upload the ISO files to /mnt/iso
And now the ISO files are ready to use in XenServer.
Ingmar Verheij · April 19, 2012 at 15:57
Great post, very usefull!
The statement to mount the partition should be
# mount –t ext3 /dev/sda3 /mnt/iso/
# mount –t ext /dev/sda3 /mnt/iso/
Jeroen · April 23, 2012 at 08:55
I know 😉 I thought that I had changed the post, but I didn’t ;). But now I have hahahaha. Thanks for the head up.
(damn five times “I” in 1 post… nice :))
Yadhu Tony · April 10, 2013 at 12:02
Really helpful ! Thanks a lot Jeroen 🙂
Jeroen Tielen · April 11, 2013 at 07:56
Your Welcome Yadhu.
Darren Taylor · November 3, 2013 at 16:32
Hi Jeroen. This information is just what i am looking for and seems to be the clearest I have found.
However I have two disks installed 80gb which is system and 250Gb for the vm storage. The problem I have is that the remaining space on the system disk is not being allocated to sdb3.
Found valid GPT with protective MBR; using GPT.
Disk /dev/sdb: 156250000 sectors, 74.5 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 0964B78A-0653-443A-9F37-036C08B5C132
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 156249966
Partitions will be aligned on 2048-sector boundaries
Total free space is 139476745 sectors (66.5 GiB)
Number Start (sector) End (sector) Size Code Name
1 2048 8388641 4.0 GiB 0700
2 8390656 16777249 4.0 GiB 0700
Are you able to point me in the correct direct to create sbd3
Jeroen · November 5, 2013 at 10:04
There is no partition for your remaining space. So you have to create a partition (sdb3).
I dond’t have a XenServer environment at this moment, so I cant help you.
But with good goole skills you can find an answer )
Jonathan · January 3, 2016 at 20:45
You can create a new partition using gdisk. Do something like this:
Press “?” to see the list of available commands… you can see that pressing ‘n’ will start a wizard to create a new partition. To use the remaining available space on your disk, just accept all the default settings by pressing ‘enter’ repeatedly. This will not format the partition, so you will start back at that point in Jeroen’s guide above.
Darren Taylor · November 7, 2013 at 22:45
OK Thanks it was worth a try.
KrLz · June 18, 2015 at 20:08
Really thanks !!!
Works perfect for me !!!