Re: Where is my disk space ?

2018-11-08 Thread Chris Murphy
On Thu, Nov 8, 2018 at 2:27 AM, Barbet Alain  wrote:
> Hi !
> Just to give you end of the story:
> I move my /var/lib/docker to my home (other partition), and my space
> come back ...

I'm not sure why that would matter. Both btrfs du and regular du
showed only ~350M used in /var which is about what I'd expect. And
also the 'btrfs sub list' output doesn't show any subvolumes/snapshots
for Docker. The upstream Docker behavior on Btrfs is that it uses
subvolumes and snapshots for everything, quickly you'll see a lot of
them. However many distributions override the default Docker behavior,
e.g. with Docker storage setup, and will cause it to always favor a
particular driver. For example the Docker overlay2 driver, which
leverages kernel overlayfs, which will work on any file system
including Btrfs. And I'm not exactly sure where the upper dirs are
stored, but I'd be surprised if they're not in /var.

Anyway, if you're using Docker, moving stuff around will almost
certainly break it. And as I'm an extreme expert in messing up Docker
storage, I can vouch for the strategy of stopping the docker daemon,
recursively deleting everything in /var/lib/docker/ and then starting
Docker. Now you get to go fetch all your images again. And anyway, you
shouldn't be storing any data in the containers, they should be
throwaway things, important data should be stored elsewhere including
any state information for the container. :-D Avoid container misery by
having a workflow that expects containers to be transient disposable
objects.


-- 
Chris Murphy


Re: Where is my disk space ?

2018-11-08 Thread Barbet Alain
Hi !
Just to give you end of the story:
I move my /var/lib/docker to my home (other partition), and my space
come back ...
I let docker here & don't try to put it again on / to see if problem come back.
Le mer. 31 oct. 2018 à 08:34, Barbet Alain  a écrit :
>
> > Also, since you don't have any snapshots, you could also find this
> > conventionally:
> >
> > # du -sh /*
>
>
> Usually yes, but here not. It's just like when you remove a file when
> a process still use it and write in it, and fcsk will be not happy
> next time.
> But I reboot & check with btrfs check withtout any issue :-/
>
> alian@alian:/> sudo btrfs fi du -s *
>  Total   Exclusive  Set shared  Filename
>1.58MiB 1.58MiB   0.00B  bin
>   42.69MiB42.69MiB   0.00B  boot
>   14.78MiB14.78MiB   0.00B  etc
>  532.40MiB   532.40MiB   0.00B  lib
>9.88MiB 9.88MiB   0.00B  lib64
>  0.00B   0.00B   0.00B  mnt
>   23.96MiB23.96MiB   0.00B  opt
>  128.00KiB   128.00KiB   0.00B  root
>9.74MiB 9.74MiB   0.00B  sbin
>  0.00B   0.00B   0.00B  selinux
>  0.00B   0.00B   0.00B  srv
>   15.92MiB15.92MiB   0.00B  tmp
>4.86GiB 4.86GiB   0.00B  usr
>  345.65MiB   345.65MiB   0.00B  var
>
> alian@alian:~> sudo du --exclude /home -sh /*
> 2,1M/bin
> 43M /boot
> 0   /dev
> 20M /etc
> 534M/lib
> 11M /lib64
> 0   /mnt
> 24M /opt
> 0   /proc
> 172K/root
> 18M /run
> 11M /sbin
> 0   /selinux
> 0   /srv
> 0   /sys
> 16M /tmp
> 5,2G/usr
> 355M/var


Re: Where is my disk space ?

2018-10-31 Thread Barbet Alain
> Also, since you don't have any snapshots, you could also find this
> conventionally:
>
> # du -sh /*


Usually yes, but here not. It's just like when you remove a file when
a process still use it and write in it, and fcsk will be not happy
next time.
But I reboot & check with btrfs check withtout any issue :-/

alian@alian:/> sudo btrfs fi du -s *
 Total   Exclusive  Set shared  Filename
   1.58MiB 1.58MiB   0.00B  bin
  42.69MiB42.69MiB   0.00B  boot
  14.78MiB14.78MiB   0.00B  etc
 532.40MiB   532.40MiB   0.00B  lib
   9.88MiB 9.88MiB   0.00B  lib64
 0.00B   0.00B   0.00B  mnt
  23.96MiB23.96MiB   0.00B  opt
 128.00KiB   128.00KiB   0.00B  root
   9.74MiB 9.74MiB   0.00B  sbin
 0.00B   0.00B   0.00B  selinux
 0.00B   0.00B   0.00B  srv
  15.92MiB15.92MiB   0.00B  tmp
   4.86GiB 4.86GiB   0.00B  usr
 345.65MiB   345.65MiB   0.00B  var

alian@alian:~> sudo du --exclude /home -sh /*
2,1M/bin
43M /boot
0   /dev
20M /etc
534M/lib
11M /lib64
0   /mnt
24M /opt
0   /proc
172K/root
18M /run
11M /sbin
0   /selinux
0   /srv
0   /sys
16M /tmp
5,2G/usr
355M/var


Re: Where is my disk space ?

2018-10-30 Thread Chris Murphy
Also, since you don't have any snapshots, you could also find this
conventionally:

# du -sh /*


Chris Murphy


Re: Where is my disk space ?

2018-10-30 Thread Chris Murphy
On Tue, Oct 30, 2018 at 4:44 PM, Barbet Alain  wrote:
> Thanks for answer !
> alian@alian:~>  sudo btrfs sub list -ta /
> [sudo] Mot de passe de root :
> ID  gen top level   path
> --  --- -   
> 257 79379   5   /@
> 258 79386   257 @/var
> 259 79000   257 @/usr/local
> 260 79376   257 @/tmp
> 261 79001   257 @/srv
> 262 79062   257 @/root
> 263 79001   257 @/opt
> 264 78898   257 @/boot/grub2/x86_64-efi
> 265 78933   257 @/boot/grub2/i386-pc
>
> Yes it's opensuse, but I don't see any snapper config enable.
> For memory, I use docker that full my disk, I remove subvolume, but
> it's look like something is missing somewhere.

Try

mount -o subvolid=5  /mnt
cd /mnt
btrfs fi du -s *

Maybe that will help reveal where it's hiding. It's possible btrfs fi
du does not cross bind mounts. I know the Total column does include
amounts in nested subvolumes.



-- 
Chris Murphy


Re: Where is my disk space ?

2018-10-30 Thread Barbet Alain
Thanks for answer !
alian@alian:~>  sudo btrfs sub list -ta /
[sudo] Mot de passe de root :
ID  gen top level   path
--  --- -   
257 79379   5   /@
258 79386   257 @/var
259 79000   257 @/usr/local
260 79376   257 @/tmp
261 79001   257 @/srv
262 79062   257 @/root
263 79001   257 @/opt
264 78898   257 @/boot/grub2/x86_64-efi
265 78933   257 @/boot/grub2/i386-pc

Yes it's opensuse, but I don't see any snapper config enable.
For memory, I use docker that full my disk, I remove subvolume, but
it's look like something is missing somewhere.
Le mar. 30 oct. 2018 à 19:01, Chris Murphy  a écrit :
>
> On Tue, Oct 30, 2018 at 9:17 AM, Barbet Alain  
> wrote:
> > Hi,
> > I experienced disk out of space issue:
> > alian:~ # df -h
> > Filesystem  Size  Used Avail Use% Mounted on
> > devtmpfs7.8G 0  7.8G   0% /dev
> > tmpfs   7.8G   47M  7.8G   1% /dev/shm
> > tmpfs   7.8G   18M  7.8G   1% /run
> > tmpfs   7.8G 0  7.8G   0% /sys/fs/cgroup
> > /dev/sda641G   35G  5.1G  88% /
> > /dev/sda641G   35G  5.1G  88% /var
> > /dev/sda641G   35G  5.1G  88% /root
> > /dev/sda641G   35G  5.1G  88% /srv
> > /dev/sda641G   35G  5.1G  88% /opt
> > /dev/sda641G   35G  5.1G  88% /boot/grub2/i386-pc
> > /dev/sda641G   35G  5.1G  88% /usr/local
> > /dev/sda641G   35G  5.1G  88% /tmp
> > /dev/sda641G   35G  5.1G  88% /boot/grub2/x86_64-efi
> > /dev/sda7   424G  200G  225G  48% /home
> >
> >
> > It say I use 35Go / 41. But I have only 5,8Go of data:
> > alian:~ # btrfs fi du -s /
> >  Total   Exclusive  Set shared  Filename
> >5.84GiB 5.84GiB   0.00B  /
> > alian:/ # du -h --exclude ./home --max-depth=0
> > 6.2G.
>
> I suspect there are snapshots taking up space that are no located in
> the search path starting at /
>
> What do you get for:
>
> $ sudo btrfs sub list -ta /
>
> Is this an openSUSE system? If snapper is enabled, you'll need to ask
> it to delete some of the snapshots to free up space rather than doing
> it with btrfs user space tools.
>
>
>
>
> > alian:/ # btrfs fi df /
> > Data, single: total=35.00GiB, used=34.18GiB
> > System, DUP: total=32.00MiB, used=16.00KiB
> > Metadata, DUP: total=384.00MiB, used=216.75MiB
> > GlobalReserve, single: total=22.05MiB, used=0.00B
> >
> > I try to run btrfs balance multiple time with various parameters but
> > it doesn't change anything nor trying btrf check in single user mode.
> >
> > Where is my 30 Go missing ?
>
>
>
> --
> Chris Murphy


Re: Where is my disk space ?

2018-10-30 Thread Chris Murphy
On Tue, Oct 30, 2018 at 9:17 AM, Barbet Alain  wrote:
> Hi,
> I experienced disk out of space issue:
> alian:~ # df -h
> Filesystem  Size  Used Avail Use% Mounted on
> devtmpfs7.8G 0  7.8G   0% /dev
> tmpfs   7.8G   47M  7.8G   1% /dev/shm
> tmpfs   7.8G   18M  7.8G   1% /run
> tmpfs   7.8G 0  7.8G   0% /sys/fs/cgroup
> /dev/sda641G   35G  5.1G  88% /
> /dev/sda641G   35G  5.1G  88% /var
> /dev/sda641G   35G  5.1G  88% /root
> /dev/sda641G   35G  5.1G  88% /srv
> /dev/sda641G   35G  5.1G  88% /opt
> /dev/sda641G   35G  5.1G  88% /boot/grub2/i386-pc
> /dev/sda641G   35G  5.1G  88% /usr/local
> /dev/sda641G   35G  5.1G  88% /tmp
> /dev/sda641G   35G  5.1G  88% /boot/grub2/x86_64-efi
> /dev/sda7   424G  200G  225G  48% /home
>
>
> It say I use 35Go / 41. But I have only 5,8Go of data:
> alian:~ # btrfs fi du -s /
>  Total   Exclusive  Set shared  Filename
>5.84GiB 5.84GiB   0.00B  /
> alian:/ # du -h --exclude ./home --max-depth=0
> 6.2G.

I suspect there are snapshots taking up space that are no located in
the search path starting at /

What do you get for:

$ sudo btrfs sub list -ta /

Is this an openSUSE system? If snapper is enabled, you'll need to ask
it to delete some of the snapshots to free up space rather than doing
it with btrfs user space tools.




> alian:/ # btrfs fi df /
> Data, single: total=35.00GiB, used=34.18GiB
> System, DUP: total=32.00MiB, used=16.00KiB
> Metadata, DUP: total=384.00MiB, used=216.75MiB
> GlobalReserve, single: total=22.05MiB, used=0.00B
>
> I try to run btrfs balance multiple time with various parameters but
> it doesn't change anything nor trying btrf check in single user mode.
>
> Where is my 30 Go missing ?



-- 
Chris Murphy


Where is my disk space ?

2018-10-30 Thread Barbet Alain
Hi,
I experienced disk out of space issue:
alian:~ # df -h
Filesystem  Size  Used Avail Use% Mounted on
devtmpfs7.8G 0  7.8G   0% /dev
tmpfs   7.8G   47M  7.8G   1% /dev/shm
tmpfs   7.8G   18M  7.8G   1% /run
tmpfs   7.8G 0  7.8G   0% /sys/fs/cgroup
/dev/sda641G   35G  5.1G  88% /
/dev/sda641G   35G  5.1G  88% /var
/dev/sda641G   35G  5.1G  88% /root
/dev/sda641G   35G  5.1G  88% /srv
/dev/sda641G   35G  5.1G  88% /opt
/dev/sda641G   35G  5.1G  88% /boot/grub2/i386-pc
/dev/sda641G   35G  5.1G  88% /usr/local
/dev/sda641G   35G  5.1G  88% /tmp
/dev/sda641G   35G  5.1G  88% /boot/grub2/x86_64-efi
/dev/sda7   424G  200G  225G  48% /home


It say I use 35Go / 41. But I have only 5,8Go of data:
alian:~ # btrfs fi du -s /
 Total   Exclusive  Set shared  Filename
   5.84GiB 5.84GiB   0.00B  /
alian:/ # du -h --exclude ./home --max-depth=0
6.2G.

alian:/ # btrfs fi df /
Data, single: total=35.00GiB, used=34.18GiB
System, DUP: total=32.00MiB, used=16.00KiB
Metadata, DUP: total=384.00MiB, used=216.75MiB
GlobalReserve, single: total=22.05MiB, used=0.00B

I try to run btrfs balance multiple time with various parameters but
it doesn't change anything nor trying btrf check in single user mode.

Where is my 30 Go missing ?

Thank you for any help