linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kevin@kevinokelley.com
To: linux-btrfs@vger.kernel.org
Subject: How to mount a copy of a disk with a Btrfs file system on it?
Date: Mon, 10 Jun 2013 10:19:29 -0500	[thread overview]
Message-ID: <20130610101929.162463asym1cxvnl@webmail.kevinokelley.com> (raw)

Consider the following environment.  We have a storage array that  
provides its own facilities for creating snapshots, replicas, and  
clones.  We create a Btrfs file system on a volume on one of these  
storage arrays, and we mount a snapshot of that volume on the same  
host.  (The simple use-case is that the snapshot is being used to  
restore a set of files.)

We've noticed two problems:

1. The dmesg log shows that the kernel recognizes the Btrfs object id  
for both devices.  For example:

[ 2920.923517] btrfs: device fsid 54c6e67c-fd51-4aed-a865-4ed4e1cd246a  
devid 1 transid 7 /dev/dm-2
[ 2921.007179] btrfs: device fsid 54c6e67c-fd51-4aed-a865-4ed4e1cd246a devid 1
transid 6 /dev/dm-9

If a user process modifies the original file system, the changes also  
appear on the snapshot.  This is highly undesirable as we want to  
preserve the integrity of the snapshot so that it reflects the state  
of the volume when the snapshot was created.

2. We cannot mount the original volume read-write and mount the  
snapshot read-only.

Is there a mount option for Btrfs that will allow us to mount the  
Btrfs file system and ignore the UUID on the device or allow us to  
assign a new (random) UUID for the volume?   For example, xfs provides  
a mount option "-o nouuid".  Gfs2 allows mount option "-o  
locktable=<UUID>" to specify a new locktable.

Thank you.



                 reply	other threads:[~2013-06-10 15:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130610101929.162463asym1cxvnl@webmail.kevinokelley.com \
    --to=kevin@kevinokelley.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).