Storage and SAN
- Category: VI3/vSphere: Storage
- Published: 23 January 2009
I'm currently writing a document that I will publish soon on building a low cost lab with VI3. While I was doing some research on VMFS partition alignment, I found that I was unable to create (or delete) partitions on the /dev/sda disk that ESX is installed on. I could make the changes, but as I tried to write the changes to disk, fdisk would come back with the following error:
SCSI disk error : host 1 channel 0 id 0 lun 0 return code = be0000
I/O error: dev 08:00, sector 40355342
Device busy for revalidation (usage=8)
I know that I could just use the VI client to create this partition, but as I'm busy writing this fairly detailed document, I wanted to show potential readers how to create such an aligned local VMFS3 partition using fdisk and vmkfstools on the /dev/sda device.
Then I also had the question in my mind... "If the VI client can do it, why can't I?"
Anyway, after playing around with ESX a little, I found a fix. Use with caution though!
You need to remove the lock that ESX has on the device! The esxcfg-advcfg command can do this.
Before running fdisk, execute the following command at the service console:
esxcfg-advcfg -s 0 /Disk/PreventVMFSOverwrite
With PreventVMFSOverwrite now switched off, you can use fdisk to write the partition changes without the error. You will still get "device or resource busy" but it will write the changes.
After you have saved the partition changes using fdisk, run the following commands:
esxcfg-advcfg -s 1 /Disk/PreventVMFSOverwrite