• Backup ESXi virtual machine

    Backup:
    Copy the whole directory of the virtual machine in VMFS to NFS

    Restore:
    Copy back from NFC to the same VMFS location

    Clone:
    Using vmkfstools to clone between different VMFS or Virtual Machine Name

    Refer to  1027876

     

  • HP P410/Raid5 benchmark

    Test Environment

    ProLiant MicroServer Gen8
    E3 1230V2@3.3G
    16GB RAM
    3 WD Red NAS 4T/ @HP P410 Raid5

    Software:
    HP ESXi 6.0.0U2
    Virtual:
    Debian 8/X64
    8 CPU/ 4G RAM

     

    Benchmark Tool

    FIO (Flexible I/O Tester)

    Google Compute SSD FIO Script

    https://wiki.mikejung.biz/Benchmarking#Linux_Benchmarking_Tools

     

    Result:

    # Full write pass
    
    1 process
     Run status group 0 (all jobs):
     WRITE: io=20480MB, aggrb=267620KB/s, minb=267620KB/s, maxb=267620KB/s, mint=78363msec, maxt=78363msec
    
     Disk stats (read/write):
     sda: ios=0/41090, merge=0/194, ticks=0/17786888, in_queue=17813224, util=99.70%
    benchmark: (g=0): rw=randread, bs=4K-4K/4K-4K/4K-4K, ioengine=libaio, iodepth=128
    
    
    4 process / Random Read
    
    Run status group 0 (all jobs):
     READ: io=45580KB, aggrb=1500KB/s, minb=1500KB/s, maxb=1500KB/s, mint=30379msec, maxt=30379msec
    
    Disk stats (read/write):
     sda: ios=11312/12, merge=0/7, ticks=4291100/444, in_queue=4331296, util=99.76%
    benchmark: (g=0): rw=randwrite, bs=4K-4K/4K-4K/4K-4K, ioengine=libaio, iodepth=128
    
    # 4 Process / Random Write
    Run status group 0 (all jobs):
     WRITE: io=113208KB, aggrb=3689KB/s, minb=3689KB/s, maxb=3689KB/s, mint=30684msec, maxt=30684msec
    
    Disk stats (read/write):
     sda: ios=0/28298, merge=0/0, ticks=0/4648448, in_queue=4649856, util=99.76%
  • Best Xterm under windows

    xshell  from netsarang:

    https://www.netsarang.com/products/xsh_overview.html

    Better than Bitvise for daily linux ssh operation

    https://www.bitvise.com/ssh-client

     

     

     

     

  • Update HP P410 Firmware

    Updated the P410 Firmware with HP SPP2015040.2015_0407.5.iso

  • Four ways to update HP iLO firmware

    http://techmolecules.blogspot.com/2014/08/four-ways-to-update-hp-ilo-firmware.html

    HP iLO firmware are scexe (self extracting files).  To get the iLO firmware, search system model on support section of hp.com.

    ONE : From OS (Linux) CLI use scexe file

    – Download iLO firmware say CP023069.scexe
    – Unpack it
    $ cd /tmp
    $ chnmod 755 CP023069.scexe
    $ ./CP023069.scexe
    – follow online instruction
    – Check iLO new version
    $ curl http:///xmldata?item=All

    TWO : From iLO CLI load bin file

    On some webserver ( that should be on same same vlan as iLO valn and network), copy firmware bin file in DocumentRoot.

    $ ./CP023069.scexe –unpack=firmware
    $ cd firmware
    $ cp firmware/ilo2_NNN.bin $DocumentRoot (usually /var/www/html/)

    – Login on iLO over ssh and upload firmware
    $ssh -l Administrator
    – To see current iLO version
    iLO> show

    – to check if your web servers is pingable from iLO (to get iLO bin file)
    iLO> cd /map1
    iLO> oemhp_ping
    iLO> load -source http:///firmware/ilo2_NNN.bin

    – Your session will seems to hang for 2-3 minute – do not worry ! If all is good. iLo firmware will be upgraded and iLO will be rebooted. Check iLo version
    $ curl http:///xmldata?item=All

    THREE : Using iLO WebUI to upload bin file

    – Download and save ilo firmware bin files extracted above by keying in below in you web browser
    http:///firmware/ilo2_NNN.bin
    -access iLO Web UI, go to Administration tab and upload bin file to upgrade iLO firmware
    http://

    FOUR : HPSIM to push firmware

    – Use HPSIM if you  paying SIM license fee !

    Reference : http://pipe2text.com/?page_id=1908

     

  • Access USB driver in ESXi6

    Two mode to access USB flash driver in ESXi environment:

    • Via esxi usb arbitrator daemon
    • Direct

    Arbitrator mode is the default mode,  in this mode,  USB package will the filter by arbitrator daemon,  based on USB location information.  (position in USB hub),   and forward to the VM client.

    To use the USB flash drive by ESXi host, we need to stop the arbitrator daemon:

    /etc/init.d/usbarbitrator stop      (temp)

    chkconfig usbarbitrator off      (permanent)

     

     

  • Missing diskspace in Linux

    http://lunatic.no/2014/08/missing-diskspace-in-linux/

    Missing diskspace in Linux

    Today I had a problem with a server that had no more disk space. And I learned something new in the process.

    df -h told me that 100% was in use. Which was about 29GB on that server.

    But if I checked the root partition with du -shx / i got about 9GB of used space.

    So off to checking where the space could have gone:

    Inode usage

    I know “du” does not take account for inodes, etc. But according to dumpe2fs /dev/sdx1 my Inode size * Inode count = about 700MB.
    So that was not it.

    “Hidden” directories under mountpoints

    “du” will not see used space of files located in a path that is later mounted to another file-system. For example, if you have files in /home/ on your root partition, but has later mounted /home to its own partition. The files will be hidden behind the new mountpoint.

    To be able to check these files without unmounting anything in use, I did the following:

    mount --bind / /mnt
    du -shx /mnt

    If “du” would give me a different result now, I would have known that the files where hidden under one of my mountpoints. But sadly, they where not. I was starting to run out of options.

    Deleted files

    If a process opens a file, and then you delete it by rm thefile you will have the file deleted from the filesystem, but the inodes will not be freed before the process closes/releases the file. This is something I love about Linux/Posix systems, since that means that processes does not need to lock my files and I have full control over my files as opposed to other operating systems(windows). But I thought that when you delete a opened file, there is no easy way of knowing which deleted files are “held back” by processes. But there is!

    lsof | grep deleted quickly gave me a list of files that has been deleted, but is held open by processes, and their size. In my case a deleted log file of 17GB in size was held by asterisk. So i reloaded the logger module of asterisk, and hey presto! The diskspace was available again.

    Now only 9GB was “in use” according to df -h.

  • Remove GPT from a disk under ubuntu

    Suppose /dev/sdb is the device to be cleand

     

    sudo apt-get install gdisk

    sudo gdisk /dev/sdb

    > Enter 2,  select GPT

    > Enter  ?,  get command list

    > Enter x,   expert mode

    > Enter ?,  get command list

    > Enter z,   destroy GPT

     

    # create dos partition table, and partition

    sudo fdisk /dev/sdb

    # format the dos partition,   say /dev/sdb1

    sudo mkfs.msdos /dev/sdb1