* online snapshots of subvolumes?
@ 2012-02-19 12:47 andrew henry
2012-02-19 13:09 ` Hugo Mills
0 siblings, 1 reply; 3+ messages in thread
From: andrew henry @ 2012-02-19 12:47 UTC (permalink / raw)
To: linux-btrfs
Can I create a snapshot of a subvolume whilst that subvolume is mounted?
If so can you explain how?
I read the sysadmin guide and it details one management setup where you
leave the initial fs empty, create a subvol, then mount that, and for
subsequent subvol operations you need to first unmount the subvol and
remount the original empty fs.
--Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: online snapshots of subvolumes?
2012-02-19 12:47 online snapshots of subvolumes? andrew henry
@ 2012-02-19 13:09 ` Hugo Mills
2012-02-19 16:01 ` andrew henry
0 siblings, 1 reply; 3+ messages in thread
From: Hugo Mills @ 2012-02-19 13:09 UTC (permalink / raw)
To: andrew henry; +Cc: linux-btrfs
[-- Attachment #1: Type: text/plain, Size: 1699 bytes --]
On Sun, Feb 19, 2012 at 01:47:27PM +0100, andrew henry wrote:
> Can I create a snapshot of a subvolume whilst that subvolume is mounted?
> If so can you explain how?
Yes.
# btrfs sub snap /subvolume/to/snapshot /path/to/snapshot/name
The path for the snapshot can be under the subvolume it is a
snapshot of. So for example, I just ran on my machine:
# btrfs sub snap /media/video /media/video/video-snapshot
> I read the sysadmin guide and it details one management setup where you
> leave the initial fs empty, create a subvol, then mount that, and for
> subsequent subvol operations you need to first unmount the subvol and
> remount the original empty fs.
You don't need to unmount the subvolume. Linux allows you to mount
a filesystem in multiple places at one. With the ability to mount
subvolumes separately in btrfs, this means that you can mount the top
level (subvolid=0) somewhere temporarily without having to unmount
anything else.
Ths structure suggested in the sysadmin guide is more about not
having snapshots of / kept under / rather than for any technical
limitation of btrfs. If you re-read that section of the sysadmin
guide, the "creating a snapshot" doesn't involve unmounting any "live"
part of the FS. It's only when you want to roll back to an earlier
snapshot that you need to unmount the original subvolume (the second
example in that section).
Hugo.
--
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
--- Comic Sans goes into a bar, and the barman says, "We don't ---
serve your type here."
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 190 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: online snapshots of subvolumes?
2012-02-19 13:09 ` Hugo Mills
@ 2012-02-19 16:01 ` andrew henry
0 siblings, 0 replies; 3+ messages in thread
From: andrew henry @ 2012-02-19 16:01 UTC (permalink / raw)
To: linux-btrfs; +Cc: Hugo Mills
On 02/19/2012 02:09 PM, Hugo Mills wrote:
> You don't need to unmount the subvolume. Linux allows you to mount a
> filesystem in multiple places at one. With the ability to mount
> subvolumes separately in btrfs, this means that you can mount the top
> level (subvolid=0) somewhere temporarily without having to unmount
> anything else. Hugo.
Thanks for the clarification!
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-02-19 16:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-19 12:47 online snapshots of subvolumes? andrew henry
2012-02-19 13:09 ` Hugo Mills
2012-02-19 16:01 ` andrew henry
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).