Pre-allocating full disk size for VM?


Recommended Posts

Hey there, trying to figure out how to pre-allocate the full disk size on my Ubuntu 18.04 server VM. I'm running unifi nvr and there's a setting to keep at least X space free, and the lowest setting is 10gb. my VM only has ~500mb free because it has an expanding disk size it seems. Trying to figure the best way to go about this.

 

I suppose I could mount one of my unraid shares, but i haven't been able to get that to work either. any ideas?

Link to comment

Not sure I understand your issue.   Inside a VM you should see whatever vdisk size you specified regardless of the actual amount occupied on the physical disk.   Are you perhaps asking how to set up the vdisk so that it actually occupies on the physical disk the amount of logical space you specified (I.e. avoid setting the vdisk as a ‘sparse’ file).

Link to comment

hmm ok so i'm stupid, the drive just isn't mounted apparently looking at `df -h` i don't see it listed anywhere, but when i run a `fdisk -l` i see it

i was thinking the disk and partitons would be automatically be mounted. should i be mounting this manually with `/etc/fstab`?

 

image.thumb.png.c0c66eafde7df8aa930448b7dbac7395.png

Link to comment

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.