Hi,

Maxim Perevedentsev wrote:
> Hello everyone!
>
> I faced an issue using ntfsresize --info to estimate minimum fs size
> before resize.
> The environment is as following: we are a hypervisor running a windows VM.
> We want a maximum VM uptime, while optimizing host disk space usage.
>
> So we want to find out how much space we can free from VM disk image,
> and if there's a considerable amount of space for freeing,
> we stop VM and shrink its disk image.
>
> The problem is that VM may do some FS operations, so that $MFT and $Bitmap
> cluster usage mismatch.  In that case, ntfsresize --info (even with -ff)
> reports errors

Do you mean your virtual OS is Windows, and it makes
allocation errors ? Why do you not run chkdsk ?

> and refuses to display minimum fs size. I guess whether it is possible to
> add a switch to ntfsresize enabling it to display (approximate) minimum
> size
> even if cluster mismatch is found (e.g. according to $MFT data).

In your Windows VM, the volume properties show the
allocated size. Is that not enough for your need ?

Now, you mention ntfsresize, so you can probably
mount the volume in a Linux VM. Then you can do
a "df" to know the used space ("ntfsinfo -fm" also
shows the free cluster count).

Note : ntfs-3g supports "fstrim", this may be useful
if your VM and the underlying file system support
discarding blocks from virtual disks.

Jean-Pierre


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
ntfs-3g-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ntfs-3g-devel

Reply via email to