The Wiert Corner – irregular stream of stuff

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

  • My work

  • My badges

  • Twitter Updates

  • My Flickr Stream

    20140508-Delphi-2007--Project-Options--Cannot-Edit-Application-Title-HelpFile-Icon-Theming

    20140430-Fiddler-Filter-Actions-Button-Run-Filterset-now

    20140424-Windows-7-free-disk-space

    More Photos
  • Pages

  • All categories

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

    Join 1,715 other followers

Archive for the ‘VMware’ Category

how to resize (grow) device partition of a multi-device BTRFS filesystem?

Posted by jpluimers on 2016/11/11

To grow you must first change the size of the container: the partition, the LV, or arraydevice. Then you can resize the file system. It’s the same with XFS, and NTFS. I’m only aware of Apple’sdiskutil resizevolume command that resizes the flavors of HFS+ and at the same time sets the new end valuefor the partition entry.

Source: Development of the BTRFS linux file system (not yet archived at the WayBack machine)

I will need the above for a single disk device having a BTRFS partition sandwiched between a swap and xfs partition:

# parted -l
Model: VMware Virtual disk (scsi)
Disk /dev/sda: 21.5GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 

Number  Start   End     Size    Type     File system     Flags
 1      1049kB  1562MB  1561MB  primary  linux-swap(v1)  type=82
 2      1562MB  17.7GB  16.1GB  primary  btrfs           boot, type=83
 3      17.7GB  21.5GB  3799MB  primary  xfs             type=83

I’ll likekly be:

  1. extend the disk inin ESXi
  2. use gparted to move the xfs partition to the end of the disk
  3. use gparted to extend the btrfs partition
  4. use btrfs to extend the volume inside the btrfs partition

I might be able to do all this from the gparted live CD as moving xfs and growing btrfs is on the GParted — Features list.

