查看完整版本: [轉貼]Plug-in the external USB drive to ESX Server directly to backup or copy

chun 2012-8-29 19:50

[轉貼]Plug-in the external USB drive to ESX Server directly to backup or copy

<a href="http://www.vladan.fr/plug-in-the-external-usb-drive-to-esx-server-directly-to-backup-or-copy/">http://www.vladan.fr/plug-in-the-external-usb-drive-to-esx-server-directly-to-backup-or-copy/</a>
<div><p style="font-family: Arial, Helvetica, sans-serif; font-size: 1.1em; outline-width: 0px; outline-style: initial; outline-color: initial; margin-top: 10px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; line-height: 1.5em; color: rgb(85, 85, 85); background-color: rgb(249, 249, 249); ">Sometimes you would like to use your external USB drive to&nbsp;<strong style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; ">backup (transfer) your VMDK files directly from your&nbsp;<a href="http://www.vladan.fr/esx" style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; color: rgb(41, 126, 185); ">ESX Server</a>&nbsp;external USB drive.&nbsp;</strong>VMDK files are files with extention&nbsp;<strong style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; ">*.VMDK</strong>&nbsp;and those files are virtual hard disks of your virtual machines.&nbsp;<a href="http://www.vladan.fr/mounting-your-vmdk-disks-directly-to-your-windows-box-how-to/" style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; color: rgb(41, 126, 185); ">You can also mount VMDK files directly into your Windows PC</a>.</p><p style="font-family: Arial, Helvetica, sans-serif; font-size: 1.1em; outline-width: 0px; outline-style: initial; outline-color: initial; margin-top: 10px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; line-height: 1.5em; color: rgb(85, 85, 85); background-color: rgb(249, 249, 249); ">When you plug-in external USB drive to ESX host you need to enter some commands at the console. For those of you who don’t really know linux, there is some commands to remember. But they are not many…. -:) .</p><p style="font-family: Arial, Helvetica, sans-serif; font-size: 1.1em; outline-width: 0px; outline-style: initial; outline-color: initial; margin-top: 10px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; line-height: 1.5em; color: rgb(85, 85, 85); background-color: rgb(249, 249, 249); ">First of all you should know that not all filesystems are supported. For the supported ones there are those here:</p><ul style="font-family: Arial, Helvetica, sans-serif; font-size: 1.1em; outline-width: 0px; outline-style: initial; outline-color: initial; margin-top: 10px; margin-left: 10px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; list-style-type: none; line-height: 1.3em; color: rgb(85, 85, 85); background-color: rgb(249, 249, 249); "><li style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 3px; padding-right: 0px; padding-bottom: 3px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; line-height: 1.1em; list-style-type: circle; "><strong style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; ">FAT32 read/write.</strong></li><li style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 3px; padding-right: 0px; padding-bottom: 3px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; line-height: 1.1em; list-style-type: circle; "><strong style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; ">Ext3 read/write</strong></li><li style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 3px; padding-right: 0px; padding-bottom: 3px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; line-height: 1.1em; list-style-type: circle; "><strong style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; ">NTFS read only</strong>&nbsp;(that means that you can’t use NTFS formatted USB drives to copy your VMDK files, but you should create a partition with EXT3 or FAT32)</li></ul><p style="font-family: Arial, Helvetica, sans-serif; font-size: 1.1em; outline-width: 0px; outline-style: initial; outline-color: initial; margin-top: 10px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; line-height: 1.5em; color: rgb(85, 85, 85); background-color: rgb(249, 249, 249); ">Now how-to copy data from Service Console to a USB device:</p><p style="font-family: Arial, Helvetica, sans-serif; font-size: 1.1em; outline-width: 0px; outline-style: initial; outline-color: initial; margin-top: 10px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; line-height: 1.5em; color: rgb(85, 85, 85); background-color: rgb(249, 249, 249); "><strong style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; ">1.</strong>&nbsp;Plugin the external USB drive to your ESX host.<br style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; "><strong style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; ">2.</strong>&nbsp;Run this command to find out to which device name the kernel assigned to it:</p><p style="font-family: Arial, Helvetica, sans-serif; font-size: 1.1em; outline-width: 0px; outline-style: initial; outline-color: initial; margin-top: 10px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; line-height: 1.5em; color: rgb(85, 85, 85); background-color: rgb(249, 249, 249); "><em style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; color: rgb(102, 102, 102); "><strong style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; ">tail /var/log/dmesg</strong></em></p><p style="font-family: Arial, Helvetica, sans-serif; font-size: 1.1em; outline-width: 0px; outline-style: initial; outline-color: initial; margin-top: 10px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; line-height: 1.5em; color: rgb(85, 85, 85); background-color: rgb(249, 249, 249); "><strong style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; ">3.&nbsp;</strong>Now you will have to Run the following command to create a mount point (A mount point is a directory which a device or partition is attached to):</p><p style="font-family: Arial, Helvetica, sans-serif; font-size: 1.1em; outline-width: 0px; outline-style: initial; outline-color: initial; margin-top: 10px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; line-height: 1.5em; color: rgb(85, 85, 85); background-color: rgb(249, 249, 249); "><strong style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; ">mkdir /mnt/usb</strong></p><p style="font-family: Arial, Helvetica, sans-serif; font-size: 1.1em; outline-width: 0px; outline-style: initial; outline-color: initial; margin-top: 10px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; line-height: 1.5em; color: rgb(85, 85, 85); background-color: rgb(249, 249, 249); "><strong style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; "><img class="alignnone size-full wp-image-730" title="esx-how-to-mount-usb-drive" src="http://www.vladan.fr/wp-content/uploads/images/esx-how-to-mount-usb-drive.jpg" alt="esx-how-to-mount-usb-drive" width="586" height="239" style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 2px; padding-right: 2px; padding-bottom: 2px; padding-left: 2px; margin-top: 0px; margin-right: auto; margin-bottom: 10px; margin-left: auto; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: middle; display: block; overflow-x: hidden; overflow-y: hidden; text-align: center; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(255, 255, 255); "><br style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; "></strong></p><p style="font-family: Arial, Helvetica, sans-serif; font-size: 1.1em; outline-width: 0px; outline-style: initial; outline-color: initial; margin-top: 10px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; line-height: 1.5em; color: rgb(85, 85, 85); background-color: rgb(249, 249, 249); "><strong style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; ">4.&nbsp;</strong>Run the following command to mount the drive ( When mounting, you must tell the&nbsp;<strong style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; "><em style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; color: rgb(102, 102, 102); ">mount</em>&nbsp;</strong>command what is the device or partition you want to mount and what is the mount point. The mount point must be a directory that already exists on your system.:</p><p style="font-family: Arial, Helvetica, sans-serif; font-size: 1.1em; outline-width: 0px; outline-style: initial; outline-color: initial; margin-top: 10px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; line-height: 1.5em; color: rgb(85, 85, 85); background-color: rgb(249, 249, 249); "><em style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; color: rgb(102, 102, 102); "><strong style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; ">mount /dev/[device_name] /mnt/usb -t [filesystem_type]</strong></em></p><p style="font-family: Arial, Helvetica, sans-serif; font-size: 1.1em; outline-width: 0px; outline-style: initial; outline-color: initial; margin-top: 10px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; line-height: 1.5em; color: rgb(85, 85, 85); background-color: rgb(249, 249, 249); "><span style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; text-decoration: underline; vertical-align: baseline; ">Please Note that you must:</span><br style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; ">* Replace [<strong style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; ">device_name</strong>] with your device name found in step 2<br style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; ">* Replace [<strong style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; ">filesystem_type</strong>] with&nbsp;<strong style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; ">vfat</strong>&nbsp;(FAT32) or&nbsp;<strong style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; ">ext3</strong></p><p style="font-family: Arial, Helvetica, sans-serif; font-size: 1.1em; outline-width: 0px; outline-style: initial; outline-color: initial; margin-top: 10px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; line-height: 1.5em; color: rgb(85, 85, 85); background-color: rgb(249, 249, 249); "><strong style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; ">5.&nbsp;</strong>After your copy(backup) you can type this command to unmount the device:</p><p style="font-family: Arial, Helvetica, sans-serif; font-size: 1.1em; outline-width: 0px; outline-style: initial; outline-color: initial; margin-top: 10px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; line-height: 1.5em; color: rgb(85, 85, 85); background-color: rgb(249, 249, 249); "><strong style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; ">umount /dev/[device_name]</strong></p><p style="font-family: Arial, Helvetica, sans-serif; font-size: 1.1em; outline-width: 0px; outline-style: initial; outline-color: initial; margin-top: 10px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; line-height: 1.5em; color: rgb(85, 85, 85); background-color: rgb(249, 249, 249); ">You might also want to export you VMDK files.&nbsp;<strong style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; ">Vmkstools</strong>&nbsp;is VMware ESX Server file system management tool. It is a program for creating and manipulating virtual disks, file systems, logical volumes and pyhsical storage device on the VMware ESX Server. Now what you need to do to&nbsp;<strong style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; ">export the VMDK&nbsp;</strong>(virtual disk)? You will use a command ‘vmfkstools’:</p><p style="font-family: Arial, Helvetica, sans-serif; font-size: 1.1em; outline-width: 0px; outline-style: initial; outline-color: initial; margin-top: 10px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; line-height: 1.5em; color: rgb(85, 85, 85); background-color: rgb(249, 249, 249); "><em style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; color: rgb(102, 102, 102); "><strong style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; ">vmkfstools -i /vmfs/volumes/[datastore_name]/[vm_name]/[vm_name].vmdk /mnt/usb/[vm_name].vmdk -d 2gbsparse</strong></em></p><p style="font-family: Arial, Helvetica, sans-serif; font-size: 1.1em; outline-width: 0px; outline-style: initial; outline-color: initial; margin-top: 10px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; line-height: 1.5em; color: rgb(85, 85, 85); background-color: rgb(249, 249, 249); ">And&nbsp;<strong style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; ">how-to import</strong>&nbsp;the VMDK (virtual disk):</p><p style="font-family: Arial, Helvetica, sans-serif; font-size: 1.1em; outline-width: 0px; outline-style: initial; outline-color: initial; margin-top: 10px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; line-height: 1.5em; color: rgb(85, 85, 85); background-color: rgb(249, 249, 249); "><strong style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; ">vmkfstools -i /[path_to_USB_mount]/[vm_name].vmdk /vmfs/volumes/[datastore_name]/[vm_name]/[vm_name].vmdk</strong></p><p style="font-family: Arial, Helvetica, sans-serif; font-size: 1.1em; outline-width: 0px; outline-style: initial; outline-color: initial; margin-top: 10px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; line-height: 1.5em; color: rgb(85, 85, 85); background-color: rgb(249, 249, 249); ">You might also want to copy the configuration files for a virtual machine. Those files are files with following extentions:&nbsp;<strong style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; ">*.vmx *.log *.nvram *.vmxf *.vmsd&nbsp;</strong>(you will not only copy the configuration files, but at the same time you will make a zip file in tar.gz format:</p><p style="font-family: Arial, Helvetica, sans-serif; font-size: 1.1em; outline-width: 0px; outline-style: initial; outline-color: initial; margin-top: 10px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; line-height: 1.5em; color: rgb(85, 85, 85); background-color: rgb(249, 249, 249); "><strong style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; ">cd /vmfs/volumes/[datastore_name]/[vm_name]<br style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; ">tar -czvf [vm_name].tar.gz *.vmx *.log *.nvram *.vmxf *.vmsd<br style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; ">cp [vm_name].tar.gz /mnt/usb</strong></p><p style="font-family: Arial, Helvetica, sans-serif; font-size: 1.1em; outline-width: 0px; outline-style: initial; outline-color: initial; margin-top: 10px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; line-height: 1.5em; color: rgb(85, 85, 85); background-color: rgb(249, 249, 249); ">Now you will be able to extract the configuration files of a virtual machine:</p><p style="font-family: Arial, Helvetica, sans-serif; font-size: 1.1em; outline-width: 0px; outline-style: initial; outline-color: initial; margin-top: 10px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; line-height: 1.5em; color: rgb(85, 85, 85); background-color: rgb(249, 249, 249); "><strong style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; ">tar -xzvf [vm_name].tar.gz /vmfs/volumes/[datastore_name]/[vm_name]</strong></p><p style="font-family: Arial, Helvetica, sans-serif; font-size: 1.1em; outline-width: 0px; outline-style: initial; outline-color: initial; margin-top: 10px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; line-height: 1.5em; color: rgb(85, 85, 85); background-color: rgb(249, 249, 249); ">Source:&nbsp;<a href="http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&amp;cmd=displayKC&amp;externalId=1007059" target="_blank" style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; color: rgb(41, 126, 185); ">VMware Knowledge Base</a></p><p style="font-family: Arial, Helvetica, sans-serif; font-size: 1.1em; outline-width: 0px; outline-style: initial; outline-color: initial; margin-top: 10px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; line-height: 1.5em; color: rgb(85, 85, 85); background-color: rgb(249, 249, 249); ">You can find more Free Whitepapers to download on my&nbsp;<a href="http://www.vladan.fr/free-resources-2/" style="font-size: 1em; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; color: rgb(41, 126, 185); ">Free Resources page</a>.</p><p style="font-family: Arial, Helvetica, sans-serif; font-size: 1.1em; outline-width: 0px; outline-style: initial; outline-color: initial; margin-top: 10px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; vertical-align: baseline; line-height: 1.5em; color: rgb(85, 85, 85); background-color: rgb(249, 249, 249); ">Enjoy… -:)</p></div>

chun 2012-8-29 19:54

Mount USB disk on ESX / ESXi 4.1

<p style="margin-bottom: 5px; text-align: justify; color: rgb(68, 68, 68); font-family: Tahoma, Arial, sans-serif; font-size: 12px; line-height: 15px; background-color: rgb(238, 238, 238); ">On ESX 4.0 you can mount a USB disk with ext3 partition with following command :</p><p style="margin-bottom: 5px; text-align: justify; color: rgb(68, 68, 68); font-family: Tahoma, Arial, sans-serif; font-size: 12px; line-height: 15px; background-color: rgb(238, 238, 238); ">mount /dev/sga2 /mnt/usb -t ext3</p><p style="margin-bottom: 5px; text-align: justify; color: rgb(68, 68, 68); font-family: Tahoma, Arial, sans-serif; font-size: 12px; line-height: 15px; background-color: rgb(238, 238, 238); ">&nbsp;</p><p style="margin-bottom: 5px; text-align: justify; color: rgb(68, 68, 68); font-family: Tahoma, Arial, sans-serif; font-size: 12px; line-height: 15px; background-color: rgb(238, 238, 238); ">On ESX/ESXi 4.1 you cannot mount a USB disk because it's already prepared for passthrough for any virtual machine...</p><p style="margin-bottom: 5px; text-align: justify; color: rgb(68, 68, 68); font-family: Tahoma, Arial, sans-serif; font-size: 12px; line-height: 15px; background-color: rgb(238, 238, 238); ">You have to stop usbarbitrator service before you connect your disk :</p><ul style="list-style-image: url(http://www.myitkb.ch/templates/siteground-j15-54/images/li.gif); clear: both; color: rgb(68, 68, 68); font-family: Tahoma, Arial, sans-serif; font-size: 12px; line-height: 15px; background-color: rgb(238, 238, 238); "><li>SSH connection on your ESX</li><li>Do not connect your USB drive</li><li>Stop usbarbitrator service :<br>/etc/init.d/usbarbitrator stop</li><li>Connect your USB drive on your server</li><li>Mount your USB drive with EXT3 partition (FAT32 is supported but has a lot of limitations...)&nbsp;<br>mount /dev/sga2 /mnt/usb -t ext3<br><br>The directory /mnt/usb must exist<br>You can find the "name" of your USB device after your connected it with the following command :<br>tail /var/log/messages<br>dmesg<br><br></li><li>After you used your USB disk you must unmount it :<br>umount /mnt/usb<br><br>and restart usbarbitrator service :<br>/etc/init.d/usbarbitrator start</li></ul>
頁: [1]
查看完整版本: [轉貼]Plug-in the external USB drive to ESX Server directly to backup or copy