VMware Cloud Community
Jae_Ellers
Virtuoso
Virtuoso

Backup VMFS partition headers?

I've heard that it's a good idea to backup the beginning of your luns in case you need to recover them at a later date. Anyone done this? The number that sticks in my mind is the first 100MB. Sound right? We plan to dd this off to a file on a SC nfs mount.

-=-=-=-=-=-=-=-=-=-=-=-=-=-=- http://blog.mr-vm.com http://www.vmprofessional.com -=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Reply
0 Kudos
4 Replies
RParker
Immortal
Immortal

It would probably be better to recreate the LUNs, and make good backups.

I wouldn't trust a LUN that has been "rebuilt".

Reply
0 Kudos
Jae_Ellers
Virtuoso
Virtuoso

The answer is 20 Mb and is covered in the VMworld 2007 session TA 48 Advanced VMFS Configuration & Troubleshooting, as is the process for backing them up. http://www28.cplan.com/cbv_export/PS_TA48_288131_166-1_FIN_v2.pdf

-=-=-=-=-=-=-=-=-=-=-=-=-=-=- http://blog.mr-vm.com http://www.vmprofessional.com -=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Reply
0 Kudos
tabit
Contributor
Contributor

This link requires username/password? Could you please post the procedures to backup and recover?

does dd=/dev/sdx of=lun-header-20MB bs=1024 count=2048 work?

Reply
0 Kudos
Jae_Ellers
Virtuoso
Virtuoso

  1. create a vm-support and stash it away for later. This includes partition table info, etc. that will come in handy if you need to restore

  2. backup .sf from the root of the lun (cp /vmfs/volumes/<name>/..* <dest> as there are files starting with .)

  3. locate Lun ID: vmkfstools -P /vmfs/volumes/<name> |grep vmhba. Let's assume that comes back vmhba0:0:1:1

  4. find the SCSI device name: esxcfg-vmhbadevs -q |grep vmhba0:0:1 Note this has the partition number removed, e.g. last :1 from above. Let's assume this returns /dev/sdd

  5. dump the first 20Mb: dd if=/dev/sdd of=lunhead.bin bs=1024 count=20480

-=-=-=-=-=-=-=-=-=-=-=-=-=-=- http://blog.mr-vm.com http://www.vmprofessional.com -=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Reply
0 Kudos