Solved

Can I connect a USB drive to my XenServer?

Posted on 2011-03-17
2
2,008 Views
Last Modified: 2012-06-21
I have a Dell Poweredge Server running my XenServer with a little over 1TB of disk space. I would like to take my 1TB USB drive and attach it to my server, and configure that as my ISO library. Is that possible, and if so, how do I go about configuring it? I am running XenServer 5.6
0
Comment
Question by:tx_it_guy
2 Comments
 
LVL 14

Accepted Solution

by:
amichaell earned 250 total points
ID: 35164742
You can.  If you want an NTFS file system on the drive it will be read only.  http://community.citrix.com/display/ocb/2009/02/23/Accessing+a+USB+drive+in+XenServer+-+Part+1
0
 
LVL 36

Assisted Solution

by:Carl Webster
Carl Webster earned 250 total points
ID: 35166166
http://forums.citrix.com/message.jspa?messageID=1418608

Highlights:

First off: Once you've plugged a USB drive into you XenServer machine, how do you access the data therein? The first thing to do is logon to the Control Domain, usually through XenCenter, and type the command:

fdisk -l

Notice that the fdisk command shows the disks that XenServer knows about. Notice also that the device name is /dev/sdc, and that the first partition on that device has itself a device name of /dev/sdc1.

Accessing an NTFS USB drive in XenServer

Here I've plugged in an NTFS USB drive, and I've established that XenServer (Linux) knows the first partition by the name /dev/sdc1. Since this is a disk device, we need to "mount" it into the Linux filesystem. In this way, it will become a part of the filesystem hierarchy. The only thing I need is an empty directory to mount "over". Most Linux distributions come with an empty /mnt directory for just this purpose:

mount /dev/sdc1 /mnt

Note that the target directory of your mount has to exist, and any files that existed in that directory will be "hidden" until you un-mount the device (see later for un-mounting). There's nothing special about the directory you mount over - it's a regular directory. What I usually end up doing is creating another directory inside of /mnt to mount my disk over. That way I can have many "mount points" if I want to transfer data between them.

The big drawback with mounting an NTFS drive is that it's supported in read-only mode only. This isn't usually a problem with software like NTFS-3G being available, but Citrix doesn't support the installation of any software inside of the XenServer Control Domain.

But at least now I can use regular Linux commands to copy data from the drive, for example you could import an already backed-up VM straight from the drive, using something like:

xe vm-import filename='/mnt/backups/Windows XP.xva'

This assumes that there was an existing folder in the root of the mounted partition called backups.

Before unplugging the USB drive, you'll need to "un-mount" the drive, making sure that your current working directory is not somewhere down the /mnt path (or wherever you've mounted the device):

cd /
umount /mnt
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Join & Write a Comment

Suggested Solutions

After several days of searching and hunting for limited documentation, I wanted to share this guide to hopefully save someone the hassle of trying to figure this out on their own. I have tested this on Xendesktop 7.1 and PS 4.5 running simultaneous…
Exchange server is not supported in any cloud-hosted platform (other than Azure with Azure Premium Storage).
How to install and configure Citrix XenApp 6.5 - Part 1. In this video tutorial we have explained step by step installation of Citrix XenApp 6.5 Server on Windows Server 2008 R2 is explained in this video. We have explained the difference between…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now