VMware Cloud Community
timcwhite
Contributor
Contributor
Jump to solution

Create a VMFS partition

Good Morning,

I installed ESX 3 on a few machines but did not specify a vmfs partition on the local machine because the server will have SAN attached storage. Until this happens I'd like to begin testing using local storage. I can't seem to configure a local VMFS 3 partition via VirtualCenter. I keep getting the following error: Error during the configuration of the host: Failed to update disk partition information.

How can I go about installing a vmfs 3 partition on the local machine.

Thanks,

Tim

0 Kudos
1 Solution

Accepted Solutions
TomHowarth
Leadership
Leadership
Jump to solution

if you want to get deep and personal with a couple of Linux and ESX commands you can do the following read this document copies here in full.

The basic process can be found here.. However this is not helpful if someone does not know Linux very well.

This is a step by step process.

1. Log on to the console or use putty to connect to the ESX host remotely. If you have not created a user for yourself you will not be able to log in through putty.

2. SU to root. This must be done using the su - root command. If you do not use the - then you will not get root's path and thus get error messages that say that commands cannot be found.

3. Run fdisk -l. This will give you a list of all of your current partitions. This is important because they are numbered. If you are using SCSI you should see that all partitions start with /dev/sda# where # is a number from 1 to what ever. Remember this list of number as you are going to be adding at least one more and will have to refer to the new partition by it's number.

4. Run fdisk /dev/sda. This will allow you to create a partition on the the first drive. If you have more than one SCSI drive (usually the case with more than one RAID container) then you will have to type the letter value for the device you wish to create the partition on (sdb, sdc, and so on).

5. You are now in the fdisk program. If you get confused type "m" for menu. This will list all of your options. There are a lot of them. You will be ignoring most of them.

6. Type "n". This will create a new partition. It will ask you for the starting cylinder. Unless you have a very good reason hit "enter" for default. The program will now offer you a second option that says ending cylinder. If you press enter you will select the rest of the space. In most cases this is what you want.

7. Once you have selected start and end cylinder you should get a success message. Now you must set the partition type or it's ID. This is option "t" on the menu.

8. Type "t". It will ask you for partition number. This is where that first fdisk is useful. You need to know what the new partition number is. It will be one more than the last number on fdisk. Type this number in.

9. You will now be prompted for the hex code for the partition type. You can also type "L" for a list of codes. The code you want is "fb". So type "fb" in the space. This will return that the partition has been changed to fb (unknown). That is what you want.

10. Now that you have configured everything you want to save it. To do so choose the "w" option to write the table to disk and exit.

11. Because the drive is being used by the console OS you will probably get an error that says "WARNING: Re-reading the partition table failed with error 16: device or resource busy." This is normal. You will need to reboot.

12. To reboot the server type "reboot" or if you are old school shutdown -r now at the prompt.

13. Once you have rebooted you can now format the partition VMFS. DO NOT do this from the GUI. You must once again log into the console or remote in through putty.

14. Once you have su'd to root you must type in "vmkfstool -C vmfs3 /vmfs/device/disks/vmhba0:0:0:#" Were # is the number of the new partition. You shoulder now get a "successfully created new volume" message. If you get an error you probably chose the wrong partition. Do an fdisk - l and choose the number with the "unknown" partition type. Note: IF you have more than one SCSI disk or more than one container the first 0 may need to be a 1 as well.

15. Go to the GUI and in configuration/storage select refresh. You should now see your new VMFS volume.

alternatively it may be eaiser to reinstall and create the VMFS partition during installation. however you will learn more doing it this way

Tom Howarth

VMware Communities User Moderator

Tom Howarth VCP / VCAP / vExpert
VMware Communities User Moderator
Blog: http://www.planetvm.net
Contributing author on VMware vSphere and Virtual Infrastructure Security: Securing ESX and the Virtual Environment
Contributing author on VCP VMware Certified Professional on VSphere 4 Study Guide: Exam VCP-410

View solution in original post

0 Kudos
5 Replies
jamieorth
Expert
Expert
Jump to solution

If there is nothing on the host, why not rebuild and specify the vmfs partition then?

Regards...

Jamie

Remember, if it's not one thing, it's your mother...

0 Kudos
weinstein5
Immortal
Immortal
Jump to solution

