On Tue, Oct 07, 2014 at 05:18:51PM +0800, Qu Wenruo wrote: > > -------- Original Message -------- > Subject: Re: Identify mounted subvolume > From: Hugo Mills <hugo@xxxxxxxxxxxxx> > To: Juan Orti Alcaine <juan.orti@xxxxxxxxxxxx> > Date: 2014年10月07日 17:06 > >On Tue, Oct 07, 2014 at 10:47:56AM +0200, Juan Orti Alcaine wrote: > >>I cannot find the answer to this one. How can I determine which subvolume I > >>have mounted in a certain path? I'm looking through /sys but no clue. > > Rumour has it that /proc/self/mountinfo is meant to have the > >information, but I've just checked, and it doesn't seem to have the > >subvol in it on my server (3.16.2). > > > > Hugo. > > > This accepted patch will make /proc/self/mountinfo to have all the info. > https://patchwork.kernel.org/patch/4593831/ > > But I didn't see it in 3.17 kernel or integration branch, maybe next merge > window? > > Even without the patch, when mounting using '-o subvol=' mount option will > also fill the /proc/self/mountinfo, > using 3.16.4. > --- > 149 19 0:39 / /mnt/btrfs rw,relatime shared:101 - btrfs /dev/sda6 > rw,space_cache > 153 19 0:39 */subvol1* /mnt/other rw,relatime shared:104 - btrfs /dev/sda6 > rw,space_cache > --- Aaaah, I see. I was just misinterpreting the information. > On the other hand, without the patch and you mount with '-o subvolid=', then > mountinfo will not help. Got it. Thanks for clearing up my lack of understanding. Hugo. -- === 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 --- Unix: For controlling fungal diseases in crops ---
Attachment:
signature.asc
Description: Digital signature
