# ezjail root become full



## FryShadow (Sep 17, 2009)

Hi all,

I'm about to test ezjail with pf as my load balancing, with 3 apache jail host and 1 mysql jail host.

As I create the jail hosts I noticed that the root ( / ) filesystem for the host become occupied and limiting me to create more jail for testing. I'm using default recommended size for my installation for the host system :


```
Filesystem                      Size    Used   Avail Capacity  Mounted on
/dev/ad2s1a                     [B]496M    361M     95M    79%    /[/B]
devfs                           1.0K    1.0K      0B   100%    /dev
/dev/ad2s1e                     496M    4.2M    452M     1%    /tmp
/dev/ad2s1f                      42G    3.6G     36G     9%    /usr
/dev/ad2s1d                     1.9G    232M    1.5G    13%    /var
/usr/jails/basejail              42G    3.6G     36G     9%    /jails/httpd-3/basejail
devfs                           1.0K    1.0K      0B   100%    /jails/httpd-3/dev
fdescfs                         1.0K    1.0K      0B   100%    /jails/httpd-3/dev/fd
procfs                          4.0K    4.0K      0B   100%    /jails/httpd-3/proc
/usr/jails/basejail              42G    3.6G     36G     9%    /jails/httpd-2/basejail
devfs                           1.0K    1.0K      0B   100%    /jails/httpd-2/dev
fdescfs                         1.0K    1.0K      0B   100%    /jails/httpd-2/dev/fd
procfs                          4.0K    4.0K      0B   100%    /jails/httpd-2/proc
/usr/jails/basejail              42G    3.6G     36G     9%    /jails/httpd-1/basejail
devfs                           1.0K    1.0K      0B   100%    /jails/httpd-1/dev
fdescfs                         1.0K    1.0K      0B   100%    /jails/httpd-1/dev/fd
procfs                          4.0K    4.0K      0B   100%    /jails/httpd-1/proc
```

as for now I'm running 3 jails with Apache installed. Is there any tips for me to fix this ? What in my mind now is to reinstall the host system with large root ( / ) size for my future needs.



Thanks in advance.


----------



## SirDice (Sep 17, 2009)

Use a seperate filesystem for the /jails directory. It's now using the root filesystem which isn't that big.


----------



## FryShadow (Sep 17, 2009)

Thanks SirDice for your recommendation, I'll look into that


----------



## SirDice (Sep 17, 2009)

Have a look at what exactly is eating up the space.

Looking at your config again your jails shouldn't be using any space on root. 
My root filesystem is the same size but only has 80MB in use and I have 2 jails running. 
I'm not using ezjail however, I just create my own.


----------



## DutchDaemon (Sep 17, 2009)

[cmd=]du -kx / | sort -rn[/cmd]


----------



## FryShadow (Sep 17, 2009)

```
gateway# df -h /jails
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/ad2s1a    496M    361M     95M    79%    /
```

looks like the /jails itself mounted with the same path for the root

I create my jails using this command


```
# ezjail-admin create -r /jails/httpd-1 httpd-1 192.168.1.108
```


----------



## SirDice (Sep 17, 2009)

Try the command DD posted and see what that tells you.


----------



## FryShadow (Sep 18, 2009)

Ok, I just deleted all the jails, and create back. As for now the root is come back to normal.


```
gateway# df -h
Filesystem                      Size    Used   Avail Capacity  Mounted on
/dev/ad2s1a                     496M    144M    312M    31%    /
```

as in my ezjail.conf stated the root filesystem to store the jails files is in /usr/jails and I assume when I'm using this command :


```
ezjail-admin create -r /jails/httpd-1 httpd-1 192.168.1.108
```

the file has been duplicate in 2 filesystem /usr/jails and also in /jails which make the root to grow as well

the command should be :


```
ezjail-admin create -r /usr/jails/httpd-1 httpd-1 192.168.1.108
```

it's fixed for now  thanks to SirDice DutchDaemon


----------

