Use a USB flash disk for backup under ESX

Source: Internet
Author: User

Original article: http://virtualrj.wordpress.com/2009/01/07/connecting-usb-hd-in-esx-for-back-up/

As the new year begun some servers were due to be moved to another place more permanent burial place. our 'expension' SAN storage space is too small to keep the old servers on it so it was time to move them to a USB harddisk. but I had no idea how I cocould attach it to the ESX. well for those of you who want to know for the future here is how I did it.

Well first of all I hooked the USB drive onto the ESX Server (HP ProLiant dl0000g5). When I logged onto the console the first thing I did was Executecat /var/log/messages. This gave me following lines:

kernel: Initializing USB Mass Storage driver...
kernel: usb.c: registered new driver usb-storage
kernel: scsi3 : SCSI emulation for USB Mass Storage devices
kernel: Vendor: WD Model: 10EAVS External Rev: 1.05
kernel: Type: Direct-Access ANSI SCSI revision: 02

And a couple of lines further:

kernel: VMWARE: Unique Device attached as scsi disk sdc at scsi3, channel 0, id 0, lun 0
kernel: Attached scsi disk sdc at scsi3, channel 0, id 0, lun 0
kernel: SCSI device sdc: 1953525168 512-byte hdwr sectors (1000205 MB)
kernel: sdc: sdc1
kernel: USB Mass Storage support registered.

From this information I concluded that the USB drive was recognized and was emulated as SCSI, hence the SDC. my harddrive already contained a NTFS partition, but ESX doesn' t have the NTFS drivers. thats why it will mount the partition using fat32. this wocould pose a problem because FAT32 doesn't support files bigger as 4 GB and my vmdk's are much bigger. so I decided to format the disk with ext2 so I cocould move the files.

I first deleted all the existing partitions with fdisk and after that I created a new primary partition with partition type Linux. After formatting it with the commandmke2fs /dev/sdc1I had a working LINUX partition. If you by any chance wowould want to have an ext3 disk you cocould usemke2fs -j /dev/sdc1.

So now I got a working disk and a working partition. First I needed a mount point before I cocould actually mount the USB drive. So I made a directory in/mntCalled 'usb'mkdir /mnt/usbAnd I executed the following command:

mount /dev/sdc1 /mnt/usb

Now I cocould access the disk/mnt/usb And copy all the old VM's from/vmfs/volumes/[datastorename]. If you want to copy entire directory's make sure you use'-R'Parametercp.

This entry was posted in ESX 3.5, HP, Linux, VMWare and tagged back-up, ESX 3.5, ext2, ext3, fdisk, mke2fs, mount, USB. Bookmark the permalink.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.