7 Replies Latest reply on Dec 31, 2006 4:46 AM by stevermoker

    Create local VMFS volume after install ....

    DonalB Hot Shot

       

      Has anyone got any tips for how to create a new VMFS on the same disk that esx is installed on. I have about 430gb of space left on the array but no matter what i try I can't get esx to see it a a vmfs. Initially VIC wouldn't even see the free space as i had already created a VMFS volume and a vmkcore on the disk, ended up deleting both of those, and had to do it at the cli as VIC just moaned abut not being able to delete it. Now VIC can't create volumes even though it sees the space! When I fdisk /dev/sda and create my partitions, set the id to fb (and fc for vmkcore), then reboot so the new partition layout can be seen, I can't see the volumes!

      I have 10 boxes spread across the world that this is the first of (all the same hardware and the same install proc done, so expecting the same problem) so a reinstall is my very, very last resort!

      However I fail to see how difficult this could be, is this because LVM is being used now as the COS is based on RHEL3 or something like that?

       

      tks

      DB

        • 1. Re: Create local VMFS volume after install ....
          jmcdonald Expert
          VMware Employees

          Typically from my experience with VI3 all you should need to do is to click the 'Add Storage' button and when you are walking through the wizard it will show any devices that have unformatted space on it. 

           

          Take a look at page 104 of the following PDF under the 'Adding Local SCSI Storage' Section for details:

           

          http://www.vmware.com/pdf/vi3_server_config.pdf

          • 2. Re: Create local VMFS volume after install ....
            DonalB Hot Shot

            JMcdonald,

             

            Thanks for the pointer however have tried this and it's not working. When I first tried this it wouldn't even show the local scsi disk, it just came up blank, and I knew there was 430Gb free on it! I figured this might be because I had a vmfs3 and a vmkcore partition on there already so I deleted those via the cli. rebooted to allow the kernel to see the new partition table, and then I got the option to select the local disk. However when I tried to create a VMFS3 volume or even the vmkcore volume I get the following error from the VIC:

             

            Error during the configuration of the host: Failed to update disk partition information

             

            Cheers

            DB

            • 3. Re: Create local VMFS volume after install ....
              KnowItAll Hot Shot

              Step #1 Run fdisk -l and find the partition that you want to format with VMFS3.

               

              Step #2 Then run esxcfg-vmhbadevs -l to see which vmhba devices is mapped to the partion in step #1

               

              Step #3 run vmkfstools -C vmfs3 -S "vmkfs volume name" vmhba#_from_step#2

               

              Step #4 rescan in VI Client and watch your new vmfs volume show up.

              1 person found this helpful
              • 4. Re: Create local VMFS volume after install ....
                DonalB Hot Shot

                esxcfg-vmhbadevs -l isn't a valid command, maybe you meant -m although that only lists mappings for the volume created during install not the one I've manually created. Here's my partition table:

                 

                \[root@host1 root]# fdisk -l

                 

                Disk /dev/sda: 587.2 GB, 587257085952 bytes

                255 heads, 63 sectors/track, 71396 cylinders

                Units = cylinders of 16065 * 512 = 8225280 bytes

                 

                   Device Boot    Start       End    Blocks   Id  System

                /dev/sda1   *         1        26    208813+  83  Linux

                /dev/sda2            27       418   3148740   83  Linux

                /dev/sda3           419       549   1052257+  82  Linux swap

                /dev/sda4           550     71396 569078527+   f  Win95 Ext'd (LBA)

                /dev/sda5           550     13603 104856223+  fb  Unknown

                /dev/sda6         13604     13929   2618563+  83  Linux

                /dev/sda7         13930     14060   1052226   83  Linux

                /dev/sda8         14061     14191   1052226   83  Linux

                /dev/sda9         14192     71376 459338481   fb  Unknown

                 

                 

                /dev/sda5 is the volume created during install, /dev/sda9 is one I;ve manualy created using fdisk. Here's the output of esxcfg-vmhbadevs -m :

                 

                \[root@host1 root]# esxcfg-vmhbadevs -m

                vmhba0:0:0:5        /dev/sda5           45320267-c814b6f1-659d-000e0cb10b10

                 

                Must be something I'm missing here, how do you have the vmkernel recognise a valid partition for formatting, is there some LVM stuff going on here?

                 

                Thanks

                Donal

                • 5. Re: Create local VMFS volume after install ....
                  DonalB Hot Shot

                  OK, think I've got it sorted. Was using the wrong syntax for vmkfstools yesterday I think which is why I ended up getting knotted!

                  I just tried

                  vmkfstools -C vmfs3 -S local vmhba0:0:0:9

                  and hey presto I got a new vmfs volume. I'll have to try this on another host just to be sure but think I have it licked now. Had to recreate vmkcore using fdisk, create partition, set partition id to fc and then

                  esxcfg-dumpart -s vmhba0:0:0:10 to set it

                  esxcfg-dumpart -a vmhba0:0:0:10 to activate it

                   

                  Still think it's a bit poor that i couldn't do this from the VIC, as I said I;m comfortable enough at the cli but there's quite a few who aren't.

                   

                  thanks for the help

                  Donal

                  • 6. Re: Create local VMFS volume after install ....
                    fbuono Novice

                    Hi

                     

                    At step #3, I receive the error message "error: device or resource is busy"

                     

                    I did exactly what you wrote so I don't know what is the problem...

                    Could you please help me?

                     

                    Thanks

                     

                    #Update#

                    I try to add the LUn should be vmhba0:0:0:8 but I can't see it in /vmfs/devices/disks/

                    Maybe there is something wrong before doing the third step...

                    Any idea please?

                     

                    Message was edited by:

                            fbuono

                    • 7. Re: Create local VMFS volume after install ....
                      stevermoker Novice

                      I ran into the same issue with the disk busy error message. Try changing  partition type to fb instead of fc before you run vmkfstools.  After making the change using fdisk I was able to create the vmfs3 volume.