The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,570 other followers

Archive for the ‘ESXi5.1’ Category

Some wizardry: vmkfstools | virtualhobbit

Posted by jpluimers on 2019/05/24

Some wizardry: [WayBack] vmkfstools | virtualhobbit.

This includes:

  • finding which VMFS partitions are there the hard way
  • initialising partitions from known good data
  • vmkfstools -V¬†(yes, capital V¬†is for VMFS rescan, as lowercase v¬†is for verbose)

Found after reading [WayBack] Datastore not mounted after reboot of ESXi5.5 |VMware Communities

Then found this:

That solved my problem!

# esxcfg-volume --list
Scanning for VMFS-3/VMFS-5 host activity (512 bytes/HB, 2048 HBs).
VMFS UUID/label: 532cd010-6e8c01d1-45be-001f29022aed/Raid6SSD
Can mount: Yes
Can resignature: Yes
Extent name: naa.600605b00aa054a0ff000021022683ae:1 range: 0 - 1830143 (MB)
# esxcfg-volume --mount 532cd010-6e8c01d1-45be-001f29022aed
Mounting volume volume 532cd010-6e8c01d1-45be-001f29022aed

And there it was:

# df -h
Filesystem   Size   Used Available Use% Mounted on
...
VMFS-5       1.7T   1.6T    169.6G  91% /vmfs/volumes/Raid6SSD
...

Note you can mount non-persistent (--mount) or persistent (--persistent-mount) by both UUID and label, so there are four choices for mounting:

esxcfg-volume --mount UUID
esxcfg-volume --mount label
esxcfg-volume --persistent-mount UUID
esxcfg-volume --persistent-mount label

–jeroen

Posted in ESXi5, ESXi5.1, ESXi5.5, ESXi6, ESXi6.5, Power User, Virtualization, VMware, VMware ESXi | Leave a Comment »

VMFS metadata files

Posted by jpluimers on 2019/05/09

For my own ference:

disk space under VMFS-3 is organized according to four resource types. They are : blocks, sub-blocks, pointer blocks, and file descriptors. Resources are grouped into clusters, which form cluster groups. Every resource type is administered by one or a number of system files. Lets have a look at what those abbreviated file names stand for:

  • fbb.sf = file block bitmap.sf
  • fdc.sf = file descriptor cluster.sf
  • pbc.sf = pointer block cluster.sf
  • sbc.sf = sub-block cluster.sf
  • vh.sf = volume header.sfs
  • dd.sf = scsi device description.sf

The VMFS-5 uses one more system file:

  • pb2.sf = pointer block 2.sf

Source: [Archive.is] VMFS metadata files

Posted in ESXi4, ESXi5, ESXi5.1, ESXi5.5, ESXi6, ESXi6.5, Power User, Virtualization, VMware, VMware ESXi | Leave a Comment »

ESXi: console commands to digging through your hba/disk/datastore configuration

Posted by jpluimers on 2019/05/07

Two posts with interesting commands to help digging through your hba/disk/datastore configurations from the console:

One day I will write a script that – per datastore – lists all the devices related to it including their HBA and LUN.

For that, I will likely need these references:

For now this works:

  • Get the list of data stores (note the Device Name column has the NAA_ID you need below):
    esxcli storage vmfs extent list
  • Get the path information to find HBA, Channel, Target and LUN:
    esxcli storage core path list --device NAA_ID
  • Get the list of HBAs:
    esxcli storage core adapter list
  • Get device details (including Model and Revision):
    esxcli storage core device list --device NAA_ID

The example below (with most important output bolded) shows a drive connected to a SAS3008 based controller which storcli cannot access (nor MegaCli), but MegaRAID Storage Manager (MSM) can.

MSM allowed me to find the serial number of the drive by the Target Transport Details value 4433221106000000 as being on Slot number 6 (which seems to indicate Target numbers are 1-based whereas LUN is 0-based).

# esxcli storage vmfs extent list
Volume Name                     VMFS UUID                            Extent Number  Device Name                                                                 Partition
------------------------------  -----------------------------------  -------------  --------------------------------------------------------------------------  ---------
...
ST6000VX0001-1SH                59a33f7b-66df7c00-11b0-0cc47aaa9742              0  naa.5000c50087762d1b                                                                1
# esxcli storage core path list -d naa.5000c50087762d1b 
sas.500304801ce1d700-sas.4433221106000000-naa.5000c50087762d1b
   UID: sas.500304801ce1d700-sas.4433221106000000-naa.5000c50087762d1b
   Runtime Name: vmhba0:C0:T7:L0
   Device: naa.5000c50087762d1b
   Device Display Name: Local ATA Disk (naa.5000c50087762d1b)
   Adapter: vmhba0
   Channel: 0
   Target: 7
   LUN: 0
   Plugin: NMP
   State: active
   Transport: sas
   Adapter Identifier: sas.500304801ce1d700
   Target Identifier: sas.4433221106000000
   Adapter Transport Details: 500304801ce1d700
   Target Transport Details: 4433221106000000
   Maximum IO Size: 4194304
