Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Disk Space Management (for VMs)
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
dataking
Apprentice
Apprentice


Joined: 20 Apr 2005
Posts: 251

PostPosted: Tue Jul 28, 2015 4:48 am    Post subject: Disk Space Management (for VMs) Reply with quote

I have a gentoo VM that has reached it max (v)disk space capacity. This host is VirtualBox on Windows 7. The original vDisk was 30GB, and is now consumed by the system. There doesn't appear to be an "obvious" way to "grow" the existing disk. However, I can add more disks to help balance out the load on the filesystem (for example, /usr/src is a separate vdisk).

So my question is, where are the best (and easiest?) places to put extra vdisks to balance out the load on the filesystem?
_________________
-= the D@7@k|n& =-
Back to top
View user's profile Send private message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2678

PostPosted: Tue Jul 28, 2015 5:18 am    Post subject: Reply with quote

Creating new virtual disks and giving them to the OS is the recommended solution, although growing is possible.

I'd make the new disk large enough to hold all the data you expect to collect. Make it /home. 30 GiB should be about right for root and /home is the safest to copy on a hot system. You can do almost anything with vdisks that you can do with real ones, so really this problem is no different than having a 30 GiB hard drive and adding a second after you use up the space.
_________________
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.
Back to top
View user's profile Send private message
dataking
Apprentice
Apprentice


Joined: 20 Apr 2005
Posts: 251

PostPosted: Tue Jul 28, 2015 5:48 am    Post subject: Reply with quote

The Doctor wrote:
Creating new virtual disks and giving them to the OS is the recommended solution, although growing is possible.

Quite right. As said, there was no "obvious" way, but it wasn't obvious because I hadn't yet looked that hard. I did manage to grow the disk, but parted doesn't seem to want to resize the existing partition. I'm not sure if this is because the disk is dynamically populated, or parted on the install-minimal CD is "handicapped". I must try the sysrescuecd.

The Doctor wrote:
I'd make the new disk large enough to hold all the data you expect to collect. Make it /home. 30 GiB should be about right for root and /home is the safest to copy on a hot system. You can do almost anything with vdisks that you can do with real ones, so really this problem is no different than having a 30 GiB hard drive and adding a second after you use up the space.
It would seem the mount points giving me the most difficulty would be /usr and /var. It's kind of "counter-intuitive" for me to put those on separate disks since they comprise a large part of "The System". Different partitions on the same disk are one thing, different disks are a little more scary. You are correct in how this problem parallels with physical disks, thus /usr/src/ being a separate vdisk (I use /usr/src to build various FW distributions and custom kernels as well).
_________________
-= the D@7@k|n& =-
Back to top
View user's profile Send private message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2678

PostPosted: Tue Jul 28, 2015 5:54 am    Post subject: Reply with quote

The slight irony there is that /var and /usr where originally intended to be split off to other disks back in the good old days when disks where small. Part of the argument for the /usr merge thing.
_________________
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.
Back to top
View user's profile Send private message
dataking
Apprentice
Apprentice


Joined: 20 Apr 2005
Posts: 251

PostPosted: Tue Jul 28, 2015 6:28 am    Post subject: Reply with quote

dataking wrote:
The Doctor wrote:
Creating new virtual disks and giving them to the OS is the recommended solution, although growing is possible.

Quite right. As said, there was no "obvious" way, but it wasn't obvious because I hadn't yet looked that hard. I did manage to grow the disk, but parted doesn't seem to want to resize the existing partition. I'm not sure if this is because the disk is dynamically populated, or parted on the install-minimal CD is "handicapped". I must try the sysrescuecd.

Even with the sysrescueCD, parted doesn't seem to want to 'resize' the partition. I'm guessing this is because the partitions were originall created with fdisk, rather than parted. It might just be time to snapshot/disk-image this VM and start over.
_________________
-= the D@7@k|n& =-
Back to top
View user's profile Send private message
szatox
Advocate
Advocate


Joined: 27 Aug 2013
Posts: 3136

PostPosted: Tue Jul 28, 2015 12:19 pm    Post subject: Reply with quote

What is your virtual drive layout?
With simple layouts you can resize it manually following the sequence:
1) delete partition
2) create bigger partition starting at the same sector the original one did
3) run filesystem-specific resizefs (typically running it without params will expand FS to the capacity of your partition
If you don't have extra space at the end of your partition you might need to move it away.

Don't worry, deleting partition does not remove data. Creating new partition at the same location creates a new pointer to your FS so all the data will be accessible again. It would still be a good idea to backup the layout (first sector in case case of MBR-based images) so you don't lose everything if you make a mistake.
Back to top
View user's profile Send private message
dataking
Apprentice
Apprentice


Joined: 20 Apr 2005
Posts: 251

PostPosted: Tue Jul 28, 2015 6:15 pm    Post subject: Reply with quote

szatox wrote:
Don't worry, deleting partition does not remove data. Creating new partition at the same location creates a new pointer to your FS so all the data will be accessible again.
AHA! This is what I was concerned about. In my mind, deleting partitions meant also deleting the data on those filesystems, which equates to "starting over". I'll give it a backup and a go. Hopefully all works out.
_________________
-= the D@7@k|n& =-
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum