VMware Cloud Community
novicesx
Contributor
Contributor
Jump to solution

How to add SAN luns in ESX from CLI?

Hello folks,

I work for an implementation engineering team, where our tasks involve building about 15 Clusters a month.

As part of build tasks, we end up consuming more time adding the SAN Luns into the ESX servers all running ESX 4.1 through the VC.

I understand that the vmkfstools command could help us create a vmfs3 partition on the LUN, but when I do that it asks me to set the partition to 0xfb and I believe that we should use the parted utility to do that.

I am unable to set that using a single command. My aim to is to put these commands in a script to speed up the work.

presented.png

I am also unsure, if the list of LUNs I see in the ESX server terminal session is the same as the one I see in the VCenter. How can I do that?


Comparing the two screenshots, I see an additional LUN from the terminal session

disklist.png

Would really appreciate any help in this regards.

Thanks in advance

Tags (4)
0 Kudos
1 Solution

Accepted Solutions
arturka
Expert
Expert
Jump to solution

Hi

Take have a look at the link below

http://www.virtu-al.net/2009/08/28/powercli-mass-provision-datastores/

And if you are working in engineering team I would recommend to get familiar with PowerCLI, very very powerful tool

BTW, as far as I remember if you would used vmkfstool for VMFS creation, datastores will not be aligned to LUN chunks which might cause storage I/O performance degradation

www.vmware.com/pdf/esx3_partition_align.pdf

VCDX77 My blog - http://vmwaremine.com

View solution in original post

0 Kudos
2 Replies
john23
Commander
Commander
Jump to solution

use fdisk in this way:

example

fdisk /dev/sda < test.in

in test.in

n

p

1

t

fb

w

then call for vmkfstools.

hope it should work

Thanks -A Read my blogs: www.openwriteup.com
arturka
Expert
Expert
Jump to solution

Hi

Take have a look at the link below

http://www.virtu-al.net/2009/08/28/powercli-mass-provision-datastores/

And if you are working in engineering team I would recommend to get familiar with PowerCLI, very very powerful tool

BTW, as far as I remember if you would used vmkfstool for VMFS creation, datastores will not be aligned to LUN chunks which might cause storage I/O performance degradation

www.vmware.com/pdf/esx3_partition_align.pdf

VCDX77 My blog - http://vmwaremine.com
0 Kudos