expanding or changing zvol for vm

helbo15

Cadet
Joined
Apr 9, 2022
Messages
4
I'm in a bit of a pickle.

I've had a vm running for about a year now. it is running exactly the way I want it to run.

However as the year have been going I've been updating applications and installing new things, ETC you know once you have a server you start using it for every unthinkable things you can find along the way.

However now I've run out of space. which is odd as I gave it about 1tb space to begin with.
However when I go to the VM and run the df -h command I can see that it was never 1 tb in size it is only about a mere 120gb in size.

So this is where I am. I've been trying various methods of stopping the VM and trying to change the zvol to 2 TB however it just doesn't change when I start it all up again. I can't remember how I setup the Zvol to begin with.

I might have made it change dynamically but It doesn't seem to be working.

So here I am hoping anyone here could give me a pointer to what I'm doing wrong. or what I should be doing ?

if my thought is correct that it is dynamically changing then how do I remake it so that the size is fixed at 1TB ?

in advance thanks for your time.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,996
While I think I know the solution, I'm hesitant to provide anything given I have no idea of your system, as you did not provide any details on it. I have no idea the VM platform you are using and the configuration. How many virtual drives do you have?

A simple answer is, it's exactly like when someone wants to expand their pool, they just replace the hard drives with larger hard drives. So do that. If you don't know how, here is a start for you. If you have a RAIDZ1 or Z2 setup or Mirrors, create a new Virtual hard drive that is larger and place it into the VM. Now follow the replace a hard drive in the Guide. Once the drive has been resilvered you can delete the removed virtual drive. Repeat these steps to replace every drive. Once you have replaced the last drive then the pool capacity will pop to the larger size.
 

helbo15

Cadet
Joined
Apr 9, 2022
Messages
4
well I thank you for your suggestion and the part about "just replace the hard drives with larger hard drives" did make me think. it lead me to find out that my VM did have access to the 1 tb space it was just never partitioned. so I solved my issue with using this link
https://www.geoffstratton.com/expand-hard-disk-ubuntu-lvm
that I found in another post here on the forum.
Some times it helps to get reminded that it does not need to be as complex as you think it is. :)
Regarding the VM platform I'm using is just the one build in to truenas scale solution.
 

joeschmuck

Old Man
Moderator
Joined
May 28, 2011
Messages
10,996
Thanks for posting that link. And glad you fixed the issue you had.
 
Top