Thread (21 messages) 21 messages, 7 authors, 2017-08-23

Re: finding root filesystem of a subvolume?

From: Hugo Mills <hidden>
Date: 2017-08-22 14:23:38

On Tue, Aug 22, 2017 at 10:12:25AM -0400, Austin S. Hemmelgarn wrote:
On 2017-08-22 09:53, Ulli Horlacher wrote:
quoted
On Tue 2017-08-22 (09:37), Austin S. Hemmelgarn wrote:
quoted
quoted
root@fex:~# df -T /local/.backup/home
Filesystem     Type  1K-blocks      Used Available Use% Mounted on
-              -    1073740800 104252160 967766336  10% /local/.backup/home
Hmm, now I'm really confused, I just checked on the Ubuntu 17.04 and
16.04.3 VM's I have (I only run current and the most recent LTS
version), and neither of them behave like this.
I have this kind of output on all of my Ubuntu hosts:

root@moep:~# grep PRETTY_NAME /etc/os-release
PRETTY_NAME="Ubuntu 16.04.3 LTS"

root@moep:~# df -T /usb/UF/tmp/blubb
Filesystem     Type 1K-blocks    Used Available Use% Mounted on
-              -     12581888 3690524   7253700  34% /usb/UF/tmp/blubb

root@moep:~# btrfs subvolume show /usb/UF/tmp/blubb
/usb/UF/tmp/blubb
        Name:                   blubb
        UUID:                   ecf8c804-d4a3-9948-89fe-b0c1971c25cb
        Parent UUID:            -
        Received UUID:          -
        Creation time:          2017-08-22 12:54:16 +0200
        Subvolume ID:           262
        Generation:             23
        Gen at creation:        22
        Parent ID:              5
        Top level ID:           5
        Flags:                  -
        Snapshot(s):

root@moep:~# dpkg -l | grep btrfs
ii  btrfs-tools                                 4.4-1ubuntu1                                 amd64        Checksumming Copy on Write Filesystem utilities
Hmm, interesting.  Are you using qgroups by chance?
   I get this behaviour (the "- -") only if it's a non-mounted
subvolume:

hrm@amelia:~ $ df -T .
Filesystem     Type  1K-blocks     Used Available Use% Mounted on
/dev/sdb1      btrfs 117220284 95271852  18611060  84% /home

hrm@amelia:~ $ sudo btrfs sub crea foo
Create subvolume './foo'

hrm@amelia:~ $ df -T ./foo
Filesystem     Type 1K-blocks     Used Available Use% Mounted on
-              -    117220284 95271880  18611032  84% /home/hrm/foo

hrm@amelia:~ $ sudo mkdir foo/bar
hrm@amelia:~ $ df -T foo/bar
Filesystem     Type 1K-blocks     Used Available Use% Mounted on
-              -    117220284 95271852  18611060  84% /home/hrm/foo

hrm@amelia:~ $ mkdir foo2

hrm@amelia:~ $ sudo mount /dev/sdb1 ./foo2 -o subvol=home/hrm/foo

hrm@amelia:~ $ df -T foo2
Filesystem     Type  1K-blocks     Used Available Use% Mounted on
/dev/sdb1      btrfs 117220284 95272384  18610528  84% /home/hrm/foo2

   Hugo.

-- 
Hugo Mills             | "Your problem is that you have a negative
hugo@... carfax.org.uk | personality."
http://carfax.org.uk/  | "No, I don't!"
PGP: E2AB1DE4          |                              Londo and Vir, Babylon 5

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help