Fingers crossed. Luckily I’ve backups (:

–jeroen

Posted in Power User, *nix, ESXi4, VMware, VMware ESXi, Linux, ESXi5, SuSE Linux, ESXi5.1, ESXi5.5, ESXi6, openSuSE, Tumbleweed | Leave a Comment »

Determine TBW from SSDs with S.M.A.R.T Values in ESXi (smartctl) | Virten.net

Posted by jpluimers on 2016/10/31

On my research list: Determine TBW from SSDs with S.M.A.R.T Values in ESXi (smartctl) | Virten.net

Via Matthijs ter Woord.

–jeroen

Posted in ESXi6, Power User, Virtualization, VMware, VMware ESXi | 1 Comment »

FileZilla on Windows is waaaay faster than WinSCP

Posted by jpluimers on 2016/10/21

Not sure why yet, but on a gigabit network between a Windows 2008 R2 Server and a Proxmox KVM machine, WinSCP gets around 10 megabit/second and FileZilla > 30 megabit/second.

Others seem to agree that filezilla faster than winscp.

–jeroen

Posted in Communications Development, Development, Internet protocol suite, Power User, Proxmox, SSH, TCP, Virtualization, VMware, Windows, Windows Server 2008, Windows Server 2008 R2 | 1 Comment »

VMware ESXi – converting a thick disk to a thin disk – via: Server Fault

Posted by jpluimers on 2016/10/17

There are various places that tell you you cannot resize a thick disk to a thin disk using vmkfstools.

When you do it wrong, you get this error:

DiskLib_Check() failed for source disk. The file specified is not a virtual disk (15).

This happens when you directly try to resize the physical disk image:

# vmkfstools -i msmxp-flat.vmdk -d thin msmxp-flat.thin.vmdk
DiskLib_Check() failed for source disk The file specified is not a virtual disk (15).

Whereas you should point vmkfstools to the disk descriptor file which has the shortest name:

# vmkfstools -i msmxp.vmdk -d thin msmxp.thin.vmdk
Destination disk format: VMFS thin-provisioned
Cloning disk 'msmxp.vmdk'...
Clone: 100% done.

For performance, it doesn’t matter much if your disk is thick or thin as explained by Death to false myths: The type of virtual disk used determines your performance.

But various people issues expanding a thick disk. With thin disks, that usually works fine.

This post explains the correct steps of resizing: VMWare ESXi 5.1–convert virtual disk (vmdk) from thick to thin provision.

Here is a summary:

Step zero: shutdown the VM and ensure you have a backup!

For instance with rsync is great for making a local backup:

# time ./850EVO1TBR1B/bin/rsync -aiv --info=progress2 --progress ./850EVO1TBR1B/Raid6SSD-VM/msmxp/ ./850EVO1TBR1A/Raid6SSD-VM/msmxp/

Step one: show the disk files:

/vmfs/volumes/552f5788-33e30274-8dba-001f29022aed/Raid6SSD-VM/msmxp # du -h *.vmdk
12.0G   msmxp-flat.vmdk
0   msmxp.vmdk

There are two: msmxp.vmdk describes the disk and msmxp-flat.vmdk has the data.

Step two: ensure you have enough free space on the volume:

# ls -al /vmfs/volumes | grep "552f5788-33e30274-8dba-001f29022aed"
drwxr-xr-t    1 root     root          2660 Aug  5 04:35 552f5788-33e30274-8dba-001f29022aed
lrwxr-xr-x    1 root     root            35 Aug  5 06:11 850EVO1TBR1B -> 552f5788-33e30274-8dba-001f29022aed
# df -h | grep "850EVO1TBR1B\|Use%"
Filesystem   Size   Used Available Use% Mounted on
VMFS-5     930.8G 736.8G    194.0G  79% /vmfs/volumes/850EVO1TBR1B

Convert the disk (you can replace -d with --diskformat):

# vmkfstools -i msmxp.vmdk -d thin msmxp.thin.vmdk
Destination disk format: VMFS thin-provisioned
Cloning disk 'msmxp.vmdk'...
Clone: 100% done.

Observe the size (in my case the flat disk was almost full and fragmented, so the thin disk is not smaller):

/vmfs/volumes/552f5788-33e30274-8dba-001f29022aed/Raid6SSD-VM/msmxp # du -h *.vmdk
12.0G   msmxp-flat.vmdk
12.0G   msmxp.thin-flat.vmdk
0   msmxp.thin.vmdk
0   msmxp.vmdk

Rename both disks using vmkfstools (do not use mv as that will not keep the descriptor/data vmdk files bound together) and check the rename.

You can replace -E with --renamevirtualdisk:

/vmfs/volumes/552f5788-33e30274-8dba-001f29022aed/Raid6SSD-VM/msmxp # vmkfstools -E msmxp.vmdk msmxp.thick.vmdk
/vmfs/volumes/552f5788-33e30274-8dba-001f29022aed/Raid6SSD-VM/msmxp # vmkfstools --renamevirtualdisk msmxp.thin.vmdk msmxp.vmdk
/vmfs/volumes/552f5788-33e30274-8dba-001f29022aed/Raid6SSD-VM/msmxp # du -h *.vmdk
12.0G   msmxp-flat.vmdk
12.0G   msmxp.thick-flat.vmdk
0   msmxp.thick.vmdk
0   msmxp.vmdk

Turn on the Virtual Machine to verify it still works.

If it does, then delete it (you can replace -U with --deletevirtualdisk) which will remove both both the descriptor and data vmdk file:

/vmfs/volumes/552f5788-33e30274-8dba-001f29022aed/Raid6SSD-VM/msmxp # vmkfstools -U msmxp.vmdk 
/vmfs/volumes/552f5788-33e30274-8dba-001f29022aed/Raid6SSD-VM/msmxp # du -h *.vmdk
12.0G   msmxp-flat.vmdk
0   msmxp.vmdk

After shutting down the VM again and making a new backup, you can now expand the disk as described in VMware KB: Adding space to an ESXi/ESX host virtual disk. You can replace -X with --extendvirtualdisk.

/vmfs/volumes/552f5788-33e30274-8dba-001f29022aed/Raid6SSD-VM/msmxp # vmkfstools -X 14G msmxp.vmdk 
Grow: 100% done.
/vmfs/volumes/552f5788-33e30274-8dba-001f29022aed/Raid6SSD-VM/msmxp # du -h *.vmdk
12.0G   msmxp-flat.vmdk
0   msmxp.vmdk


/vmfs/volumes/552f5788-33e30274-8dba-001f29022aed/Raid6SSD-VM/msmxp # vmkfstools -E msmxp.vmdk msmxp.thick.vmdk
/vmfs/volumes/552f5788-33e30274-8dba-001f29022aed/Raid6SSD-VM/msmxp # vmkfstools -i msmxp.thick.vmdk msmxp.vmdk -d thin
Destination disk format: VMFS thin-provisioned
Cloning disk 'msmxp.thick.vmdk'...
Clone: 100% done.
/vmfs/volumes/552f5788-33e30274-8dba-001f29022aed/Raid6SSD-VM/msmxp # diff msmxp.thick.vmdk msmxp.vmdk
--- msmxp.thick.vmdk
+++ msmxp.vmdk
@@ -7,18 +7,18 @@
 createType="vmfs"
 
 # Extent description
-RW 29360128 VMFS "msmxp.thick-flat.vmdk"
+RW 29360128 VMFS "msmxp-flat.vmdk"
 
 # The Disk Data Base 
 #DDB
 
-ddb.adapterType = "ide"
-ddb.thinProvisioned = "1"
-ddb.geometry.sectors = "63"
-ddb.geometry.heads = "16"
-ddb.geometry.cylinders = "29127"
-ddb.uuid = "60 00 C2 9f 5e f8 33 76-6e c5 48 3c f2 84 d8 1e"
-ddb.longContentID = "5659579edebed2ebdd8e0c8fda15abd4"
 ddb.toolsVersion = "9221"
 ddb.virtualHWVersion = "8"
 ddb.deletable = "true"
+ddb.longContentID = "5659579edebed2ebdd8e0c8fda15abd4"
+ddb.uuid = "60 00 C2 95 66 1b cf 7a-e3 db 3f 30 17 7e 00 2d"
+ddb.geometry.cylinders = "29127"
+ddb.geometry.heads = "16"
+ddb.geometry.sectors = "63"
+ddb.thinProvisioned = "1"
+ddb.adapterType = "ide"
/vmfs/volumes/552f5788-33e30274-8dba-001f29022aed/Raid6SSD-VM/msmxp # du -h *.vmdk
12.0G   msmxp-flat.vmdk
12.0G   msmxp.thick-flat.vmdk
0   msmxp.thick.vmdk
0   msmxp.vmdk
/vmfs/volumes/552f5788-33e30274-8dba-001f29022aed/Raid6SSD-VM/msmxp # vmkfstools -X 14G msmxp.vmdk
Failed to extend disk : One of the parameters supplied is invalid (1).
/vmfs/volumes/552f5788-33e30274-8dba-001f29022aed/Raid6SSD-VM/msmxp # vmkfstools -X 14G msmxp.vmdk
Failed to extend disk : One of the parameters supplied is invalid (1).
/vmfs/volumes/552f5788-33e30274-8dba-001f29022aed/Raid6SSD-VM/msmxp # vmkfstools -X 14G msmxp.vmdk
Failed to extend disk : One of the parameters supplied is invalid (1).
/vmfs/volumes/552f5788-33e30274-8dba-001f29022aed/Raid6SSD-VM/msmxp # vmkfstools -X 15G msmxp.vmdk
Grow: 100% done.
/vmfs/volumes/552f5788-33e30274-8dba-001f29022aed/Raid6SSD-VM/msmxp # du -h *.vmdk
12.0G   msmxp-flat.vmdk
12.0G   msmxp.thick-flat.vmdk
0   msmxp.thick.vmdk
0   msmxp.vmdk
/vmfs/volumes/552f5788-33e30274-8dba-001f29022aed/Raid6SSD-VM/msmxp # vmkfstools -U msmxp.thick.vmdk 
/vmfs/volumes/552f5788-33e30274-8dba-001f29022aed/Raid6SSD-VM/msmxp # du -h *.vmdk
12.0G   msmxp-flat.vmdk
0   msmxp.vmdk
/vmfs/volumes/552f5788-33e30274-8dba-001f29022aed/Raid6SSD-VM/msmxp # 

–jeroen

via: vmware esxi – vmkfstools returns error when trying to copy thin vmdk – Server Fault.

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

SysInternals sdelete: zero wipe free space is called -z instead of -c

Posted by jpluimers on 2016/09/20

In the 2009 past, sdelete used the -c parameter to zero wipe clean a hard drive and -z would clean it with a random pattern.

That has changed. Somewhere along the lines, -c and -z has swapped meaning which I didn’t notice.

This resulted in many of my virtual machines image backups were a lot larger than they needed to be.

The reason is that now:

  • -c does a clean free space with a random DoD conformant pattern (which does not compress well)
  • -z writes zeros in the free space

Incidently, -c is a lot slower than -z as well.

TL;DR: use this command

sdelete -z C:

Where C: is the drive to zero clean the free space.

–jeroen

Posted in Batch-Files, Development, Fusion, Hyper-V, Power User, Proxmox, Scripting, sdelete, Software Development, SysInternals, View, VirtualBox, Virtualization, VMware, VMware ESXi, VMware Workstation, Windows | Leave a Comment »

 
%d bloggers like this: