• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Yellow Bricks

by Duncan Epping

  • Home
  • Unexplored Territory Podcast
  • HA Deepdive
  • ESXTOP
  • Stickers/Shirts
  • Privacy Policy
  • About
  • Show Search
Hide Search

Create VMFS volumes from the command-line

Duncan Epping · Dec 15, 2008 ·

I just had to create a couple VMFS volumes from the command-line on a local disk. It’s pretty straight forward but I needed to document it anyway, here it is:

  1. fdisk -l (check what the last partition is)
  2. fdisk /dev/sda
  3. n (new)
  4. default (start block)
  5. default (end block)
  6. t (partition type)
  7. 10 (partition 10, just created)
  8. fb (vmfs type)
  9. w (write config)
  10. reboot (Reboot the host before you format the newly created local partition)
  11. vmkfstools -C vmfs3 /vmfs/devices/disks/vmhba0:0:0:10
  12. Go to VI Client, Refresh storage view and rename the newly created volume
You can align the VMFS volume as follows, before you do step 9:
  1. X
  2. b
  3. 1
  4. 128 (disk alignment, check your SAN manual for the correct value, 128 is correct in most cases…)
  5. W

Related

Server ESX, service console, Storage

Reader Interactions

Comments

  1. brugh says

    15 December, 2008 at 10:58

    you may want to mention that creating partitions from the cmdline requires manual aligning. vCenter does this for you but doing this with fdisk you have to set the startingblock of a parition to a multiple of 128 to align it on a 64k block.

  2. Duncan Epping says

    15 December, 2008 at 11:01

    Absolutely correct Herco… Will update is asap.

  3. JackMeHoffer says

    15 December, 2008 at 15:13

    Why do you have to reboot the host?

  4. Duncan Epping says

    15 December, 2008 at 15:29

    it’s a requirement of the Service Console unfortunately.

  5. Hugo Strydom says

    15 December, 2008 at 17:37

    Interesting, you only have to reboot if you add partions on /dev/sda. If create partions on /sdb,c,d, ect you dont need to.

  6. Roger Lund says

    15 December, 2008 at 18:44

    Thanks for this, I was asking about this last week.

    Roger L

    http://rogerlunditblog.blogspot.com/

  7. Cody Bunch says

    16 December, 2008 at 17:45

    Cool!

  8. Effie Matzen says

    22 June, 2012 at 20:15

    Hello.This article was really motivating, particularly because I was searching for thoughts on this issue last Friday.

Primary Sidebar

About the Author

Duncan Epping is a Chief Technologist and Distinguished Engineering Architect at Broadcom. Besides writing on Yellow-Bricks, Duncan is the co-author of the vSAN Deep Dive and the vSphere Clustering Deep Dive book series. Duncan is also the host of the Unexplored Territory Podcast.

Follow Us

  • X
  • Spotify
  • RSS Feed
  • LinkedIn

Recommended Book(s)

Advertisements




Copyright Yellow-Bricks.com © 2025 · Log in