linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Hannemann <arnd@arndnet.de>
To: cwillu <cwillu@cwillu.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: 3.5.0-rc6: btrfs and LVM snapshots -> wrong devicename in /proc/mounts
Date: Tue, 10 Jul 2012 11:03:21 +0200	[thread overview]
Message-ID: <4FFBEFD9.2030408@arndnet.de> (raw)
In-Reply-To: <CAE5mzvizLBtMbVmGfQc1HYve8BoFk+G93j2B=1759JWLH_4w+w@mail.gmail.com>

Am 10.07.2012 00:49, schrieb cwillu:
> On Mon, Jul 9, 2012 at 4:22 PM, Arnd Hannemann <arnd@arndnet.de> wrote:
>> Hi,
>>
>> using btrfs with LVM snapshots seems to be confusing /proc/mounts
>> After mounting a snapshot of an original filesystem, the devicename of the
>> original filesystem is overwritten with that of the snapshot in /proc/mounts.
> 
> If the lvm snapshot is visible to btrfs (i.e., btrfs dev scan), it
> will appear as another device which belongs to the original filesystem
> with a duplicate devid.  This might result in bad things happening, or
> possibly just hilarity.

You are right the same bug seems to get triggered on "btrfs dev scan":

arnd@kallisto:/mnt$ sudo grep /mnt /proc/mounts
/dev/mapper/vg0-original /mnt/original btrfs rw,relatime,ssd,space_cache 0 0
arnd@kallisto:/mnt$ sudo btrfs dev scan
Scanning for Btrfs filesystems
failed to read /dev/sr0
ERROR: unable to scan the device '/dev/dm-4' - Device or resource busy
ERROR: unable to scan the device '/dev/dm-17' - Device or resource busy

arnd@kallisto:/mnt$ sudo grep /mnt /proc/mounts
/dev/dm-16 /mnt/original btrfs rw,relatime,ssd,space_cache 0 0

arnd@kallisto:/mnt$ sudo dmsetup info /dev/dm-16
Name:              vg0-testsnap
State:             ACTIVE
Read Ahead:        256
Tables present:    LIVE
Open count:        0
Event number:      0
Major, minor:      253, 16
Number of targets: 1
UUID: LVM-pUa0TTDg9Y1dII6a6WwcUanE0ai4AVXqpS7sNnWEGZOnww76lrMaZzIEB38rug9


> You have a backup that isn't just an lvm snapshot, right?

Now I will.

Best regards
Arnd





  reply	other threads:[~2012-07-10  9:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-09 22:22 3.5.0-rc6: btrfs and LVM snapshots -> wrong devicename in /proc/mounts Arnd Hannemann
2012-07-09 22:49 ` cwillu
2012-07-10  9:03   ` Arnd Hannemann [this message]
     [not found] ` <4FFBA1C8.9020502@polymtl.ca>
2012-07-10  8:52   ` Arnd Hannemann
2012-07-10 17:55     ` Goffredo Baroncelli
2012-07-10 18:42       ` Goffredo Baroncelli
2012-07-10 20:09         ` Arnd Hannemann

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=4FFBEFD9.2030408@arndnet.de \
    --to=arnd@arndnet.de \
    --cc=cwillu@cwillu.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).