Linode.com Forum Forum Index Linode.com Forum
Linode Community Forums
 


resize image on running linode (unmounted filesystem)

Click here to go to the original topic

 
       Linode.com Forum Forum Index -> Feature Request/Bug Report
Author Message
elirov



Joined: 28 Oct 2007
Posts: 11

Posted: Mon Dec 03, 2007 5:17 pm    Post subject: resize image on running linode (unmounted filesystem)  

Is there any way to support resizing of ext3 images on a running Linode, as long as the filesystem is not mounted. I guess the web tool wouldn't know if the filesystem was mounted, but perhaps a "Trust me" button could be added with an appropriate warning:

If your filesystem is mounted, you will lose all of your data. Are you sure you want to resize?
Back to top  
rm



Joined: 26 Aug 2007
Posts: 7

Posted: Tue Dec 04, 2007 11:14 pm    Post subject:  

Well, this is what I do which has the shortcoming of needing to reboot to access any space thats been added to my linode:

Assign 50-200MB to /, a bit to some swap and the rest of the space to a LVM physical volume. Then make logical volumes for /usr, /var/, /home and /tmp of appropriate sizes, leaving a large amount of the PV space unallocated.

Then later on when /var turns out to be too small I can lvextend / xfs_grow it all without unmounting or rebooting.

One can do the same with ext3 using resize2fs.

Shrinking filesystems online seems undoable AFAIK though.


Would be neat to not need to reboot to access more space linode space, though thats relatively rare occurance.
Back to top  
elirov



Joined: 28 Oct 2007
Posts: 11

Posted: Wed Dec 05, 2007 11:38 am    Post subject:  

So with LV, you would:
1. add a disk image via the web controls
2. assign it to a linux device
3. reboot the linode, keeping the filesystem unmounted
4. format the disk images as a PV
5. add the new PV to a VG (volume group)
6. resize
7. mount

The reason for the reboot is so that the new disk image has to be assigned to a linux device. (like /dev/XXXX) If we could assign a disk image to a device while a linode is running, it would solve the problem. Alternatively, if we could force a resize of an image while the linode is up, that would work as well.
Back to top  
 
       Linode.com Forum Forum Index -> Feature Request/Bug Report
Page 1 of 1