Protecting your SAN LUNs during installation
When you're installing a new ESX host, it's important to take precautions to make sure that you're not overwriting a SAN LUN where your precious VMs reside. To keep those LUNs safe, you have a few options which I'm going to list from most cautious to least cautious.%pre
#!/bin/sh
# This will remove the loaded HBA modules from the kernel
remove_qla(){
for i in $(lsmod | grep qla | awk '{print $1'}); do
echo Will remove: $i >> /dev/tty1
rmmod $i
sleep 1
done
}
remove_lpfc(){
for i in $(lsmod | grep lpfc | awk '{print $1'}); do
echo Will remove: $i >> /dev/tty1
rmmod $i
sleep 1
done
}
remove_qla
sleep 2
remove_qla
remove_lpfc
ignoredisk –-drives=sda,sdb,sdc,sdd,sde,sdf,sdg,sdh,sdi,sdj,sdk,etc,etc
# Bootloader options
bootloader –location=mbr –driveorder=cciss/c0d0
# Disk Partitioning
clearpart --all --initlabel --drives=cciss/c0d0
part /boot --fstype ext3 --size 250 --ondisk cciss/c0d0 --asprimary
part / --fstype ext3 --size 5192 --ondisk cciss/c0d0 --asprimary
part swap --fstype swap --size 1600 --ondisk cciss/c0d0 --asprimary
part /var/log --fstype ext3 --size 4096 --ondisk cciss/c0d0
part /tmp --fstype ext3 --size 4096 --ondisk cciss/c0d0
part /home --fstype ext3 --size 2048 --ondisk cciss/c0d0
part None --fstype vmfs3 --size 8192 --ondisk cciss/c0d0 --grow
part None --fstype vmkcore --size 100 --ondisk cciss/c0d0
You can use one or more of those options to keep your data safe while you install/upgrade your ESX hosts. If you inadvertenly destroy a VMFS volume, it's extremely hard to recover that data.
Archives
10/01/2006 - 11/01/2006 | 03/01/2007 - 04/01/2007 | 04/01/2007 - 05/01/2007 | 05/01/2007 - 06/01/2007 | 06/01/2007 - 07/01/2007 | 07/01/2007 - 08/01/2007 | 09/01/2007 - 10/01/2007 | 10/01/2007 - 11/01/2007 | 11/01/2007 - 12/01/2007 | 12/01/2007 - 01/01/2008 | 01/01/2008 - 02/01/2008 | 02/01/2008 - 03/01/2008 | 03/01/2008 - 04/01/2008 | 04/01/2008 - 05/01/2008 | 05/01/2008 - 06/01/2008 | 06/01/2008 - 07/01/2008 | 08/01/2008 - 09/01/2008 | 09/01/2008 - 10/01/2008 | 10/01/2008 - 11/01/2008 | 03/01/2009 - 04/01/2009 | 06/01/2009 - 07/01/2009 |