Re: How to identify if a partition containing a btrfs volume is mounted and where

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 24, 2014 at 01:48:55PM +0000, Mike Fleetwood wrote:
> Hi,
> 
> 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, but if the
> mounting device was removed from the file system this linkage is
> broken.
[snip]
> So in there a way to determine whether a specific partition containing
> a btrfs volume is mounted and on what mount point?

   Right now: no.

   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.
There was also a suggestion that the information also be exposed in
/sys/fs/btrfs, and that mounted filesystems, and their list of
devices, be shown in /sys as well. See the discussion from [1]
onwards.

   Hugo.

[1] http://www.spinics.net/lists/linux-btrfs/msg31080.html

-- 
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 65E74AC0 from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
           --- There are three mistaikes in this sentance. ---           

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux