zoukankan      html  css  js  c++  java
  • 在esx下使用U盘进行备份

    原文: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 ‘expensive’ 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 could 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 DL380g5). When I logged onto the console the first thing I did was execute cat /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 recognised 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 would pose a problem because FAT32 doesn’t support files bigger as 4Gb and my vmdk’s are much bigger. So I decided to format the disk with EXT2 so I could 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 command mke2fs /dev/sdc1 I had a working Linux partition. If you by any chance would want to have an EXT3 disk you could use mke2fs -j /dev/sdc1.

    So now I got a working disk and a working partition. First I needed a mount point before I could actually mount the USB drive. So I made a directory in /mntcalled ‘usb’ with mkdir /mnt/usb and I executed the following command:

    mount /dev/sdc1 /mnt/usb

    Now I could access the disk at /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 the '-R' parameter with cp.

  • 相关阅读:
    Nginx 负载均衡
    wordpress 页面显示指定分类文章
    Linux 下 wordpress 无法安装插件
    在 Linux 上安装配置 BitTorrent Sync [转]
    nagios 配置 check_traffic 流量监控模块(Server 端)
    install nagios pnp4nagios on centos 6
    bat 脚本处理windows 文件
    Mac 下重新安装配置ibm Lotus 邮箱
    Domino 邮箱服务器接收不存在的邮箱账号的邮件
    Linux 下统计Apache每分钟的并发数
  • 原文地址:https://www.cnblogs.com/swordzj/p/2036367.html
Copyright © 2011-2022 走看看