Posts Tagged Gentoo
After upgrading to VMWare ESXi 5 from 4.1, I found one of my datastore volumes would no longer mount. The disk would show up as a device, but there were a series of errors whenever I tried to mount the volume.
After trying a variety of things, I still couldn’t get the volume to mount, so I decided to try to recover the virtual machines off the drive before wiping it.
The first step is to configure the un-mountable disk as a raw passthrough. This will allow a guest OS to access the disk. Instructions for these steps can be found here:
After converting the disk to a raw passthrough, assign it to a virtual machine on your ESXi host. I chose Gentoo Linux.
By default, most linux distributions don’t ship with VMFS support, however Christophe Fillot and Mike Hommey have developed a tool called vmfs-tools that allows mounting of VMFS partitions. If you have Debian or Ubuntu you can simply install the package. Since I was using Gentoo I had to build from source:
You may have to emerge some of the prerequisites if you do not have them. See the vmfs-tools site for details.
wget http://glandium.org/projects/vmfs-tools/vmfs-tools-0.2.1.tar.gz tar -xf vmfs-tools-0.2.1.tar.gz cd vmfs-tools-0.2.1 ./configure make && make install
Now that we have vmfs-fuse installed, we can mount our volume:
#Ensure the fuse kernel module is loaded modprobe fuse #Mount the device to the desired mountpoint vmfs-fuse /dev/sdd1 /mnt/vmfs #copy files off of mounted vmfs cp -Rv /mnt/vmfs /tmp
I have several servers which run an assortment of http, svn, ssh, and ftp services. One of the largest annoyances are automated breaking scripts pounding my services. Recently, I have been looking into blacklist.py: a handy python script written by Reto Glauser, which monitors syslog-ng logs looking for possible break-in attempts. The script uses iptables to block future traffic from suspicious IP’s for a specified amount of time.
After I got the script setup and running I wanted a Gentoo init script that would automatically start the script on boot. After reading through some examples in my /etc/init.d/ directory I seem to have managed to cook up something that works: Read the rest of this entry »