Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Unraid | Ubuntu Server | Vdisk continues to grow until VM pauses. OS reports less usage on disk

Featured Replies

my 1TB vdisk continues to grow even when the OS is reporting a much smaller size. 

 

disk 3 continues to grow while on my ubuntu VM the disk is a fraction of the size (36%)

image.png.6002d05e74345483bbea2fcecdb6471a.png

 

Ubuntu VM:

image.png.702fc44f98bdca74afec6f41ff4c80a0.png

 

This is the only file/vdisk on the disk

image.png.616be5033bff7e1a38990d7dad40b6a4.png

 

 

I thought originally maybe some snapshot feature was causing this, I uninstalled snapd from ubuntu but the issue persists. 

That's how sparse vdisks work, unless you configure both the host and guest to allow the space to be reclaimed. By default the guest treats the entire virtual capacity of the allocated image as writeable, and unless the host and guest can agree on what bits are no longer in use, the host has no choice but to keep every write the guest makes, even if the guest goes back and "deletes" the data.

 

Here is a post that describes the process for Windows based VM's, you should be able to adapt to linux based guests as well.

https://forums.unraid.net/topic/51703-vm-faq/?tab=comments#comment-557606

 

Sounds if the logical size of the vdisk is larger than the available space to store it?    If so the VM will pause when the physical space used by the vdisk file uses up all the free space on the drive where it is located.    It is not good practice to ‘over-commit’ the vdisk file although there are Use Cases where it can make sense.   Was it deliberate to put it on a drive that was smaller than the logical size of the drive?

  • Author

The over allocation shouldn't be the issue, the used capacity on the volume never gets that close. 

 

I tried the solution mentioned in the link provided by @jonathanm 

    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback' discard='unmap'/>
      <source file='/mnt/user/domains/Ubuntu/vdisk2.img' index='1'/>
      <backingStore/>
      <target dev='hdd' bus='scsi'/>
      <alias name='scsi0-0-3'/>
      <address type='drive' controller='0' bus='0' target='0' unit='3'/>

This didnt seem to make a difference. 

 

I know this is probably not the best solution, but currently i am trying a cronjob that runs fstrim periodically. this appears to be working 

Just now, BirdUp said:

The over allocation shouldn't be the issue, the used capacity on the volume never gets that close. 

You missed the point. What the guest shows as used, vs. what the host sees as used are two different things unless you can get the two to communicate. The "unused" space inside the image still has data written, it's just that the guest has marked the files in those spaces as deleted and available for writing. The bits are still there, and allocated as far as the host is concerned.

 

Your guest shows an address space of 964G available for storage, and the host only actually has 932G available. When the guest tries to write to an address that can't be allocated, the host pauses it instead of crashing.

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.