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


Ability to "clone" disk images

Click here to go to the original topic

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



Joined: 11 Sep 2003
Posts: 26

Posted: Fri Sep 12, 2003 12:31 am    Post subject: Ability to "clone" disk images  

I would like the ability to setup a disk image that I can use as a base image for testing. That way I can boot a cloned copy of my drive image, trash it, then start over (my requirements are probably a lot different than some users).

I can of course write a script that "customizes" the distro image, but I'd rather customize it one, then clone it when I need it.

Also, UML has the ability to use COW files (copy on write). Should I assume that behind the scenes that's what you're using to reduce the disk space used by each distro created? If not, the ability to manage COW files would be real handy and a great alternative cloning.
Back to top  
kenny



Joined: 27 Jun 2003
Posts: 66

Posted: Fri Sep 12, 2003 10:05 am    Post subject: Re: Ability to "clone" disk images  

bjohnson wrote: I would like the ability to setup a disk image that I can use as a base image for testing. That way I can boot a cloned copy of my drive image, trash it, then start over (my requirements are probably a lot different than some users).

Create a new partition with enough space, boot into single user mode and Code: cp -a -x / /mnt/ubdx it's always worked for me.

kenny
Back to top  
caker



Joined: 15 Apr 2003
Posts: 2386
Location: Galloway, NJ

Posted: Fri Sep 12, 2003 10:53 am    Post subject:  

There are a few things one needs to watch out for with COW files, but the biggest issue is that the backing-file (the distro) and the COW file's image size needs to be pre-set. So, if I wanted an 800 MB Red Hat Disk Image I'd need a backing file for that. If someone wanted a 2GB RH Image, i'd need a backing file for that, too. And so on.

COW would work really well for your situation. There is a small amount of COW support already in my system, although I decided against using it for the main installs.

I think for now the best method is just the mount; copy method.

-Chris
Back to top  
bjohnson



Joined: 11 Sep 2003
Posts: 26

Posted: Fri Sep 12, 2003 1:57 pm    Post subject:  

I have no experience actually doing this, so this may be a stupid question... Why does the COW file size have to be preset? It seems like the documentation implies that it can be created dynamically on boot by specifying the COW file on the command line:

http://user-mode-linux.sourceforge.net/UserModeLinux-HOWTO-7.html#ss7.7

Or is this a requirement of the linode system?
Back to top  
caker



Joined: 15 Apr 2003
Posts: 2386
Location: Galloway, NJ

Posted: Fri Sep 12, 2003 2:37 pm    Post subject:  

The COW file inherits whatever size the backing file is. It might not actually take up more space on the disk (at first) than the backing file, but the issue is that everyone creates a different size "image", and you must have backing files for each different size.

There's no way to have a COW file give you more space than whatever size the backing file is.

-Chris
Back to top  
 
       Linode.com Forum Forum Index -> Feature Request/Bug Report
Page 1 of 1