public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
* subvolume/snapshot usage question
@ 2009-08-22  4:35 tsuraan
  2009-08-22  6:34 ` Goffredo Baroncelli
  0 siblings, 1 reply; 2+ messages in thread
From: tsuraan @ 2009-08-22  4:35 UTC (permalink / raw)
  To: linux-btrfs

Suppose I have a directory under my home on a btrfs filesystem where I
store virtual machine images.  I have one base virtual machine, and
from it I make copies that I actually run.  To make a copy of a VM
today, I do cp -r, which seems pretty wasteful since the VMs are
almost entirely identical.  Is there some way that I can do a snapshot
of just the directory that holds my base VM, and then mount different
"forks" of that snapshot to be the bases of my different running
machines?

It looks like I could create a snapshot of the root of my btrfs
filesystem for each vm, mount that snapshot somewhere, and run the vm
from that full fs snapshot, but that's not ideal.  I could also create
a large file for my base VM directory, format it btrfs, mount it using
the loopback device, and then mount snapshots of that loopback
filesystem, but having to preallocate filesystem space for my VMs is
not as nice as being able to share space with the rest of my
filesystem.  Is there a partial-snapshot capability in btrfs?  I don't
understand what subvolumes are, and I think they're unrelated to what
I want, but the name sounds promising...

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-08-22  6:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-22  4:35 subvolume/snapshot usage question tsuraan
2009-08-22  6:34 ` Goffredo Baroncelli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox