You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Gary Malouf <ma...@gmail.com> on 2013/07/09 22:11:36 UTC

Disk space in UI on EC2 instances

Hi everyone,

I have Mesos running with Chronos.  The UI shows the disk space being very
low (1GB), but I have the log and slave work directories symlinked to
locations on a disk with 374GB of free space.  How does the Mesos ui
determine disk space?

-Gary

Re: Disk space in UI on EC2 instances

Posted by Vinod Kone <vi...@gmail.com>.
i believe these are the resources the slave is configured with at run
time(i.e., --resources command line flag). if you did not specify
--resources via command line, the disk space of the filesystem that
contains the work directory. what does slave logs say about the disk space
it is using?


On Tue, Jul 9, 2013 at 1:11 PM, Gary Malouf <ma...@gmail.com> wrote:

> Hi everyone,
>
> I have Mesos running with Chronos.  The UI shows the disk space being very
> low (1GB), but I have the log and slave work directories symlinked to
> locations on a disk with 374GB of free space.  How does the Mesos ui
> determine disk space?
>
> -Gary
>

Re: Disk space in UI on EC2 instances

Posted by Vinod Kone <vi...@gmail.com>.
hey gary. did you get my latest email about the bug being in 0.12.0 and
fixed in 0.13.0?


On Wed, Jul 10, 2013 at 2:06 PM, Gary Malouf <ma...@gmail.com> wrote:

> The results:
>
> [root@mesos-test-02 tmp]# ./a.out
> /tmp/mesos bytes free: 401027072000
> /media/ephemeral0/var/log/mesos-slaves bytes free: 401027072000
>
> Looks like that stuff sees the proper free space - does this then point to
> the UI bug mentioned earlier?
>
>
> On Wed, Jul 10, 2013 at 4:22 PM, Gary Malouf <ma...@gmail.com>
> wrote:
>
> > I first tried using the path symlinked to - the ui still shows just 1gb
> of
> > available disk space.  This is what is on the root volume - even though
> the
> > work directory is on the much larger and empty instance one.
> >
> >
> > Trying to run the program Ben suggested:
> >
> > On CentOS 6.3, I get the following:
> >
> > [root@mesos-test-02 tmp]# gcc symlink.c
> > symlink.c:3:20: error: iostream: No such file or directory
> > symlink.c: In function ‘main’:
> > symlink.c:10: error: expected expression before ‘:’ token
> > symlink.c:13: error: expected expression before ‘:’ token
> > symlink.c:17: error: expected expression before ‘:’ token
> > symlink.c:20: error: duplicate label ‘std’
> > symlink.c:13: note: previous definition of ‘std’ was here
> > symlink.c:20: error: expected expression before ‘:’ token
> >
> > I tried compiling with g++, but got:
> >
> > [root@mesos-test-02 tmp]# g++ symlink.c
> > symlink.c: In function ‘int main()’:
> > symlink.c:10: error: ‘ErrnoError’ was not declared in this scope
> > symlink.c:17: error: ‘ErrnoError’ was not declared in this scope
> >
> > -Gary
> >
> >
> > On Wed, Jul 10, 2013 at 3:30 PM, Gary Malouf <malouf.gary@gmail.com
> >wrote:
> >
> >> I am running mesos-0.12.0-incubating.  Does the bug affect that one as
> >> well?
> >>
> >>
> >> On Wed, Jul 10, 2013 at 2:38 PM, Gary Malouf <malouf.gary@gmail.com
> >wrote:
> >>
> >>> Also relevant (copied from UI):
> >>>
> >>> Active Slaves (see all <http://localhost:5050/#/slaves>)   ID<
> http://localhost:5050/#/>
> >>> Host <http://localhost:5050/#/>  CPUs <http://localhost:5050/#/>  Mem<
> http://localhost:5050/#/>
> >>> Disk <http://localhost:5050/#/>  Registered <http://localhost:5050/#/>
>   …3744-1
> >>> <http://localhost:5050/#/>  mesos-test-02
> >>> <http://localhost:5050/#/slaves/201307092108-1315739402-5050-3744-1>
> 1 3
> >>> GB 1 GB  21 hours ago <http://localhost:5050/#/>   …3744-0
> >>> <http://localhost:5050/#/>  mesos-test-01
> >>> <http://localhost:5050/#/slaves/201307092108-1315739402-5050-3744-0>
> 1 3
> >>> GB 1 GB  21 hours ago <http://localhost:5050/#/>
> >>>
> >>>
> >>> On Wed, Jul 10, 2013 at 2:36 PM, Gary Malouf <malouf.gary@gmail.com
> >wrote:
> >>>
> >>>> It says it is taking up 65% of the available disk space.  This is
> >>>> strange since I have the work directory (/tmp/mesos) symlinked to an
> >>>> instance volume that has almost 150GB free.
> >>>>
> >>>> I've put the relative terminal output below - I think the strong
> >>>> preference would be for mesos to sensibly detect the stuff rather
> than it
> >>>> be explicitly enumerated in configuration.
> >>>>
> >>>> slave.cpp:1233] Current disk usage 64.76%. Max allowed age: 2.47days
> >>>>
> >>>> [root@mesos-test-02 log]# du -hcs /media/ephemeral0/
> >>>> 13M    /media/ephemeral0/
> >>>> 13M    total
> >>>>
> >>>> [root@mesos-test-02 log]# df -h
> >>>> Filesystem            Size  Used Avail Use% Mounted on
> >>>> /dev/xvde1            5.0G  3.2G  1.5G  69% /
> >>>> tmpfs                 1.8G     0  1.8G   0% /dev/shm
> >>>> /dev/xvdf             394G  211M  374G   1% /media/ephemeral0
> >>>>
> >>>> [root@mesos-test-02 tmp]# ls -la
> >>>> total 232
> >>>> drwxrwxrwt.  4 root root   4096 Jul 10 18:33 .
> >>>> dr-xr-xr-x. 22 root root   4096 Jul  9 16:49 ..
> >>>> -rw-r--r--   1 root root 217689 Jul  9 21:58 chronos-1.log
> >>>> drwxr-xr-x   2 root root   4096 Jul 10 01:03 hsperfdata_root
> >>>> drwxrwxrwt   2 root root   4096 Jul  9 15:46 .ICE-unix
> >>>> lrwxrwxrwx   1 root root     38 Jul  9 20:03 mesos ->
> >>>> /media/ephemeral0/var/log/mesos-slaves
> >>>>
> >>>>
> >>>> Thanks,
> >>>>
> >>>> Gary
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> On Tue, Jul 9, 2013 at 4:11 PM, Gary Malouf <malouf.gary@gmail.com
> >wrote:
> >>>>
> >>>>> Hi everyone,
> >>>>>
> >>>>> I have Mesos running with Chronos.  The UI shows the disk space being
> >>>>> very low (1GB), but I have the log and slave work directories
> symlinked to
> >>>>> locations on a disk with 374GB of free space.  How does the Mesos ui
> >>>>> determine disk space?
> >>>>>
> >>>>> -Gary
> >>>>>
> >>>>
> >>>>
> >>>
> >>
> >
>

Re: Disk space in UI on EC2 instances

Posted by Gary Malouf <ma...@gmail.com>.
Yes, got it.  Just was confirming that the disk space in that working
directory was determined properly.  Since it's not a must have at the
moment, I'll upgrade when 0.13.0 stable gets released.


On Wed, Jul 10, 2013 at 5:06 PM, Gary Malouf <ma...@gmail.com> wrote:

> The results:
>
> [root@mesos-test-02 tmp]# ./a.out
> /tmp/mesos bytes free: 401027072000
> /media/ephemeral0/var/log/mesos-slaves bytes free: 401027072000
>
> Looks like that stuff sees the proper free space - does this then point to
> the UI bug mentioned earlier?
>
>
> On Wed, Jul 10, 2013 at 4:22 PM, Gary Malouf <ma...@gmail.com>wrote:
>
>> I first tried using the path symlinked to - the ui still shows just 1gb
>> of available disk space.  This is what is on the root volume - even though
>> the work directory is on the much larger and empty instance one.
>>
>>
>> Trying to run the program Ben suggested:
>>
>> On CentOS 6.3, I get the following:
>>
>> [root@mesos-test-02 tmp]# gcc symlink.c
>> symlink.c:3:20: error: iostream: No such file or directory
>> symlink.c: In function ‘main’:
>> symlink.c:10: error: expected expression before ‘:’ token
>> symlink.c:13: error: expected expression before ‘:’ token
>> symlink.c:17: error: expected expression before ‘:’ token
>> symlink.c:20: error: duplicate label ‘std’
>> symlink.c:13: note: previous definition of ‘std’ was here
>> symlink.c:20: error: expected expression before ‘:’ token
>>
>> I tried compiling with g++, but got:
>>
>> [root@mesos-test-02 tmp]# g++ symlink.c
>> symlink.c: In function ‘int main()’:
>> symlink.c:10: error: ‘ErrnoError’ was not declared in this scope
>> symlink.c:17: error: ‘ErrnoError’ was not declared in this scope
>>
>> -Gary
>>
>>
>> On Wed, Jul 10, 2013 at 3:30 PM, Gary Malouf <ma...@gmail.com>wrote:
>>
>>> I am running mesos-0.12.0-incubating.  Does the bug affect that one as
>>> well?
>>>
>>>
>>> On Wed, Jul 10, 2013 at 2:38 PM, Gary Malouf <ma...@gmail.com>wrote:
>>>
>>>> Also relevant (copied from UI):
>>>>
>>>> Active Slaves (see all <http://localhost:5050/#/slaves>)   ID<http://localhost:5050/#/>
>>>> Host <http://localhost:5050/#/>  CPUs <http://localhost:5050/#/>  Mem<http://localhost:5050/#/>
>>>> Disk <http://localhost:5050/#/>  Registered <http://localhost:5050/#/>   …3744-1
>>>> <http://localhost:5050/#/>  mesos-test-02
>>>> <http://localhost:5050/#/slaves/201307092108-1315739402-5050-3744-1> 1 3
>>>> GB 1 GB  21 hours ago <http://localhost:5050/#/>   …3744-0
>>>> <http://localhost:5050/#/>  mesos-test-01
>>>> <http://localhost:5050/#/slaves/201307092108-1315739402-5050-3744-0> 1 3
>>>> GB 1 GB  21 hours ago <http://localhost:5050/#/>
>>>>
>>>>
>>>> On Wed, Jul 10, 2013 at 2:36 PM, Gary Malouf <ma...@gmail.com>wrote:
>>>>
>>>>> It says it is taking up 65% of the available disk space.  This is
>>>>> strange since I have the work directory (/tmp/mesos) symlinked to an
>>>>> instance volume that has almost 150GB free.
>>>>>
>>>>> I've put the relative terminal output below - I think the strong
>>>>> preference would be for mesos to sensibly detect the stuff rather than it
>>>>> be explicitly enumerated in configuration.
>>>>>
>>>>> slave.cpp:1233] Current disk usage 64.76%. Max allowed age: 2.47days
>>>>>
>>>>> [root@mesos-test-02 log]# du -hcs /media/ephemeral0/
>>>>> 13M    /media/ephemeral0/
>>>>> 13M    total
>>>>>
>>>>> [root@mesos-test-02 log]# df -h
>>>>> Filesystem            Size  Used Avail Use% Mounted on
>>>>> /dev/xvde1            5.0G  3.2G  1.5G  69% /
>>>>> tmpfs                 1.8G     0  1.8G   0% /dev/shm
>>>>> /dev/xvdf             394G  211M  374G   1% /media/ephemeral0
>>>>>
>>>>> [root@mesos-test-02 tmp]# ls -la
>>>>> total 232
>>>>> drwxrwxrwt.  4 root root   4096 Jul 10 18:33 .
>>>>> dr-xr-xr-x. 22 root root   4096 Jul  9 16:49 ..
>>>>> -rw-r--r--   1 root root 217689 Jul  9 21:58 chronos-1.log
>>>>> drwxr-xr-x   2 root root   4096 Jul 10 01:03 hsperfdata_root
>>>>> drwxrwxrwt   2 root root   4096 Jul  9 15:46 .ICE-unix
>>>>> lrwxrwxrwx   1 root root     38 Jul  9 20:03 mesos ->
>>>>> /media/ephemeral0/var/log/mesos-slaves
>>>>>
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Gary
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Tue, Jul 9, 2013 at 4:11 PM, Gary Malouf <ma...@gmail.com>wrote:
>>>>>
>>>>>> Hi everyone,
>>>>>>
>>>>>> I have Mesos running with Chronos.  The UI shows the disk space being
>>>>>> very low (1GB), but I have the log and slave work directories symlinked to
>>>>>> locations on a disk with 374GB of free space.  How does the Mesos ui
>>>>>> determine disk space?
>>>>>>
>>>>>> -Gary
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>

Re: Disk space in UI on EC2 instances

Posted by Gary Malouf <ma...@gmail.com>.
The results:

[root@mesos-test-02 tmp]# ./a.out
/tmp/mesos bytes free: 401027072000
/media/ephemeral0/var/log/mesos-slaves bytes free: 401027072000

Looks like that stuff sees the proper free space - does this then point to
the UI bug mentioned earlier?


On Wed, Jul 10, 2013 at 4:22 PM, Gary Malouf <ma...@gmail.com> wrote:

> I first tried using the path symlinked to - the ui still shows just 1gb of
> available disk space.  This is what is on the root volume - even though the
> work directory is on the much larger and empty instance one.
>
>
> Trying to run the program Ben suggested:
>
> On CentOS 6.3, I get the following:
>
> [root@mesos-test-02 tmp]# gcc symlink.c
> symlink.c:3:20: error: iostream: No such file or directory
> symlink.c: In function ‘main’:
> symlink.c:10: error: expected expression before ‘:’ token
> symlink.c:13: error: expected expression before ‘:’ token
> symlink.c:17: error: expected expression before ‘:’ token
> symlink.c:20: error: duplicate label ‘std’
> symlink.c:13: note: previous definition of ‘std’ was here
> symlink.c:20: error: expected expression before ‘:’ token
>
> I tried compiling with g++, but got:
>
> [root@mesos-test-02 tmp]# g++ symlink.c
> symlink.c: In function ‘int main()’:
> symlink.c:10: error: ‘ErrnoError’ was not declared in this scope
> symlink.c:17: error: ‘ErrnoError’ was not declared in this scope
>
> -Gary
>
>
> On Wed, Jul 10, 2013 at 3:30 PM, Gary Malouf <ma...@gmail.com>wrote:
>
>> I am running mesos-0.12.0-incubating.  Does the bug affect that one as
>> well?
>>
>>
>> On Wed, Jul 10, 2013 at 2:38 PM, Gary Malouf <ma...@gmail.com>wrote:
>>
>>> Also relevant (copied from UI):
>>>
>>> Active Slaves (see all <http://localhost:5050/#/slaves>)   ID<http://localhost:5050/#/>
>>> Host <http://localhost:5050/#/>  CPUs <http://localhost:5050/#/>  Mem<http://localhost:5050/#/>
>>> Disk <http://localhost:5050/#/>  Registered <http://localhost:5050/#/>   …3744-1
>>> <http://localhost:5050/#/>  mesos-test-02
>>> <http://localhost:5050/#/slaves/201307092108-1315739402-5050-3744-1> 1 3
>>> GB 1 GB  21 hours ago <http://localhost:5050/#/>   …3744-0
>>> <http://localhost:5050/#/>  mesos-test-01
>>> <http://localhost:5050/#/slaves/201307092108-1315739402-5050-3744-0> 1 3
>>> GB 1 GB  21 hours ago <http://localhost:5050/#/>
>>>
>>>
>>> On Wed, Jul 10, 2013 at 2:36 PM, Gary Malouf <ma...@gmail.com>wrote:
>>>
>>>> It says it is taking up 65% of the available disk space.  This is
>>>> strange since I have the work directory (/tmp/mesos) symlinked to an
>>>> instance volume that has almost 150GB free.
>>>>
>>>> I've put the relative terminal output below - I think the strong
>>>> preference would be for mesos to sensibly detect the stuff rather than it
>>>> be explicitly enumerated in configuration.
>>>>
>>>> slave.cpp:1233] Current disk usage 64.76%. Max allowed age: 2.47days
>>>>
>>>> [root@mesos-test-02 log]# du -hcs /media/ephemeral0/
>>>> 13M    /media/ephemeral0/
>>>> 13M    total
>>>>
>>>> [root@mesos-test-02 log]# df -h
>>>> Filesystem            Size  Used Avail Use% Mounted on
>>>> /dev/xvde1            5.0G  3.2G  1.5G  69% /
>>>> tmpfs                 1.8G     0  1.8G   0% /dev/shm
>>>> /dev/xvdf             394G  211M  374G   1% /media/ephemeral0
>>>>
>>>> [root@mesos-test-02 tmp]# ls -la
>>>> total 232
>>>> drwxrwxrwt.  4 root root   4096 Jul 10 18:33 .
>>>> dr-xr-xr-x. 22 root root   4096 Jul  9 16:49 ..
>>>> -rw-r--r--   1 root root 217689 Jul  9 21:58 chronos-1.log
>>>> drwxr-xr-x   2 root root   4096 Jul 10 01:03 hsperfdata_root
>>>> drwxrwxrwt   2 root root   4096 Jul  9 15:46 .ICE-unix
>>>> lrwxrwxrwx   1 root root     38 Jul  9 20:03 mesos ->
>>>> /media/ephemeral0/var/log/mesos-slaves
>>>>
>>>>
>>>> Thanks,
>>>>
>>>> Gary
>>>>
>>>>
>>>>
>>>>
>>>> On Tue, Jul 9, 2013 at 4:11 PM, Gary Malouf <ma...@gmail.com>wrote:
>>>>
>>>>> Hi everyone,
>>>>>
>>>>> I have Mesos running with Chronos.  The UI shows the disk space being
>>>>> very low (1GB), but I have the log and slave work directories symlinked to
>>>>> locations on a disk with 374GB of free space.  How does the Mesos ui
>>>>> determine disk space?
>>>>>
>>>>> -Gary
>>>>>
>>>>
>>>>
>>>
>>
>

Re: Disk space in UI on EC2 instances

Posted by Benjamin Mahler <be...@gmail.com>.
Whoops, here you go (I actually compiled it this time ;)):

symlink.c:

#include <errno.h>
#include <string.h>

#include <sys/statvfs.h>

#include <iostream>

int main()
{
  // First check with the symlink.
  struct statvfs buf;
  if (::statvfs("/tmp/mesos", &buf) < 0) {
    std::cerr << "failed to statvfs: " << strerror(errno) << std::endl;
  } else {
    std::cerr << "/tmp/mesos bytes free: " << buf.f_bavail * buf.f_frsize
<< std::endl;
  }

  // Now try the actual path.
  if (::statvfs("/media/ephemeral0/var/log/mesos-slaves", &buf) < 0) {
    std::cerr << "failed to statvfs: " << strerror(errno) << std::endl;
  } else {
    std::cerr << "/media/ephemeral0/var/log/mesos-slaves bytes free: " <<
buf.f_bavail * buf.f_frsize << std::endl;
  }
}


$ g++ symlink.c
$ ./a.out


On Wed, Jul 10, 2013 at 1:22 PM, Gary Malouf <ma...@gmail.com> wrote:

> I first tried using the path symlinked to - the ui still shows just 1gb of
> available disk space.  This is what is on the root volume - even though the
> work directory is on the much larger and empty instance one.
>
>
> Trying to run the program Ben suggested:
>
> On CentOS 6.3, I get the following:
>
> [root@mesos-test-02 tmp]# gcc symlink.c
> symlink.c:3:20: error: iostream: No such file or directory
> symlink.c: In function ‘main’:
> symlink.c:10: error: expected expression before ‘:’ token
> symlink.c:13: error: expected expression before ‘:’ token
> symlink.c:17: error: expected expression before ‘:’ token
> symlink.c:20: error: duplicate label ‘std’
> symlink.c:13: note: previous definition of ‘std’ was here
> symlink.c:20: error: expected expression before ‘:’ token
>
> I tried compiling with g++, but got:
>
> [root@mesos-test-02 tmp]# g++ symlink.c
> symlink.c: In function ‘int main()’:
> symlink.c:10: error: ‘ErrnoError’ was not declared in this scope
> symlink.c:17: error: ‘ErrnoError’ was not declared in this scope
>
> -Gary
>
>
> On Wed, Jul 10, 2013 at 3:30 PM, Gary Malouf <ma...@gmail.com>
> wrote:
>
> > I am running mesos-0.12.0-incubating.  Does the bug affect that one as
> > well?
> >
> >
> > On Wed, Jul 10, 2013 at 2:38 PM, Gary Malouf <malouf.gary@gmail.com
> >wrote:
> >
> >> Also relevant (copied from UI):
> >>
> >> Active Slaves (see all <http://localhost:5050/#/slaves>)   ID<
> http://localhost:5050/#/>
> >> Host <http://localhost:5050/#/>  CPUs <http://localhost:5050/#/>  Mem<
> http://localhost:5050/#/>
> >> Disk <http://localhost:5050/#/>  Registered <http://localhost:5050/#/>
>   …3744-1
> >> <http://localhost:5050/#/>  mesos-test-02
> >> <http://localhost:5050/#/slaves/201307092108-1315739402-5050-3744-1> 1
> 3
> >> GB 1 GB  21 hours ago <http://localhost:5050/#/>   …3744-0
> >> <http://localhost:5050/#/>  mesos-test-01
> >> <http://localhost:5050/#/slaves/201307092108-1315739402-5050-3744-0> 1
> 3
> >> GB 1 GB  21 hours ago <http://localhost:5050/#/>
> >>
> >>
> >> On Wed, Jul 10, 2013 at 2:36 PM, Gary Malouf <malouf.gary@gmail.com
> >wrote:
> >>
> >>> It says it is taking up 65% of the available disk space.  This is
> >>> strange since I have the work directory (/tmp/mesos) symlinked to an
> >>> instance volume that has almost 150GB free.
> >>>
> >>> I've put the relative terminal output below - I think the strong
> >>> preference would be for mesos to sensibly detect the stuff rather than
> it
> >>> be explicitly enumerated in configuration.
> >>>
> >>> slave.cpp:1233] Current disk usage 64.76%. Max allowed age: 2.47days
> >>>
> >>> [root@mesos-test-02 log]# du -hcs /media/ephemeral0/
> >>> 13M    /media/ephemeral0/
> >>> 13M    total
> >>>
> >>> [root@mesos-test-02 log]# df -h
> >>> Filesystem            Size  Used Avail Use% Mounted on
> >>> /dev/xvde1            5.0G  3.2G  1.5G  69% /
> >>> tmpfs                 1.8G     0  1.8G   0% /dev/shm
> >>> /dev/xvdf             394G  211M  374G   1% /media/ephemeral0
> >>>
> >>> [root@mesos-test-02 tmp]# ls -la
> >>> total 232
> >>> drwxrwxrwt.  4 root root   4096 Jul 10 18:33 .
> >>> dr-xr-xr-x. 22 root root   4096 Jul  9 16:49 ..
> >>> -rw-r--r--   1 root root 217689 Jul  9 21:58 chronos-1.log
> >>> drwxr-xr-x   2 root root   4096 Jul 10 01:03 hsperfdata_root
> >>> drwxrwxrwt   2 root root   4096 Jul  9 15:46 .ICE-unix
> >>> lrwxrwxrwx   1 root root     38 Jul  9 20:03 mesos ->
> >>> /media/ephemeral0/var/log/mesos-slaves
> >>>
> >>>
> >>> Thanks,
> >>>
> >>> Gary
> >>>
> >>>
> >>>
> >>>
> >>> On Tue, Jul 9, 2013 at 4:11 PM, Gary Malouf <malouf.gary@gmail.com
> >wrote:
> >>>
> >>>> Hi everyone,
> >>>>
> >>>> I have Mesos running with Chronos.  The UI shows the disk space being
> >>>> very low (1GB), but I have the log and slave work directories
> symlinked to
> >>>> locations on a disk with 374GB of free space.  How does the Mesos ui
> >>>> determine disk space?
> >>>>
> >>>> -Gary
> >>>>
> >>>
> >>>
> >>
> >
>

Re: Disk space in UI on EC2 instances

Posted by Gary Malouf <ma...@gmail.com>.
I first tried using the path symlinked to - the ui still shows just 1gb of
available disk space.  This is what is on the root volume - even though the
work directory is on the much larger and empty instance one.


Trying to run the program Ben suggested:

On CentOS 6.3, I get the following:

[root@mesos-test-02 tmp]# gcc symlink.c
symlink.c:3:20: error: iostream: No such file or directory
symlink.c: In function ‘main’:
symlink.c:10: error: expected expression before ‘:’ token
symlink.c:13: error: expected expression before ‘:’ token
symlink.c:17: error: expected expression before ‘:’ token
symlink.c:20: error: duplicate label ‘std’
symlink.c:13: note: previous definition of ‘std’ was here
symlink.c:20: error: expected expression before ‘:’ token

I tried compiling with g++, but got:

[root@mesos-test-02 tmp]# g++ symlink.c
symlink.c: In function ‘int main()’:
symlink.c:10: error: ‘ErrnoError’ was not declared in this scope
symlink.c:17: error: ‘ErrnoError’ was not declared in this scope

-Gary


On Wed, Jul 10, 2013 at 3:30 PM, Gary Malouf <ma...@gmail.com> wrote:

> I am running mesos-0.12.0-incubating.  Does the bug affect that one as
> well?
>
>
> On Wed, Jul 10, 2013 at 2:38 PM, Gary Malouf <ma...@gmail.com>wrote:
>
>> Also relevant (copied from UI):
>>
>> Active Slaves (see all <http://localhost:5050/#/slaves>)   ID<http://localhost:5050/#/>
>> Host <http://localhost:5050/#/>  CPUs <http://localhost:5050/#/>  Mem<http://localhost:5050/#/>
>> Disk <http://localhost:5050/#/>  Registered <http://localhost:5050/#/>   …3744-1
>> <http://localhost:5050/#/>  mesos-test-02
>> <http://localhost:5050/#/slaves/201307092108-1315739402-5050-3744-1> 1 3
>> GB 1 GB  21 hours ago <http://localhost:5050/#/>   …3744-0
>> <http://localhost:5050/#/>  mesos-test-01
>> <http://localhost:5050/#/slaves/201307092108-1315739402-5050-3744-0> 1 3
>> GB 1 GB  21 hours ago <http://localhost:5050/#/>
>>
>>
>> On Wed, Jul 10, 2013 at 2:36 PM, Gary Malouf <ma...@gmail.com>wrote:
>>
>>> It says it is taking up 65% of the available disk space.  This is
>>> strange since I have the work directory (/tmp/mesos) symlinked to an
>>> instance volume that has almost 150GB free.
>>>
>>> I've put the relative terminal output below - I think the strong
>>> preference would be for mesos to sensibly detect the stuff rather than it
>>> be explicitly enumerated in configuration.
>>>
>>> slave.cpp:1233] Current disk usage 64.76%. Max allowed age: 2.47days
>>>
>>> [root@mesos-test-02 log]# du -hcs /media/ephemeral0/
>>> 13M    /media/ephemeral0/
>>> 13M    total
>>>
>>> [root@mesos-test-02 log]# df -h
>>> Filesystem            Size  Used Avail Use% Mounted on
>>> /dev/xvde1            5.0G  3.2G  1.5G  69% /
>>> tmpfs                 1.8G     0  1.8G   0% /dev/shm
>>> /dev/xvdf             394G  211M  374G   1% /media/ephemeral0
>>>
>>> [root@mesos-test-02 tmp]# ls -la
>>> total 232
>>> drwxrwxrwt.  4 root root   4096 Jul 10 18:33 .
>>> dr-xr-xr-x. 22 root root   4096 Jul  9 16:49 ..
>>> -rw-r--r--   1 root root 217689 Jul  9 21:58 chronos-1.log
>>> drwxr-xr-x   2 root root   4096 Jul 10 01:03 hsperfdata_root
>>> drwxrwxrwt   2 root root   4096 Jul  9 15:46 .ICE-unix
>>> lrwxrwxrwx   1 root root     38 Jul  9 20:03 mesos ->
>>> /media/ephemeral0/var/log/mesos-slaves
>>>
>>>
>>> Thanks,
>>>
>>> Gary
>>>
>>>
>>>
>>>
>>> On Tue, Jul 9, 2013 at 4:11 PM, Gary Malouf <ma...@gmail.com>wrote:
>>>
>>>> Hi everyone,
>>>>
>>>> I have Mesos running with Chronos.  The UI shows the disk space being
>>>> very low (1GB), but I have the log and slave work directories symlinked to
>>>> locations on a disk with 374GB of free space.  How does the Mesos ui
>>>> determine disk space?
>>>>
>>>> -Gary
>>>>
>>>
>>>
>>
>

Fwd: Disk space in UI on EC2 instances

Posted by Vinod Kone <vi...@gmail.com>.
---------- Forwarded message ----------
From: Vinod Kone <vi...@twitter.com>
Date: Wed, Jul 10, 2013 at 12:46 PM
Subject: Re: Disk space in UI on EC2 instances
To: dev <de...@mesos.apache.org>


