Using USB Storage Devices with the Service Console


• You might want to use a USB Memory Stick or USB Portable Hard-drive in a caddy
• By default USB device drivers are loaded automatically
• This can be disabled by modifying /etc/modules.conf and remarking out with # the line which begins alias usb-controller usb-ohci
• If someone has done this – then you can load the modules (drivers) manually and access the device as needed using the insmod command
• You can read but not write to a NTFS partition on a removable device
• FAT32 is support for read/write
• You might prefer to use EXT3 if you wish to export virtual disks in their monolithic format (on VMFS partition) into a the COW format (copy-onwrite) which will take up less physical space on the disk
• However, USB Device Configuration May Cause Error During System Boot

Systems using the USB-UHCI device driver with the USB 2.0 interface cause ESX server to show a false warning message during the boot sequence. The error looks like this on boot-up
Mar 29 11:04:10 vmserver1 rc.sysinit: Initializing USB controller (usb-uhci): succeeded
Mar 29 11:04:10 vmserver1 modprobe: Hint: insmod errors can be caused by incorrect module parameters, including invalid IO or IRQ parameters
Mar 29 11:04:10 vmserver1 modprobe: /lib/modules/2.4.9-vmnix2/kernel/drivers/usb/usb-ohci.o: init_module: No such device
Mar 29 11:04:10 vmserver1 modprobe: /lib/modules/2.4.9-
vmnix2/kernel/drivers/usb/usb-ohci.o: insmod /lib/modules/2.4.9-mnix2/kernel/drivers/usb/usb-ohci.o failed
Mar 29 11:04:10 vmserver1 modprobe: /lib/modules/2.4.9-
vmnix2/kernel/drivers/usb/usb-ohci.o: insmod usb-ohci failed
Mar 29 11:04:10 vmserver1 rc.sysinit: Initializing USB controller (usb-ohci): failed

If you want to use a USB hard-drive to copy files from the ESX server to it – and you have these errors -then a general work around is to boot to a Knoppix Boot CD and do it that way. Remember if you are copying virtual disks – these will have to be exported to the COW format first.

If you have no errors like me then this how you can go about using USB hard-drives and devices
1. Logon to the Service Console as ROOT
2. [Optionally] Load up the USB Device Drivers
insmod usbcore
insmod usb-storage
insmod usb-uhci

3. Use the dmesg to print a out a list of active devices and scroll up to locate
Initializing USB Mass Storage Driver….

Using USB Storage Devices with the Service Console

Note:
The system assigns a SCSI device ID to the USB device (even though its like to be IDE Laptop Disk if it’s a portable hard-drive). The critical bits are reference to the SDG. This tells me the USB device has been added to the end of all my other SCSI disks (sda, sdb, sdc). This will help me in the next stage which is creating a mount point and mounting the partition on the USB disk. Adding additional hard-drives to the system can upset this allocation of sdn.

4. Create a mount point with
mkdir /mnt/usb
5. Mount the first partition on the disk with
mount /dev/sdg1 /mnt/usb

Note:
If you unsure about the partition scheme on the disk you can use fdisk –l /dev/sdg to print to the console the partition table

6. List Files and Start using the disk with ls –l /mnt/usb
7. Umount the USB device when finished with
cd /
umount /mnt/usb

Note:
Even after unmounting the drive. If I should down the ESX server with the USB Storage attached I get this worrying message – which could be benign
scsi: device set offline – not ready or command retry failed after bus reset :
host 2 channel 0 id 0 lun 0
i/o error: dev 08:62, sector 4168
i/o error: dev 08:62, sector 4168
i/o error: dev 08:62, sector 0

Source: Rtfm-ed.co.uk

Advertisements

About PiroNet

Didier Pironet is an independent blogger and freelancer with +15 years of IT industry experience. Didier is also a former VMware inc. employee where he specialised in Datacenter and Cloud Infrastructure products as well as Infrastructure, Operations and IT Business Management products. Didier is passionate about technologies and he is found to be a creative and a visionary thinker, expressing with passion and excitement, hopefully inspiring and enrolling people to innovation and change.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s