devel/google-perftools in a jail
Andrea Venturoli
ml at netfence.it
Mon Apr 5 07:57:40 UTC 2021
On 4/5/21 8:57 AM, yuri at FreeBSD.org wrote:
> I tried to reproduce this problem, but couldn't.
>
>
> I created the jail with the command:
>
> # jail -c path=/disk-huge/jail host.hostname=testjail ip4=inherit
> command=/etc/rc
Hello.
I don't know how your "plain" jail works (thin or thick?); I'm using
sysutils/ezjail.
ezjail shares a single base OS instance among each jail, overlayed with
specific files.
I.e. it
_ creates /usr/jails/basejail with a copy of the base OS (think make -D
/usrjails/basejail installworld)
_ creates each jail in /usr/jails/ e.g. /usr/jails/myjail and "mounts"
basejail inside each with nullfs
E.g.
# zfs list|grep myjail
zroot/ezjail/myjail 129G 647G 74.9G /usr/jails/myjail
#ls -l /usr/jails/myjail
total 45
-rw-r--r-- 2 root wheel 1089 Oct 30 15:49 .cshrc
-rw-r--r-- 2 root wheel 470 Oct 30 15:49 .profile
-rw------- 1 root wheel 1024 Sep 12 2017 .rnd
-r--r--r-- 1 root wheel 6177 Oct 30 15:49 COPYRIGHT
drwxr-xr-x 9 root wheel 9 May 18 2018 basejail
lrwxr-xr-x 1 root wheel 13 Sep 12 2017 bin -> /basejail/bin
drwxr-xr-x 10 root wheel 71 Mar 28 19:57 boot
dr-xr-xr-x 12 root wheel 512 Mar 28 20:00 dev
drwxr-xr-x 27 root wheel 110 Mar 6 12:11 etc
lrwxr-xr-x 1 root wheel 9 Sep 12 2017 home -> usr/home/
lrwxr-xr-x 1 root wheel 13 Sep 12 2017 lib -> /basejail/lib
lrwxr-xr-x 1 root wheel 17 Sep 12 2017 libexec -> /basejail/libexec
drwxr-xr-x 2 root wheel 2 Sep 12 2017 media
drwxr-xr-x 2 root wheel 2 Sep 12 2017 mnt
drwxr-xr-x 2 root wheel 2 Sep 12 2017 net
dr-xr-xr-x 1 root wheel 0 Apr 5 09:49 proc
lrwxr-xr-x 1 root wheel 16 Sep 12 2017 rescue -> /basejail/rescue
drwx------ 3 root wheel 11 Apr 2 19:02 root
lrwxr-xr-x 1 root wheel 14 Sep 12 2017 sbin -> /basejail/sbin
lrwxr-xr-x 1 root wheel 11 Sep 12 2017 sys -> usr/src/sys
drwxrwxrwt 10 root wheel 12 Apr 5 07:05 tmp
drwxr-xr-x 6 root wheel 16 Feb 27 2019 usr
drwxr-xr-x 26 root wheel 26 Mar 28 20:00 var
# mount -t nullfs|grep myjail
/usr/jails/basejail on /usr/jails/myjail/basejail (nullfs, local, read-only)
Does your plain jail do the same?
bye & Thanks
av.
P.S. I repeat I solved in another way, so don't get mad at this unless
it's in your interest.
More information about the freebsd-questions
mailing list