VMware Cloud Community
krishnaprasad
Hot Shot
Hot Shot

Extending VMFS via command line

Hi, This is regarding extending the VMFS file system using command line ( probably vim-cmd command )

This is the setup i have. I have 2 LUNs. I have ESXi installed on first LUN and there is a VMFS partition created in the first LUN.

I need to extent that VMFS size by adding the second LUN to it. I know i can do that from the VIClient. But i need to do this using command line.

I have seen couple of commands w.r.t vim-cmd ... Here are the ones that i saw but it shows errors w.r.t parameter passing

~ # vim-cmd /hostsvc/storage/vmfs_attach_extent datastore1 /dev/disks/naa.600188b0309c76001463b23a6d6da9ed 3

(vmodl.fault.InvalidArgument) {

dynamicType = ,

msg = "A specified parameter was not correct.

",

}

Where datastore1 is the name of the first LUN. /dev/disks/naa.600188b0309c76001463b23a6d6da9ed is the second LUN and 3 is the partition number of VMFS residing in first LUN.

Could someone help w.r.t this?

Reply
0 Kudos
4 Replies
VTsukanov
Virtuoso
Virtuoso

krishnaprasad
Hot Shot
Hot Shot

Thank you..vmkfstools works fine... I am still keeping the thread open to see if any one known how this can be done using vim-cmd command.

Thank you for the help !

Reply
0 Kudos
VTsukanov
Virtuoso
Virtuoso

.... using vim-cmd command

Try to use:

vmware-vim-cmd hostsvc/datastore/vmfs_extend name devId

Reply
0 Kudos
krishnaprasad
Hot Shot
Hot Shot

hello VTsukanov,

I had tried that as well. But looks like i am missing something here

~ # vim-cmd /hostsvc/datastore/vmfs_extend datastore2 /dev/disks/naa.600188b0309c760014f8e43c2bed1ea8\:2

Not initialized: vim.host.ScsiDisk.Partition[] extent

~ #

In the above example, datastore2 is my VMFS datastore already configured and /dev/disks/naa.600188b0309c760014f8e43c2bed1ea8\:2 is the new partition of type 'fb' ( VMFS ) .

But when i tried to extend datastore2, it says "not initialized"... do you see any items missing here?

Reply
0 Kudos