Imagefile extended larger then physical disk space - bug?

Software-based VM-centric and flash-friendly VM storage + free version

Moderators: anton (staff), art (staff), Max (staff), Anatoly (staff)

Post Reply
mahy
Posts: 4
Joined: Tue Jun 18, 2019 7:10 pm

Fri Jul 19, 2019 1:44 pm

Hi there,

so today we experienced some interesting stuff, while extending an imagefile via powershell.
We're using the free version of Starwind VSA on vsphere in a two node scenario.
One Server has 1.82 TB physical Storage available. The starwind VM has two disks assigned, second one holds the image file and has a capacity of 1.77 TB.

We fire the following command, to extend the disk to maximum size:

Code: Select all

$device.ExtendDevice(153600) 
The command ran without any issues. When we inspected the new settings, is shows a new image file size of 1.89 TB, so arround 700MB larger the the physical space and around 120 GB larger than the assigned virtual disk. (see attachment).
Image Details
Image Details
image_details.png (31.99 KiB) Viewed 3232 times
Also the linux system reports:

Code: Select all

[root@vsan01-a StarWind]# ls -alh storage/mnt/disk1/SST1/ 
total 1.8T
drwxr-xr-x 2 root root   61 Jul 19 15:02 .
drwxr-xr-x 3 root root   18 Jun 18 21:24 ..
-rw-r--r-- 1 root root 4.0K Jul 19 15:02 SST1_HA.swdsk
-rw-r--r-- 1 root root 1.9T Jul 19 15:33 SST1.img
-rw-r--r-- 1 root root 4.0K Jul 19 15:02 SST1.swdsk
and

Code: Select all

[root@vsan01-a StarWind]# df -h /mnt/disk1
Filesystem      Size  Used Avail Use% Mounted on
/dev/sdb        1.8T  1.8T  6.3G 100% /mnt/disk1
storage_web_gui.png
storage_web_gui.png (13.96 KiB) Viewed 3232 times
While the system is running at the moment (luckily we have not extended the vmware datastore yet) i guess there will be serious issues, when starwind tries to write data behind the available space.

So i got two questions:
1) Is it possible to resize the imagefile (note, there was no data written on the new new "available" space yet and if not can we create a smaller image file on server 1 and the sync this to existing second node (This one has the same image sizes, but has 2.2TB Storage available)
2) Shouldn't the powershell api create an error, when there is an attempt to create a larger imagefile then space is available?

Kind regards
martin
Boris (staff)
Staff
Posts: 805
Joined: Fri Jul 28, 2017 8:18 am

Sun Jul 21, 2019 1:26 pm

StarWind VSAN is not capable of shrinking the disks. This is why you would need to perform data migration to the new disk you create on the larger node. When you move everything there and delete the oversized file, make sure to shutdown all VMs running on the StarWind based datastore, as iSCSI sessions will be interrupted at the moment of HA replica creation.
The answer to your second question is "Yes, it should check the storage capacity of the underlying storage before extending the disk size". This is why please collect the logs from both appliances and send them to me for the team to investigate the issue.
Thanks.
mahy
Posts: 4
Joined: Tue Jun 18, 2019 7:10 pm

Mon Jul 22, 2019 9:33 am

Hi,

we've already set up a new target with a new image file. This was done on both hosts, because the old image got extended to the wrong size on both hosts.Now it's working as expected.
Only downside is, that for the free version we had to mix up the powershell scripts because the CreateHA(two nodes) script seems to be broken at the moment.

Maybe it's usefull for others:

1) create Image file via CreateImageFile.ps script on both hosts
2) set

Code: Select all

$firstNode.CreateImage = $false
$secondNode.CreateImage = $false
This is why please collect the logs from both appliances and send them to me for the team to investigate the issue.
Do you got some kind of portal for the logs or an email address?

Kind regards
Martin
Boris (staff)
Staff
Posts: 805
Joined: Fri Jul 28, 2017 8:18 am

Tue Jul 23, 2019 10:06 pm

You can share any storage provider link (internal or public) via forum private messages.
Post Reply