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.

Dynamically Expanding VM Disks

Featured Replies

Is there an option in Unraid that lets me create a vdisk for a vm that is dynamically expanding?

There is a feature like this in Hyper-V.

The problem is that disks in Unraid VM's take all the space allocated to them. 

It would be far more efficient if they can grow dynamically.

6 minutes ago, swamiforlife said:

The problem is that disks in Unraid VM's take all the space allocated to them. 

It would be far more efficient if they can grow dynamically.

This is not true!  

 

Under Unraid vdisks are allocated as Linux 'sparse' files which means that the physical space occupied is only allocated as writes to them happen and the file is allowed to grow up to its logical size as needed.  

 

In fact one of the commoner mistakes is over-committing the physical space and getting the VM to start misbehaving when there is no free space on a drive to grow the vdisk.

 

  • Author

Ok, just so i understand this correctly.

For example if i am creating a windows 10 VM and i set the vdisk size to 120GB.

Once that VM is created and then i use a tool like Krusader to backup the disk file. I have to copy a 120GB file even though its only using around 30GB.

So there must be something that i am doing wrong.

53 minutes ago, swamiforlife said:

Ok, just so i understand this correctly.

For example if i am creating a windows 10 VM and i set the vdisk size to 120GB.

Once that VM is created and then i use a tool like Krusader to backup the disk file. I have to copy a 120GB file even though its only using around 30GB.

So there must be something that i am doing wrong.

You need to use tools that have the option to copy sparse files keeping them sparse.    Standard Linux command line tools like cp and rsync can do this with the appropriate command line options - no idea about whether this is an option in Krusader.

You can use:

cp --sparse=always /path/to/source /path/to/dest

 

  • Author

Ok sorry i wasnt able to explain what i am looking for.

When a VM is created and i specify the size of the vdisk to something like 120gb.

When unraid creates the disk it should only take up the space used. So if my vm disk is in my cache disk, my cache shows 120gb used.

So is there a way that in which i can specify a maximum size for the vdisk like 120gb but it would use only what it really is using?

1 minute ago, swamiforlife said:

When unraid creates the disk it should only take up the space used.

That's what happens by default, vdisks are created sparse.

  • 3 years later...
On 1/29/2020 at 5:02 PM, JorgeB said:

You can use:

cp --sparse=always /path/to/source /path/to/dest

 

Does this mean if I copy without the "sparse" argument it allocates the whole space on the new location without possibility to make it sparse again?

1 minute ago, glockmane said:

without possibility to make it sparse again?

If you then re-copy with --sparse-always it will me made sparse again.

28 minutes ago, JorgeB said:

If you then re-copy with --sparse-always it will me made sparse again.

Ah okay and can I also check if it is sparse or not?

Should be able with du, don't remember the command, but should not be hard to find with Google. 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

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.