Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: Anand Jain <Anand.Jain@oracle.com>
To: Hugo Mills <hugo@carfax.org.uk>,
	Mike Fleetwood <mike.fleetwood@googlemail.com>,
	linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: How to identify if a partition containing a btrfs volume is mounted and where
Date: Tue, 25 Feb 2014 11:01:42 +0800	[thread overview]
Message-ID: <530C0796.4070205@oracle.com> (raw)
In-Reply-To: <20140224135702.GG23877@carfax.org.uk>


  Thanks Hugo for the heads-up.

>> I am trying to enhance GParted (http://www.gparted.org/) to better
>> support btrfs, specifically multi-device ones.  GParted displays the
>> busy status (mounted or not) and the mount point of each partition.
>>
>> For a single device file system this is easy.  Entry in /proc/mounts
>> for the partition identifies it's mounted and provides the mount
>> point.
>>
>> In the general case for btrfs I don't know how to get from device name
>> containing a btrfs volume to knowing if it's mounted and where?
::
>> btrfs filesystem show can identify the devices in a btrfs,

  if its not for the final sync-up, I had posted a patch which shows
  mount-point in the btrfs fi show -m output that should help you as
  of now, I have plans of revising it later and make it integration
  ready.

 > # mkfs.btrfs /dev/sdb2 /dev/sdb3 /dev/sdb4
 > # mount /dev/sdb2 /mnt/1
 > # btrfs device delete /dev/sdb2 /mnt/1
 >
 > So /dev/sdb2 is no longer part of the file system, but it's still
 > mounted using it.
 >
 > # grep btrfs /proc/mounts
 > /dev/sdb2 /mnt/1 btrfs rw,seclabel,relatime,ssd,space_cache 0 0


  This bug isn't there is the current btrfs-next. I couldn't
  reproduce.


>     Anand posted some kernel patches for an ioctl a few weeks ago that
> would allow you to get hold of the kernel's UUID<->device mapping.

  yes btrfs-devlist is WIP. As of now I am looking for some help
  as in here:

  http://www.spinics.net/lists/linux-fsdevel/msg72861.html
   OR
  http://www.spinics.net/lists/linux-btrfs/msg31784.html

  Team, Any help ? Thanks.

Anand

  reply	other threads:[~2014-02-25  3:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-24 13:48 How to identify if a partition containing a btrfs volume is mounted and where Mike Fleetwood
2014-02-24 13:57 ` Hugo Mills
2014-02-25  3:01   ` Anand Jain [this message]
2014-02-25 10:28     ` Mike Fleetwood
2014-02-26 21:50       ` Mike Fleetwood
2014-03-01 13:22         ` Anand Jain

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=530C0796.4070205@oracle.com \
    --to=anand.jain@oracle.com \
    --cc=hugo@carfax.org.uk \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=mike.fleetwood@googlemail.com \
    /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