Feature #179

Ability to expand disk source on physical host

Added by Frank Stutz over 11 years ago. Updated almost 6 years ago.

Status:ClosedStart date:12/03/2009
Priority:HighDue date:
Assignee:-% Done:

0%

Category:Drivers - Storage
Target version:Release 4.14
Resolution:fixed Pull request:

Description

I use opennebula in an xen environment where a shared storage solution is not available, as such keeping the xen instance image small is very desirable for transferring to a lot of different machines. It is also desirable to expand (ie dd, resizefs) on the physical host before the instance is brought up simliar to mkimage.sh but on the transfered image. I thought about this a while it seemed reasonable to added an option to the DISK machine template. Below is the option I choose to use:

DISK = [
source = "/data/abimg",
target = "xvda",
bus = "xen",
extend = 5240,
readonly = "no" ]

Where extend is the how many megabytes you wish to expand the image on the destination / physical node. To accomplish this I modified the one/tm/TransferManager.cc to accept this new paramater (see TransferManager-fstutz-0.0.1.patch), and two new bash commands src/tm_mad/ssh/tm_mkextend.sh (attached) and contrib/fit (attached). I realize the scheduler was not modfiied to do a complete disk check for the addition, but at least its usable right now.

I realize everyone might not want this feature and in its current form is not complete, but I wanted to through it out there.

tm_mkextend.sh Magnifier (1.66 KB) Frank Stutz, 12/03/2009 11:26 PM

fit (1.28 KB) Frank Stutz, 12/03/2009 11:26 PM

TransferManager-fstutz-0.0.1.patch Magnifier (854 Bytes) Frank Stutz, 12/03/2009 11:26 PM

install.sh-fstutz-0.0.1.patch Magnifier (842 Bytes) Frank Stutz, 12/03/2009 11:26 PM


Related issues

Related to Backlog #1727: Patch for one.image.resize to resize image Closed 01/14/2013

History

#1 Updated by Ruben S. Montero over 11 years ago

  • Status changed from New to 4
  • Assignee set to Ruben S. Montero
  • Target version set to Release 1.4.2
  • Resolution set to fixed

Hi Frank,

Thank you very much for your contribution. This can certainly come in handy in ssh setups. I am wondering if we can not just use the size attribute, like:

DISK = [
source = "/data/abimg",
target = "xvda",
bus = "xen",
size = 5240,
readonly = "no" ]

This will give you SIZE at the last argument of the CLONE statement like
CLONE <source> <target> <size>

Then you can add the tm_mkextend.sh function to the tm_clone.sh for your setup. Does it make sense?

#2 Updated by Frank Stutz over 11 years ago

Makes sense, not sure why I did not see it in the first place.

--Frank

#3 Updated by jordan pittier about 10 years ago

I am also using this "feature". But I would like to use the Opennebula image repository, that is, in my VM Template using something like :

DISK = [image = "my custom Ubuntu defined in Image Repository", size=5240]

But with this line, the SIZE argument is not passed to tm_clone.sh.

Why is that the SIZE argument is passed only if DISK is described with its "source = /path/example" argument ?

Thanks !

#4 Updated by Ruben S. Montero almost 10 years ago

  • Tracker changed from Feature to Request
  • Target version deleted (Release 1.4.2)

#5 Updated by Ruben S. Montero almost 10 years ago

  • Status changed from 4 to New

#6 Updated by Ruben S. Montero about 8 years ago

  • Category set to Drivers - Storage

#7 Updated by Ruben S. Montero about 8 years ago

  • Tracker changed from Request to Feature

#8 Updated by Ruben S. Montero over 7 years ago

  • Tracker changed from Feature to Backlog

#9 Updated by Ruben S. Montero over 7 years ago

  • Related to Backlog #1727: Patch for one.image.resize to resize image added

#10 Updated by Ruben S. Montero over 7 years ago

  • Status changed from New to Pending
  • Priority changed from Low to High

#11 Updated by Ruben S. Montero over 7 years ago

  • Assignee deleted (Ruben S. Montero)

#12 Updated by Ruben S. Montero almost 6 years ago

  • Tracker changed from Backlog to Feature
  • Status changed from Pending to Closed
  • Target version set to Release 4.14
  • Resolution set to fixed

Also available in: Atom PDF