FreeBSD + HAST + CARP + NFS

FreeBSD recently introduced a disk replication setup: HAST.

This is FreeBSD’s answer to DRDB for Linux.

Some very good blog posts, with scripting, can be found here:

FreeBSD + HAST + CARP + NFS

HAST with ZFS

My issues with HAST are its feeling of instability and the addition of numerous points of failure… sloppy design? The system, essentially, adds “virtual harddrives”. These “virtual harddrives (devices)” sit on top of the drives to be mirrored, the HAST devices receive the data, and then distribute the data to real harddrives on the primary server and to the secondary server. I found this to be a nightmare – more Linux style than FreeBSD.

I would not consider putting HAST in production with ZFS. ZFS is created on top of the “virtual harddrives (devices)”. That is 3 layers (ZFS + HAST devices + actual Harddrives). If HAST messes us, then your ZFS tank disappears. If you restart the HAST daemon then you have to make sure to export your ZFS first. If you do not export the ZFS pool, then ZFS will lock up and a hard reboot is needed. Then on reboot HAST has to be live first, and then your ZFS pool is reimported. All of the aforementioned means downtime. It my lab experiments I simply removed it from the servers and have deemed it not suitable for 24x7x365 applications.

For a ZFS pool replication script visit this post: http://www.tediosity.com/2011/05/31/zfs-replication-on-freebsd/

VMware Virtual Machine Hosting

Dell Firmware Upgrade

If you have been searching around for the proper ISOs to use.

These two ISOs are what you need to use.

This is bootable:
cdu_1.5_core_225_A00.iso

After you have burned and booted with the above CD.

Download these three files:

http://ftp.us.dell.com/sysman/OM_6.2.0_SUU_A01.iso.001
http://ftp.us.dell.com/sysman/OM_6.2.0_SUU_A01.iso.002
http://ftp.us.dell.com/sysman/OM_6.2.0_SUU_A01.iso.003

The above files need to be joined:

Windows: copy /b OM* OM_610_SUU_A01.iso
Linux: cat OM* > OM_610_SUU_A01.iso

Burn the resulting ISO file.

Boot from the first DVD and then select Update Firmware. Insert Second CD.

VMware Virtual Machine Hosting

Reset Password Foundry EdgeIron – Asset Recovery

VMware Virtual Machine Hosting

Foundry Models Covered: EIF24G, EIF4802CF, EIF48G, EIF24GS, EIF48GS, etc.

1) Establish a connection to the device on the console port

2) Power the switch on, while holding down ctrl-u to access the system file menu (technically you can just hit �ctrl-u� in the one second time between powering on and it actually loading, but its hard to time it)

3) you have a few seconds to type the password for the file menu, it is ‘mercury’; clear off the asteriks that may remain from holding ctrl-u down first.

4) select D to delete all user defined configurations

5) enter the file name of the file type that is �Config File� and confirm if asked to delete it

6) select Q to reload.

At this point it will boot normally, and the username and password for the unit will be at default, admin, and admin. Its back to default now, have fun. I have no idea why Foundry barely documents this process. Even the users manual doesn�t tell you the password to enter the ROM menu (‘mercury’), it sais to call tech support to get it.

VMWare convert thick to thin disk

If you have VMware vCenter – Click Migrate

For those of us who do not have VMware vCenter:

1. Shutdown the VM
2. SSH to the ESXi machine and type:

vmkfstools -i /vmfs/volumes/datastore1/NAME-OF-VM/NAME-OF-VM.vmdk /vmfs/volumes/datastore1/NAME-OF-VM/NAME-OF-VM-thin.vmdk -d ‘thin’ -a lsilogic

Once the copy is done, go into the settings of your VM, delete the hard disk, and add a new hard disk pointing to the “thin” vmdk you created. Boot your vm, if it all works then you can use the datastore browser to delete the thick vmdk and you are done.

VMware Virtual Machine Hosting

Fantastico is not installed at the default location /usr/local/cpanel/3rdparty/fantastico. Either move the Fantastico directory from it’s current location to /usr/local/cpanel/3rdparty/fantastico OR enable ioncube loaders in WHM -> Tweak settings.

Fantastico is not installed at the default location /usr/local/cpanel/3rdparty/fantastico. Either move the Fantastico directory from it’s current location to /usr/local/cpanel/3rdparty/fantastico OR enable ioncube loaders in WHM -> Tweak settings.

Run this command:

/scripts/makecpphp

VMware Virtual Machine Hosting

Unknown HZ value! (##) Assume 100

You’ve been hacked.

How to clean a Hacked CentOS / LINUX Machine

yum install chkrootkit

Run chkrootkit to find INFECTED files

You will need to delete, manually, each of these files.

The permissions will be modified to stump the average user.

You will need to use: chattr

This command will free most files: chattr -suSadAc

For the ones that can not be deleted after the above, try: chattr -i

Files commonly targeted: top ps find netstat ifconfig

Once the files are deleted, reinstall the files using YUM:

yum reinstall procps openssh-server openssl psmisc findutils fileutils util-linux net-tools textutils sysklogd

Additional things:

1. sshd will be renamed to sshd0 in /usr/sbin/
2. the hacker has most likely added an entry to the bottom of: /etc/rc.d/rc.sysinit
———
# Xntps (NTPv3 daemon) startup..
/usr/sbin/xntps -q
———

Remove it: chattr -suSadAc xntps ; rm -f xntps

3. Re-run chkrootkit until the machine is clean

VMware Virtual Machine Hosting