Yea, the bug exists in 0.12.0. This was fixed in 0.13.0. You could either
run 0.13.0-rc2
<https://git-wip-us.apache.org/repos/asf?p=mesos.git;a=commit;h=09f4c11b820124a42c18d52ce80ad0e1fc5abc82>(not
yet released but it is tagged) to get the fix or just manually apply the
tiny patch below. Note that the below patch assumes slave work directory
exists before the slave is started (which is also a bug that was fixed in
0.14.0).


Author: Vinod Kone <vi...@apache.org>
Date:   Fri Apr 26 19:05:37 2013 +0000

    Fixed the slave to do disk usage calculations on the filesystem on
    which the slave work directory is mounted.

    Review: https://reviews.apache.org/r/10661

    git-svn-id:
https://svn.apache.org/repos/asf/incubator/mesos/trunk@147634513f79535-47bb-0310-9956-ffa450edef68

diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index 749c958..86a15fc 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -151,7 +151,9 @@ Slave::Slave(const slave::Flags& _flags,
   if (resources.disk().isSome()) {
     disk = resources.disk().get();
   } else {
-    Try<uint64_t> disk_ = fs::available(); // in bytes.
+    // NOTE: We calculate disk availability of the file system on
+    // which the slave work directory is mounted.
+    Try<uint64_t> disk_ = fs::available(flags.work_dir); // in bytes.
     if (!disk_.isSome()) {
       LOG(WARNING) << "Failed to auto-detect the free disk space,"
                    << " defaulting to " << DEFAULT_DISK  << " MB";
@@ -2459,7 +2461,9 @@ void Slave::checkDiskUsage()
 {
   // TODO(vinod): We are making usage a Future, so that we can plug in
   // fs::usage() into async.
-  Future<Try<double> >(fs::usage())
+  // NOTE: We calculate disk usage of the file system on which the
+  // slave work directory is mounted.
+  Future<Try<double> >(fs::usage(flags.work_dir))
     .onAny(defer(self(), &Slave::_checkDiskUsage, params::_1));
 }



@vinodkone


On Wed, Jul 10, 2013 at 12:30 PM, Gary Malouf <ma...@gmail.com> wrote:

> I am running mesos-0.12.0-incubating.  Does the bug affect that one as
> well?
>
>
> On Wed, Jul 10, 2013 at 2:38 PM, Gary Malouf <ma...@gmail.com>
> wrote:
>
> > Also relevant (copied from UI):
> >
> > Active Slaves (see all <http://localhost:5050/#/slaves>)   ID<
> http://localhost:5050/#/>
> > Host <http://localhost:5050/#/>  CPUs <http://localhost:5050/#/>  Mem<
> http://localhost:5050/#/>
> > Disk <http://localhost:5050/#/>  Registered <http://localhost:5050/#/>
>   …3744-1
> > <http://localhost:5050/#/>  mesos-test-02
> > <http://localhost:5050/#/slaves/201307092108-1315739402-5050-3744-1> 1 3
> > GB 1 GB  21 hours ago <http://localhost:5050/#/>   …3744-0
> > <http://localhost:5050/#/>  mesos-test-01
> > <http://localhost:5050/#/slaves/201307092108-1315739402-5050-3744-0> 1 3
> > GB 1 GB  21 hours ago <http://localhost:5050/#/>
> >
> >
> > On Wed, Jul 10, 2013 at 2:36 PM, Gary Malouf <malouf.gary@gmail.com
> >wrote:
> >
> >> It says it is taking up 65% of the available disk space.  This is
> strange
> >> since I have the work directory (/tmp/mesos) symlinked to an instance
> >> volume that has almost 150GB free.
> >>
> >> I've put the relative terminal output below - I think the strong
> >> preference would be for mesos to sensibly detect the stuff rather than
> it
> >> be explicitly enumerated in configuration.
> >>
> >> slave.cpp:1233] Current disk usage 64.76%. Max allowed age: 2.47days
> >>
> >> [root@mesos-test-02 log]# du -hcs /media/ephemeral0/
> >> 13M    /media/ephemeral0/
> >> 13M    total
> >>
> >> [root@mesos-test-02 log]# df -h
> >> Filesystem            Size  Used Avail Use% Mounted on
> >> /dev/xvde1            5.0G  3.2G  1.5G  69% /
> >> tmpfs                 1.8G     0  1.8G   0% /dev/shm
> >> /dev/xvdf             394G  211M  374G   1% /media/ephemeral0
> >>
> >> [root@mesos-test-02 tmp]# ls -la
> >> total 232
> >> drwxrwxrwt.  4 root root   4096 Jul 10 18:33 .
> >> dr-xr-xr-x. 22 root root   4096 Jul  9 16:49 ..
> >> -rw-r--r--   1 root root 217689 Jul  9 21:58 chronos-1.log
> >> drwxr-xr-x   2 root root   4096 Jul 10 01:03 hsperfdata_root
> >> drwxrwxrwt   2 root root   4096 Jul  9 15:46 .ICE-unix
> >> lrwxrwxrwx   1 root root     38 Jul  9 20:03 mesos ->
> >> /media/ephemeral0/var/log/mesos-slaves
> >>
> >>
> >> Thanks,
> >>
> >> Gary
> >>
> >>
> >>
> >>
> >> On Tue, Jul 9, 2013 at 4:11 PM, Gary Malouf <malouf.gary@gmail.com
> >wrote:
> >>
> >>> Hi everyone,
> >>>
> >>> I have Mesos running with Chronos.  The UI shows the disk space being
> >>> very low (1GB), but I have the log and slave work directories
> symlinked to
> >>> locations on a disk with 374GB of free space.  How does the Mesos ui
> >>> determine disk space?
> >>>
> >>> -Gary
> >>>
> >>
> >>
> >
>

Re: Disk space in UI on EC2 instances

Posted by Vinod Kone <vi...@twitter.com>.
Yea, the bug exists in 0.12.0. This was fixed in 0.13.0. You could either
run 0.13.0-rc2
<https://git-wip-us.apache.org/repos/asf?p=mesos.git;a=commit;h=09f4c11b820124a42c18d52ce80ad0e1fc5abc82>(not
yet released but it is tagged) to get the fix or just manually apply the
tiny patch below. Note that the below patch assumes slave work directory
exists before the slave is started (which is also a bug that was fixed in
0.14.0).


Author: Vinod Kone <vi...@apache.org>
Date:   Fri Apr 26 19:05:37 2013 +0000

    Fixed the slave to do disk usage calculations on the filesystem on
    which the slave work directory is mounted.

    Review: https://reviews.apache.org/r/10661

    git-svn-id:
https://svn.apache.org/repos/asf/incubator/mesos/trunk@147634513f79535-47bb-0310-9956-ffa450edef68

diff --git a/src/slave/slave.cpp b/src/slave/slave.cpp
index 749c958..86a15fc 100644
--- a/src/slave/slave.cpp
+++ b/src/slave/slave.cpp
@@ -151,7 +151,9 @@ Slave::Slave(const slave::Flags& _flags,
   if (resources.disk().isSome()) {
     disk = resources.disk().get();
   } else {
-    Try<uint64_t> disk_ = fs::available(); // in bytes.
+    // NOTE: We calculate disk availability of the file system on
+    // which the slave work directory is mounted.
+    Try<uint64_t> disk_ = fs::available(flags.work_dir); // in bytes.
     if (!disk_.isSome()) {
       LOG(WARNING) << "Failed to auto-detect the free disk space,"
                    << " defaulting to " << DEFAULT_DISK  << " MB";
@@ -2459,7 +2461,9 @@ void Slave::checkDiskUsage()
 {
   // TODO(vinod): We are making usage a Future, so that we can plug in
   // fs::usage() into async.
-  Future<Try<double> >(fs::usage())
+  // NOTE: We calculate disk usage of the file system on which the
+  // slave work directory is mounted.
+  Future<Try<double> >(fs::usage(flags.work_dir))
     .onAny(defer(self(), &Slave::_checkDiskUsage, params::_1));
 }



@vinodkone


On Wed, Jul 10, 2013 at 12:30 PM, Gary Malouf <ma...@gmail.com> wrote:

> I am running mesos-0.12.0-incubating.  Does the bug affect that one as
> well?
>
>
> On Wed, Jul 10, 2013 at 2:38 PM, Gary Malouf <ma...@gmail.com>
> wrote:
>
> > Also relevant (copied from UI):
> >
> > Active Slaves (see all <http://localhost:5050/#/slaves>)   ID<
> http://localhost:5050/#/>
> > Host <http://localhost:5050/#/>  CPUs <http://localhost:5050/#/>  Mem<
> http://localhost:5050/#/>
> > Disk <http://localhost:5050/#/>  Registered <http://localhost:5050/#/>
>   …3744-1
> > <http://localhost:5050/#/>  mesos-test-02
> > <http://localhost:5050/#/slaves/201307092108-1315739402-5050-3744-1> 1 3
> > GB 1 GB  21 hours ago <http://localhost:5050/#/>   …3744-0
> > <http://localhost:5050/#/>  mesos-test-01
> > <http://localhost:5050/#/slaves/201307092108-1315739402-5050-3744-0> 1 3
> > GB 1 GB  21 hours ago <http://localhost:5050/#/>
> >
> >
> > On Wed, Jul 10, 2013 at 2:36 PM, Gary Malouf <malouf.gary@gmail.com
> >wrote:
> >
> >> It says it is taking up 65% of the available disk space.  This is
> strange
> >> since I have the work directory (/tmp/mesos) symlinked to an instance
> >> volume that has almost 150GB free.
> >>
> >> I've put the relative terminal output below - I think the strong
> >> preference would be for mesos to sensibly detect the stuff rather than
> it
> >> be explicitly enumerated in configuration.
> >>
> >> slave.cpp:1233] Current disk usage 64.76%. Max allowed age: 2.47days
> >>
> >> [root@mesos-test-02 log]# du -hcs /media/ephemeral0/
> >> 13M    /media/ephemeral0/
> >> 13M    total
> >>
> >> [root@mesos-test-02 log]# df -h
> >> Filesystem            Size  Used Avail Use% Mounted on
> >> /dev/xvde1            5.0G  3.2G  1.5G  69% /
> >> tmpfs                 1.8G     0  1.8G   0% /dev/shm
> >> /dev/xvdf             394G  211M  374G   1% /media/ephemeral0
> >>
> >> [root@mesos-test-02 tmp]# ls -la
> >> total 232
> >> drwxrwxrwt.  4 root root   4096 Jul 10 18:33 .
> >> dr-xr-xr-x. 22 root root   4096 Jul  9 16:49 ..
> >> -rw-r--r--   1 root root 217689 Jul  9 21:58 chronos-1.log
> >> drwxr-xr-x   2 root root   4096 Jul 10 01:03 hsperfdata_root
> >> drwxrwxrwt   2 root root   4096 Jul  9 15:46 .ICE-unix
> >> lrwxrwxrwx   1 root root     38 Jul  9 20:03 mesos ->
> >> /media/ephemeral0/var/log/mesos-slaves
> >>
> >>
> >> Thanks,
> >>
> >> Gary
> >>
> >>
> >>
> >>
> >> On Tue, Jul 9, 2013 at 4:11 PM, Gary Malouf <malouf.gary@gmail.com
> >wrote:
> >>
> >>> Hi everyone,
> >>>
> >>> I have Mesos running with Chronos.  The UI shows the disk space being
> >>> very low (1GB), but I have the log and slave work directories
> symlinked to
> >>> locations on a disk with 374GB of free space.  How does the Mesos ui
> >>> determine disk space?
> >>>
> >>> -Gary
> >>>
> >>
> >>
> >
>

Re: Disk space in UI on EC2 instances

Posted by Gary Malouf <ma...@gmail.com>.
I am running mesos-0.12.0-incubating.  Does the bug affect that one as well?


On Wed, Jul 10, 2013 at 2:38 PM, Gary Malouf <ma...@gmail.com> wrote:

> Also relevant (copied from UI):
>
> Active Slaves (see all <http://localhost:5050/#/slaves>)   ID<http://localhost:5050/#/>
> Host <http://localhost:5050/#/>  CPUs <http://localhost:5050/#/>  Mem<http://localhost:5050/#/>
> Disk <http://localhost:5050/#/>  Registered <http://localhost:5050/#/>   …3744-1
> <http://localhost:5050/#/>  mesos-test-02
> <http://localhost:5050/#/slaves/201307092108-1315739402-5050-3744-1> 1 3
> GB 1 GB  21 hours ago <http://localhost:5050/#/>   …3744-0
> <http://localhost:5050/#/>  mesos-test-01
> <http://localhost:5050/#/slaves/201307092108-1315739402-5050-3744-0> 1 3
> GB 1 GB  21 hours ago <http://localhost:5050/#/>
>
>
> On Wed, Jul 10, 2013 at 2:36 PM, Gary Malouf <ma...@gmail.com>wrote:
>
>> It says it is taking up 65% of the available disk space.  This is strange
>> since I have the work directory (/tmp/mesos) symlinked to an instance
>> volume that has almost 150GB free.
>>
>> I've put the relative terminal output below - I think the strong
>> preference would be for mesos to sensibly detect the stuff rather than it
>> be explicitly enumerated in configuration.
>>
>> slave.cpp:1233] Current disk usage 64.76%. Max allowed age: 2.47days
>>
>> [root@mesos-test-02 log]# du -hcs /media/ephemeral0/
>> 13M    /media/ephemeral0/
>> 13M    total
>>
>> [root@mesos-test-02 log]# df -h
>> Filesystem            Size  Used Avail Use% Mounted on
>> /dev/xvde1            5.0G  3.2G  1.5G  69% /
>> tmpfs                 1.8G     0  1.8G   0% /dev/shm
>> /dev/xvdf             394G  211M  374G   1% /media/ephemeral0
>>
>> [root@mesos-test-02 tmp]# ls -la
>> total 232
>> drwxrwxrwt.  4 root root   4096 Jul 10 18:33 .
>> dr-xr-xr-x. 22 root root   4096 Jul  9 16:49 ..
>> -rw-r--r--   1 root root 217689 Jul  9 21:58 chronos-1.log
>> drwxr-xr-x   2 root root   4096 Jul 10 01:03 hsperfdata_root
>> drwxrwxrwt   2 root root   4096 Jul  9 15:46 .ICE-unix
>> lrwxrwxrwx   1 root root     38 Jul  9 20:03 mesos ->
>> /media/ephemeral0/var/log/mesos-slaves
>>
>>
>> Thanks,
>>
>> Gary
>>
>>
>>
>>
>> On Tue, Jul 9, 2013 at 4:11 PM, Gary Malouf <ma...@gmail.com>wrote:
>>
>>> Hi everyone,
>>>
>>> I have Mesos running with Chronos.  The UI shows the disk space being
>>> very low (1GB), but I have the log and slave work directories symlinked to
>>> locations on a disk with 374GB of free space.  How does the Mesos ui
>>> determine disk space?
>>>
>>> -Gary
>>>
>>
>>
>

Re: Disk space in UI on EC2 instances

Posted by Vinod Kone <vi...@gmail.com>.
Also, what version of mesos are you running?

There was a bug in mesos https://issues.apache.org/jira/browse/MESOS-515,
that incorrectly calculated the free disk space. This was fixed in trunk,
but never back ported to any of the released versions.


On Wed, Jul 10, 2013 at 11:51 AM, Benjamin Mahler <benjamin.mahler@gmail.com
> wrote:

> Can you try setting the work directory to
> /media/ephemeral0/var/log/mesos-slaves
> instead your symlink? We statvfs which IIUC should resolve symlinks.. but
> perhaps it is computing the size of the volume that the symlink resides on.
>
> You could test this with a simple program:
>
> symlink.c:
>
> #include <sys/statvfs.h>
>
> #include <iostream>
>
> int main()
> {
>   // First check with the symlink.
>   struct statvfs buf;
>   if (::statvfs("/tmp/mesos", &buf) < 0) {
>     return ErrnoError();
>   }
>   std::cerr << "/tmp/mesos bytes free: " << buf.f_bavail * buf.f_frsize <<
> std::endl;
>
>   // Now try the actual path.
>   if (::statvfs("/media/ephemeral0/var/log/mesos-slaves", &buf) < 0) {
>     return ErrnoError();
>   }
>   std::cerr << "/media/ephemeral0/var/log/mesos-slaves bytes free: " <<
> buf.f_bavail * buf.f_frsize << std::endl;
> }
>
>
> $ gcc symlink.c
> $ ./a.out
>
>
>
> On Wed, Jul 10, 2013 at 11:38 AM, Gary Malouf <ma...@gmail.com>
> wrote:
>
> > Also relevant (copied from UI):
> >
> > Active Slaves (see all <http://localhost:5050/#/slaves>)
> > ID<http://localhost:5050/#/>
> > Host <http://localhost:5050/#/>  CPUs <http://localhost:5050/#/>
> > Mem<http://localhost:5050/#/>
> > Disk <http://localhost:5050/#/>  Registered <http://localhost:5050/#/>
> >   …3744-1
> > <http://localhost:5050/#/>  mesos-test-02
> > <http://localhost:5050/#/slaves/201307092108-1315739402-5050-3744-1> 1 3
> > GB 1
> > GB  21 hours ago <http://localhost:5050/#/>   …3744-0
> > <http://localhost:5050/#/>  mesos-test-01
> > <http://localhost:5050/#/slaves/201307092108-1315739402-5050-3744-0> 1 3
> > GB 1
> > GB  21 hours ago <http://localhost:5050/#/>
> >
> >
> > On Wed, Jul 10, 2013 at 2:36 PM, Gary Malouf <ma...@gmail.com>
> > wrote:
> >
> > > It says it is taking up 65% of the available disk space.  This is
> strange
> > > since I have the work directory (/tmp/mesos) symlinked to an instance
> > > volume that has almost 150GB free.
> > >
> > > I've put the relative terminal output below - I think the strong
> > > preference would be for mesos to sensibly detect the stuff rather than
> it
> > > be explicitly enumerated in configuration.
> > >
> > > slave.cpp:1233] Current disk usage 64.76%. Max allowed age: 2.47days
> > >
> > > [root@mesos-test-02 log]# du -hcs /media/ephemeral0/
> > > 13M    /media/ephemeral0/
> > > 13M    total
> > >
> > > [root@mesos-test-02 log]# df -h
> > > Filesystem            Size  Used Avail Use% Mounted on
> > > /dev/xvde1            5.0G  3.2G  1.5G  69% /
> > > tmpfs                 1.8G     0  1.8G   0% /dev/shm
> > > /dev/xvdf             394G  211M  374G   1% /media/ephemeral0
> > >
> > > [root@mesos-test-02 tmp]# ls -la
> > > total 232
> > > drwxrwxrwt.  4 root root   4096 Jul 10 18:33 .
> > > dr-xr-xr-x. 22 root root   4096 Jul  9 16:49 ..
> > > -rw-r--r--   1 root root 217689 Jul  9 21:58 chronos-1.log
> > > drwxr-xr-x   2 root root   4096 Jul 10 01:03 hsperfdata_root
> > > drwxrwxrwt   2 root root   4096 Jul  9 15:46 .ICE-unix
> > > lrwxrwxrwx   1 root root     38 Jul  9 20:03 mesos ->
> > > /media/ephemeral0/var/log/mesos-slaves
> > >
> > >
> > > Thanks,
> > >
> > > Gary
> > >
> > >
> > >
> > >
> > > On Tue, Jul 9, 2013 at 4:11 PM, Gary Malouf <ma...@gmail.com>
> > wrote:
> > >
> > >> Hi everyone,
> > >>
> > >> I have Mesos running with Chronos.  The UI shows the disk space being
> > >> very low (1GB), but I have the log and slave work directories
> symlinked
> > to
> > >> locations on a disk with 374GB of free space.  How does the Mesos ui
> > >> determine disk space?
> > >>
> > >> -Gary
> > >>
> > >
> > >
> >
>

Re: Disk space in UI on EC2 instances

Posted by Benjamin Mahler <be...@gmail.com>.
Can you try setting the work directory to
/media/ephemeral0/var/log/mesos-slaves
instead your symlink? We statvfs which IIUC should resolve symlinks.. but
perhaps it is computing the size of the volume that the symlink resides on.

You could test this with a simple program:

symlink.c:

#include <sys/statvfs.h>

#include <iostream>

int main()
{
  // First check with the symlink.
  struct statvfs buf;
  if (::statvfs("/tmp/mesos", &buf) < 0) {
    return ErrnoError();
  }
  std::cerr << "/tmp/mesos bytes free: " << buf.f_bavail * buf.f_frsize <<
std::endl;

  // Now try the actual path.
  if (::statvfs("/media/ephemeral0/var/log/mesos-slaves", &buf) < 0) {
    return ErrnoError();
  }
  std::cerr << "/media/ephemeral0/var/log/mesos-slaves bytes free: " <<
buf.f_bavail * buf.f_frsize << std::endl;
}


$ gcc symlink.c
$ ./a.out



On Wed, Jul 10, 2013 at 11:38 AM, Gary Malouf <ma...@gmail.com> wrote:

> Also relevant (copied from UI):
>
> Active Slaves (see all <http://localhost:5050/#/slaves>)
> ID<http://localhost:5050/#/>
> Host <http://localhost:5050/#/>  CPUs <http://localhost:5050/#/>
> Mem<http://localhost:5050/#/>
> Disk <http://localhost:5050/#/>  Registered <http://localhost:5050/#/>
>   …3744-1
> <http://localhost:5050/#/>  mesos-test-02
> <http://localhost:5050/#/slaves/201307092108-1315739402-5050-3744-1> 1 3
> GB 1
> GB  21 hours ago <http://localhost:5050/#/>   …3744-0
> <http://localhost:5050/#/>  mesos-test-01
> <http://localhost:5050/#/slaves/201307092108-1315739402-5050-3744-0> 1 3
> GB 1
> GB  21 hours ago <http://localhost:5050/#/>
>
>
> On Wed, Jul 10, 2013 at 2:36 PM, Gary Malouf <ma...@gmail.com>
> wrote:
>
> > It says it is taking up 65% of the available disk space.  This is strange
> > since I have the work directory (/tmp/mesos) symlinked to an instance
> > volume that has almost 150GB free.
> >
> > I've put the relative terminal output below - I think the strong
> > preference would be for mesos to sensibly detect the stuff rather than it
> > be explicitly enumerated in configuration.
> >
> > slave.cpp:1233] Current disk usage 64.76%. Max allowed age: 2.47days
> >
> > [root@mesos-test-02 log]# du -hcs /media/ephemeral0/
> > 13M    /media/ephemeral0/
> > 13M    total
> >
> > [root@mesos-test-02 log]# df -h
> > Filesystem            Size  Used Avail Use% Mounted on
> > /dev/xvde1            5.0G  3.2G  1.5G  69% /
> > tmpfs                 1.8G     0  1.8G   0% /dev/shm
> > /dev/xvdf             394G  211M  374G   1% /media/ephemeral0
> >
> > [root@mesos-test-02 tmp]# ls -la
> > total 232
> > drwxrwxrwt.  4 root root   4096 Jul 10 18:33 .
> > dr-xr-xr-x. 22 root root   4096 Jul  9 16:49 ..
> > -rw-r--r--   1 root root 217689 Jul  9 21:58 chronos-1.log
> > drwxr-xr-x   2 root root   4096 Jul 10 01:03 hsperfdata_root
> > drwxrwxrwt   2 root root   4096 Jul  9 15:46 .ICE-unix
> > lrwxrwxrwx   1 root root     38 Jul  9 20:03 mesos ->
> > /media/ephemeral0/var/log/mesos-slaves
> >
> >
> > Thanks,
> >
> > Gary
> >
> >
> >
> >
> > On Tue, Jul 9, 2013 at 4:11 PM, Gary Malouf <ma...@gmail.com>
> wrote:
> >
> >> Hi everyone,
> >>
> >> I have Mesos running with Chronos.  The UI shows the disk space being
> >> very low (1GB), but I have the log and slave work directories symlinked
> to
> >> locations on a disk with 374GB of free space.  How does the Mesos ui
> >> determine disk space?
> >>
> >> -Gary
> >>
> >
> >
>

Re: Disk space in UI on EC2 instances

Posted by Gary Malouf <ma...@gmail.com>.
Also relevant (copied from UI):

Active Slaves (see all <http://localhost:5050/#/slaves>)
ID<http://localhost:5050/#/>
Host <http://localhost:5050/#/>  CPUs <http://localhost:5050/#/>
Mem<http://localhost:5050/#/>
Disk <http://localhost:5050/#/>  Registered <http://localhost:5050/#/>
  …3744-1
<http://localhost:5050/#/>  mesos-test-02
<http://localhost:5050/#/slaves/201307092108-1315739402-5050-3744-1> 1 3 GB 1
GB  21 hours ago <http://localhost:5050/#/>   …3744-0
<http://localhost:5050/#/>  mesos-test-01
<http://localhost:5050/#/slaves/201307092108-1315739402-5050-3744-0> 1 3 GB 1
GB  21 hours ago <http://localhost:5050/#/>


On Wed, Jul 10, 2013 at 2:36 PM, Gary Malouf <ma...@gmail.com> wrote:

> It says it is taking up 65% of the available disk space.  This is strange
> since I have the work directory (/tmp/mesos) symlinked to an instance
> volume that has almost 150GB free.
>
> I've put the relative terminal output below - I think the strong
> preference would be for mesos to sensibly detect the stuff rather than it
> be explicitly enumerated in configuration.
>
> slave.cpp:1233] Current disk usage 64.76%. Max allowed age: 2.47days
>
> [root@mesos-test-02 log]# du -hcs /media/ephemeral0/
> 13M    /media/ephemeral0/
> 13M    total
>
> [root@mesos-test-02 log]# df -h
> Filesystem            Size  Used Avail Use% Mounted on
> /dev/xvde1            5.0G  3.2G  1.5G  69% /
> tmpfs                 1.8G     0  1.8G   0% /dev/shm
> /dev/xvdf             394G  211M  374G   1% /media/ephemeral0
>
> [root@mesos-test-02 tmp]# ls -la
> total 232
> drwxrwxrwt.  4 root root   4096 Jul 10 18:33 .
> dr-xr-xr-x. 22 root root   4096 Jul  9 16:49 ..
> -rw-r--r--   1 root root 217689 Jul  9 21:58 chronos-1.log
> drwxr-xr-x   2 root root   4096 Jul 10 01:03 hsperfdata_root
> drwxrwxrwt   2 root root   4096 Jul  9 15:46 .ICE-unix
> lrwxrwxrwx   1 root root     38 Jul  9 20:03 mesos ->
> /media/ephemeral0/var/log/mesos-slaves
>
>
> Thanks,
>
> Gary
>
>
>
>
> On Tue, Jul 9, 2013 at 4:11 PM, Gary Malouf <ma...@gmail.com> wrote:
>
>> Hi everyone,
>>
>> I have Mesos running with Chronos.  The UI shows the disk space being
>> very low (1GB), but I have the log and slave work directories symlinked to
>> locations on a disk with 374GB of free space.  How does the Mesos ui
>> determine disk space?
>>
>> -Gary
>>
>
>

Re: Disk space in UI on EC2 instances

Posted by Gary Malouf <ma...@gmail.com>.
It says it is taking up 65% of the available disk space.  This is strange
since I have the work directory (/tmp/mesos) symlinked to an instance
volume that has almost 150GB free.

I've put the relative terminal output below - I think the strong preference
would be for mesos to sensibly detect the stuff rather than it be
explicitly enumerated in configuration.

slave.cpp:1233] Current disk usage 64.76%. Max allowed age: 2.47days

[root@mesos-test-02 log]# du -hcs /media/ephemeral0/
13M    /media/ephemeral0/
13M    total

[root@mesos-test-02 log]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/xvde1            5.0G  3.2G  1.5G  69% /
tmpfs                 1.8G     0  1.8G   0% /dev/shm
/dev/xvdf             394G  211M  374G   1% /media/ephemeral0

[root@mesos-test-02 tmp]# ls -la
total 232
drwxrwxrwt.  4 root root   4096 Jul 10 18:33 .
dr-xr-xr-x. 22 root root   4096 Jul  9 16:49 ..
-rw-r--r--   1 root root 217689 Jul  9 21:58 chronos-1.log
drwxr-xr-x   2 root root   4096 Jul 10 01:03 hsperfdata_root
drwxrwxrwt   2 root root   4096 Jul  9 15:46 .ICE-unix
lrwxrwxrwx   1 root root     38 Jul  9 20:03 mesos ->
/media/ephemeral0/var/log/mesos-slaves


Thanks,

Gary




On Tue, Jul 9, 2013 at 4:11 PM, Gary Malouf <ma...@gmail.com> wrote:

> Hi everyone,
>
> I have Mesos running with Chronos.  The UI shows the disk space being very
> low (1GB), but I have the log and slave work directories symlinked to
> locations on a disk with 374GB of free space.  How does the Mesos ui
> determine disk space?
>
> -Gary
>