I agree with Jamie - since there is nothing on these hosts I would rebuild the hosts and add a VMFS partition -

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
0 Kudos
TomHowarth
Leadership
Leadership
Jump to solution

if you want to get deep and personal with a couple of Linux and ESX commands you can do the following read this document copies here in full.

The basic process can be found here.. However this is not helpful if someone does not know Linux very well.

This is a step by step process.

1. Log on to the console or use putty to connect to the ESX host remotely. If you have not created a user for yourself you will not be able to log in through putty.

2. SU to root. This must be done using the su - root command. If you do not use the - then you will not get root's path and thus get error messages that say that commands cannot be found.

3. Run fdisk -l. This will give you a list of all of your current partitions. This is important because they are numbered. If you are using SCSI you should see that all partitions start with /dev/sda# where # is a number from 1 to what ever. Remember this list of number as you are going to be adding at least one more and will have to refer to the new partition by it's number.

4. Run fdisk /dev/sda. This will allow you to create a partition on the the first drive. If you have more than one SCSI drive (usually the case with more than one RAID container) then you will have to type the letter value for the device you wish to create the partition on (sdb, sdc, and so on).

5. You are now in the fdisk program. If you get confused type "m" for menu. This will list all of your options. There are a lot of them. You will be ignoring most of them.

6. Type "n". This will create a new partition. It will ask you for the starting cylinder. Unless you have a very good reason hit "enter" for default. The program will now offer you a second option that says ending cylinder. If you press enter you will select the rest of the space. In most cases this is what you want.

7. Once you have selected start and end cylinder you should get a success message. Now you must set the partition type or it's ID. This is option "t" on the menu.

8. Type "t". It will ask you for partition number. This is where that first fdisk is useful. You need to know what the new partition number is. It will be one more than the last number on fdisk. Type this number in.

9. You will now be prompted for the hex code for the partition type. You can also type "L" for a list of codes. The code you want is "fb". So type "fb" in the space. This will return that the partition has been changed to fb (unknown). That is what you want.

10. Now that you have configured everything you want to save it. To do so choose the "w" option to write the table to disk and exit.

11. Because the drive is being used by the console OS you will probably get an error that says "WARNING: Re-reading the partition table failed with error 16: device or resource busy." This is normal. You will need to reboot.

12. To reboot the server type "reboot" or if you are old school shutdown -r now at the prompt.

13. Once you have rebooted you can now format the partition VMFS. DO NOT do this from the GUI. You must once again log into the console or remote in through putty.

14. Once you have su'd to root you must type in "vmkfstool -C vmfs3 /vmfs/device/disks/vmhba0:0:0:#" Were # is the number of the new partition. You shoulder now get a "successfully created new volume" message. If you get an error you probably chose the wrong partition. Do an fdisk - l and choose the number with the "unknown" partition type. Note: IF you have more than one SCSI disk or more than one container the first 0 may need to be a 1 as well.

15. Go to the GUI and in configuration/storage select refresh. You should now see your new VMFS volume.

alternatively it may be eaiser to reinstall and create the VMFS partition during installation. however you will learn more doing it this way

Tom Howarth

VMware Communities User Moderator

Tom Howarth VCP / VCAP / vExpert
VMware Communities User Moderator
Blog: http://www.planetvm.net
Contributing author on VMware vSphere and Virtual Infrastructure Security: Securing ESX and the Virtual Environment
Contributing author on VCP VMware Certified Professional on VSphere 4 Study Guide: Exam VCP-410
0 Kudos
timcwhite
Contributor
Contributor
Jump to solution

Thank You, This is exactly what I was looking for. It would have been easier to rebuild the machine but I wouldn't learn anything.

Thanks to all who have replied to me. This is one of the best forums that I have used!

Tim

0 Kudos
TomHowarth
Leadership
Leadership
Jump to solution

If you found somebodies information useful it is nice to award points. it is not much but it shows willing especially when you have taken the time to mark the question as answered. when you reach the stage where you answer more questions than you ask. you will expect the questioner to do the same.

Tom Howarth

VMware Communities User Moderator

Tom Howarth VCP / VCAP / vExpert
VMware Communities User Moderator
Blog: http://www.planetvm.net
Contributing author on VMware vSphere and Virtual Infrastructure Security: Securing ESX and the Virtual Environment
Contributing author on VCP VMware Certified Professional on VSphere 4 Study Guide: Exam VCP-410
0 Kudos