# esxcli storage core adapter list
HBA Name  Driver        Link State  UID                   Capabilities  Description                                                           
--------  ------------  ----------  --------------------  ------------  ----------------------------------------------------------------------
vmhba0    lsi_msgpt3    link-n/a    sas.500304801ce1d700                (0000:01:00.0) Avago (LSI Logic) Fusion-MPT 12GSAS SAS3008 PCI-Express
...
vmhba32   vmkusb        link-n/a    usb.vmhba32                         () USB  
# esxcli storage core device list --device naa.5000c50087762d1b 
naa.5000c50087762d1b
   Display Name: Local ATA Disk (naa.5000c50087762d1b)
   Has Settable Display Name: true
   Size: 5723166
   Device Type: Direct-Access 
   Multipath Plugin: NMP
   Devfs Path: /vmfs/devices/disks/naa.5000c50087762d1b
   Vendor: ATA     
   Model: ST6000VX0001-1SH
   Revision: VN02
   SCSI Level: 6
   Is Pseudo: false
   Status: on
   Is RDM Capable: true
   Is Local: true
   Is Removable: false
   Is SSD: false
   Is VVOL PE: false
   Is Offline: false
   Is Perennially Reserved: false
   Queue Full Sample Size: 0
   Queue Full Threshold: 0
   Thin Provisioning Status: unknown
   Attached Filters: 
   VAAI Status: unsupported
   Other UIDs: vml.02000000005000c50087762d1b535436303030
   Is Shared Clusterwide: false
   Is Local SAS Device: true
   Is SAS: true
   Is USB: false
   Is Boot USB Device: false
   Is Boot Device: false
   Device Max Queue Depth: 32
   No of outstanding IOs with competing worlds: 32
   Drive Type: physical
   RAID Level: NA
   Number of Physical Drives: 1
   Protection Enabled: false
   PI Activated: false
   PI Type: 0
   PI Protection Mask: NO PROTECTION
   Supported Guard Types: NO GUARD SUPPORT
   DIX Enabled: false
   DIX Guard Type: NO GUARD SUPPORT
   Emulated DIX/DIF Enabled: false

–jeroen

Posted in ESXi5, ESXi5.1, ESXi5.5, ESXi6, ESXi6.5, Power User, Virtualization, VMware, VMware ESXi | Leave a Comment »

bash – aliasing cd to pushd – is it a good idea? – Unix & Linux Stack Exchange

Posted by jpluimers on 2019/04/30

On my research list: [WayBack] bash Рaliasing cd to pushd Рis it a good idea? РUnix & Linux Stack Exchange

It has a nice discussion on complements to pushd/popd/cd/dirs including a very nice set of navd scripts that eases the navigation of the directory stack.

I found it because the ESXi busybox¬†does not have pushd¬†and popd¬†and a cd¬†won’t work from inside a shell script:¬†[WayBack]¬†linux – Why doesn’t “cd” work in a bash shell script? – Stack Overflow

It also made me find out that the ESXi busybox¬†does support cd -¬†to go to the previous directory. More info on that cd¬†syntax is at¬†[WayBack] bash – Difference between “cd -” and “cd ~-” – Unix & Linux Stack Exchange

–jeroen

Posted in *nix, bash, Development, ESXi5, ESXi5.1, ESXi5.5, ESXi6, ESXi6.5, Power User, Scripting, Software Development, Virtualization, VMware, VMware ESXi | Leave a Comment »

lamw/ghettoVCB: ghettoVCB

Posted by jpluimers on 2019/04/29

I found out that I had some very old draft notes below, but since then the source has moved to github: lamw/ghettoVCB: ghettoVCB.

Since I find VIB easier to use than the Offline Bundle (for differences see [WayBack] VIB vs. Offline Bundle and [WayBack] VMware Front Experience: ESXi Community Packaging Tools) these are the VIB steps to get it installed:

  1. Download https://github.com/lamw/ghettoVCB/raw/master/vghetto-ghettoVCB.vib
  2. Put it in the /tmp directory on your ESXi box (using for instance FileZilla, WinSCP, SCP or other tools)
  3. Install it using esxcli software vib install -v /tmp/vghetto-ghettoVCB.vib -f

Then use it to make backups or restores as described at:

Note that contrary to the documentation, the config file has moved to /etc/ghettovcb/ghettoVCB.conf.

Because of Keeping your root visorfs clean: point the path to your own binaries stored on a vmfs volume¬†I’m using a copy of that stored in my local-bin¬†directory (which is backed-up by rsync to another disk) and a small ghettoVcb.sh¬†bootstrap script referencing that config-file, so the backup command for one command now is this:

ghettoVcb.sh -m diaspore.opensuse-Tumbleweed-x64

or this for all VMs (about 2 hours from NVME SSD to HDD; will probably make this a 2 stage thing):

ghettoVcb.sh -a

VMs are backed-up under the directory specified in VM_BACKUP_VOLUME(below that’s ./) in a schema like this:

./diaspore.opensuse-Tumbleweed-x64
./diaspore.opensuse-Tumbleweed-x64/diaspore.opensuse-Tumbleweed-x64-2017-09-24_16-07-08
./diaspore.opensuse-Tumbleweed-x64/diaspore.opensuse-Tumbleweed-x64-2017-09-24_16-07-08/diaspore.opensuse-Tumbleweed-x64.vmx
./diaspore.opensuse-Tumbleweed-x64/diaspore.opensuse-Tumbleweed-x64-2017-09-24_16-07-08/diaspore.opensuse-Tumbleweed-x64-flat.vmdk
./diaspore.opensuse-Tumbleweed-x64/diaspore.opensuse-Tumbleweed-x64-2017-09-24_16-07-08/diaspore.opensuse-Tumbleweed-x64.vmdk
./diaspore.opensuse-Tumbleweed-x64/diaspore.opensuse-Tumbleweed-x64-2017-09-24_16-07-08/STATUS.ok

In the future, I might move to an NFS based back-up based on these links:

–jeroen

Very old notes:

 

–jeroen

Posted in ESXi4, ESXi5, ESXi5.1, ESXi5.5, ESXi6, ESXi6.5, Power User, Virtualization, VMware, VMware ESXi | Leave a Comment »

 
%d bloggers like this: