How to attach USB drive as a local Storage on XenServer
book
Article ID: CTX205551
calendar_today
Updated On:
Description
To attach a USB drive as a local storage on XenServer Host.
Instructions
- Plug in USB drive.
- Open up the CLI console.
- Check disks that are currently available:
# fdisk -l

NOTE: Disk /dev/sdb is 512mb usb drive.
NOTE: In some scenarios you may need to do a ‘pvcreate /dev/xxx’ to recognize it.
- Now to check what ID the harddrive has assigned. Change directory…
# cd /dev/disk/by-id/
…and list the disks:
# ls

NOTE: USB drive ID is "usb-USB_Flash_Drive_AA04012700007933" in this case.
- Run the following command to create an LVM based local storage:
# xe sr-create type=lvm content-type=user device-config:device=/dev/disk/by-id/usb-USB_Flash_Drive_AA04012700007933 name-label=”Local USB Storage” host-uuid=<UUID of the host> shared=false
NOTE: The output of the "xe sr-create" command will be a uuid for the created SR.
NOTE: In the above command type can EXT as well. It will create a file based storage repository and is thin provisioned.
- Then we can see it in XenCenter and use it.
Environment
This software application is provided to you as is with no representations, warranties or conditions of any kind. You may use and distribute it at your own risk. CITRIX DISCLAIMS ALL WARRANTIES WHATSOEVER, EXPRESS, IMPLIED, WRITTEN, ORAL OR STATUTORY, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NONINFRINGEMENT. Without limiting the generality of the foregoing, you acknowledge and agree that: (a) the software application may exhibit errors, design flaws or other problems, possibly resulting in loss of data or damage to property; (b) it may not be possible to make the software application fully functional; and (c) Citrix may, without notice or liability to you, cease to make available the current version and/or any future versions of the software application. In no event should the software application be used to support ultra-hazardous activities, including but not limited to life support or blasting activities. NEITHER CITRIX NOR ITS AFFILIATES OR AGENTS WILL BE LIABLE, UNDER BREACH OF CONTRACT OR ANY OTHER THEORY OF LIABILITY, FOR ANY DAMAGES WHATSOEVER ARISING FROM USE OF THE SOFTWARE APPLICATION, INCLUDING WITHOUT LIMITATION DIRECT, SPECIAL, INCIDENTAL, PUNITIVE, CONSEQUENTIAL OR OTHER DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. You agree to indemnify and defend Citrix against any and all claims arising from your use, modification or distribution of the software application.
Was this article helpful?
thumb_up
Yes
thumb_down
No