In my workplace we make extensive use of Netapp and IBM N-Series filers and they have a neat piece of software available called VSC which allows you to re-align your VMDK. It does a lot more but we might save this for another post. I will assume you have already installed the VSC software and its plugin in vCenter.
- Go to the VSC tab in vCenter and go to the tools menu. Download the mbrtools.tar.gz file to your workstation
- SCP the file to your ESXi host /tmp directory
- Extract the file and copy mbralign and mbrscan to the /usr/bin directory
- Set the permissions for both files to 555: chmod 555 mbralign
Now that we have the software in place we will need to check which of the vmdk are misaligned. This is done by making use of the mbrscan tool.
- Change into the directory holding your VM files
- Check the file sizes (ls –lah). Make sure you have at least double the size of vmdk file available on the volume.
- Run /usr/bin/mbrscan against flat.vmdk file(s). This will indicate that your VMDK is aligned or not.
Now you can continue with the alignment process itself. This is done with the mbralign tool.
- Make sure the VM is shut down and you have removed existing snapshots. This is to avoid corruption.
- Run /usr/bin/mbralign vmname.vmdk
- Confirm with y
- You will see this message indicating that the process is complete.
- ls -la to see contents of your directory. You will notice the backup files created during this process.
- Remove these files: rm -rf *backup
- Repeat this for every misaligned disk
- Power on VM
VSC has another method for doing a batch scan for alignments. I will cover these in another post.
No comments:
Post a Comment