Page 19 of 25

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 05 Aug 2016 11:18
by alexey123
check command

Code: Select all

service thebrig troubleshoot

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 08 Aug 2016 10:40
by bocman
alexey123 wrote:check command
CODE: SELECT ALL
service thebrig troubleshoot
It has halped - I had created wrong rules for fstab (mountfs)
Now all is working.
Thanx!

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 11 Aug 2016 12:39
by ernie
alexey123 wrote:You can upgrade over webgui -Thebrig manager
Hello

I manage as you said but I seen this:

The latest version on GitHub is: 0.94

Your version is: 0.94

I launched the update with the button. I have always the issue with dataset.

What is the version of alcatraz with the correction for dataset ?

Edit : I have this error:
Fatal error: Call to undefined function gtext() in /mnt/pool1/jail/conf/ext/thebrig/extensions_thebrig_edit.php on line 537
if I go in the setup view of my jail.

DO I need to uninstall and install again the brig (alcatraz) and the jail ? Or there is more simple ?

Thanks

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 12 Aug 2016 07:14
by alexey123
gtext function present at /etc/inc/util.inc from revision 2758.
https://sourceforge.net/p/nas4free/code/2758/
Keep your NAS4free up to date

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 12 Aug 2016 09:08
by ernie
Hello,

I Am using the 10.2.0.2 - Prester (revision 2545). Do you mean that I had to move on 10.3 in order to use the last version of the brig Alcatraz ?

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 12 Aug 2016 09:57
by alexey123
I'll repair it today for back compability

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 12 Aug 2016 12:48
by ernie
Thanks

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 13 Aug 2016 17:24
by alexey123

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 14 Aug 2016 08:26
by Emeds
So I had finch before. I deleted the command scripts for pre-init/post-init. Then I began thebrig_install.sh step. Warning! */lang.inc failed to open stream: no such file or directory /var/tmp/.../change_ver.php
on line 49
/tmp/thebrig_install.sh: 81: Syntax error: "fi" unexpected (expecting then)

I looked at the install script, the syntax looks good to me, nor did I change it... What's causing this message?

edit: maybe i should restart and try again.

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 15 Aug 2016 11:05
by bocman
Hello!
After something I cann't enter into my jail "main"^

Code: Select all

root@nas:/etc/rc.d# service thebrig troubleshoot
jls: jail "main" not found
Can not find problem. May be jail created with id= ??
root@nas:/etc/rc.d# service thebrig start main
Starting jails: security.jail.enforce_statfs: 2 -> 2
main main already exists

root@nas:/etc/rc.d# jls
   JID  IP Address      Hostname                      Path
root@nas:/etc/rc.d# jexec main
jexec: jail "main" not found
WebGUI|The Brig shows me that jail is started, but whithout ID (see attache) and I cann't pres stop/start button

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 15 Aug 2016 12:51
by alexey123
Emeds, I think you use wrong install script
try:

Code: Select all

fetch https://raw.githubusercontent.com/fsbruva/thebrig/alcatraz/thebrig_install.sh
sh thebrig_install.sh /PATH/TO/BRIG/FOLDER
/PATH/TO/BRIG/FOLDER -set as you need

bocman
Probably inside your jail fault present and it cannot be start as regular
In this case file /var/run/jail_main.id not remove and prevent to start your jail next time.
Remove this file manually

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 15 Aug 2016 13:33
by bocman
alexey123 wrote: bocman
Probably inside your jail fault present and it cannot be start as regular
In this case file /var/run/jail_main.id not remove and prevent to start your jail next time.
Remove this file manually
Thank you!
That helped!

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 16 Aug 2016 14:35
by ernie
alexey123 wrote:Done https://github.com/fsbruva/thebrig/comm ... 40ca716626
You can update from gui
Hello,

I updated via the interface of thebrig (alcatraz). When I go in the setup of the existing jail, I have now:
Fatal error: Call to undefined function html_combobox2() in /mnt/pool1/jail/conf/ext/thebrig/extensions_thebrig_edit.php on line 725

Do I kill the jail and create a new one ? Or is it another issue ?

Thanks for help.

Edit : I plan to move on 10.3 when I will finish a hardware upgrade. So Axeley, if you prefer stopping the development for 10.2 as it is end-of-life, it is fine for me. You can explain it on the first page. I'd like the presentation of Crest for Egui or RRD Graph : we see easily the warnings & limits.

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 17 Aug 2016 07:55
by Emeds
Thank you alexey, that was it, I should have been using Alcatraz. This is great :D

edit: i'm getting some errors - can't create a jail or export a backup after clean install. i'll paste the errors shortly.

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 20 Aug 2016 15:06
by ernie
Hello,

I updated my nas to 10.3. I updated also thebrig to 0.94.

Now I see the section for dataset.

I follow this:
viewtopic.php?f=79&t=3894&start=510#p69795

and I have:
Capture du 2016-08-20 14-59-41.png
then I save the setup and it is impossible to start the jail.
if I delete the configuration of zfs dataset for mount, I can start the jail.

Which path do I need for the mount ?
- the full path : /mnt/pool1/jail/cloud/...
- or the path in jail : /cloud/...

thanks

Edit: for information:
- I have a pool : pool1
- i have datasets : jail and others
- i installed thebrig alcatraz in the dataset 'jail'
- the jail 'cloud' is in the folder 'cloud' and this folder is in the dataset 'jail'

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 27 Aug 2016 21:08
by blc
Hi all

Weird problem here..
I can't get the jails started in the webwindow.. that lead me to this thread.

I tried command line, here's the error:
# service thebrig start test
Starting jails: security.jail.enforce_statfs: 2 -> 2
test jls: jail "test" not found
cannot start jail "test":
#

So.. here's a couple of other commands:
# service thebrig listall
101plex01 news sickrage shell test

# service thebrig troubleshoot
jail: /tank0/Data/Jail//conf/thebrig.conf line 5: ;: syntax error
jail: /tank0/Data/Jail//conf/thebrig.conf line 17: ;: syntax error
jail: /tank0/Data/Jail//conf/thebrig.conf line 30: ;: syntax error
jail: /tank0/Data/Jail//conf/thebrig.conf line 43: ;: syntax error
jail: /tank0/Data/Jail//conf/thebrig.conf line 5: ;: syntax error
jail: /tank0/Data/Jail//conf/thebrig.conf line 18: ;: syntax error
jail: /tank0/Data/Jail//conf/thebrig.conf line 31: ;: syntax error
jail: /tank0/Data/Jail//conf/thebrig.conf line 44: ;: syntax error
jail: /tank0/Data/Jail//conf/thebrig.conf line 5: ;: syntax error
jail: /tank0/Data/Jail//conf/thebrig.conf line 18: ;: syntax error
jail: /tank0/Data/Jail//conf/thebrig.conf line 31: ;: syntax error
jail: /tank0/Data/Jail//conf/thebrig.conf line 44: ;: syntax error

Any tips on what i can try/do?

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 27 Aug 2016 21:39
by alexey123
Upload to forum your thebrig.conf file

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 28 Aug 2016 11:17
by blc
Ok..
Here's the thebrig.conf file:

Code: Select all

# cat thebrig.conf
101plex01        {
        path = "/tank0/Data/Jail/101plex01";
        persist;
        host.hostname ="101plex01.localnet";
        enforce_statfs =;
        devfs_ruleset=101;
        mount.fstab="/tank0/Data/Jail/conf/jails/fstab.101plex01";
        ip4.addr = "em0|192.168.42.220";
        ;
        exec.start ="/bin/sh /etc/rc";
        exec.stop ="/bin/sh /etc/rc.shutdown";
}
news     {
        path = "/tank0/Data/Jail/news";
        persist;
        host.hostname ="news.localnet";
        enforce_statfs =;
        devfs_ruleset=102;
        mount.fstab="/tank0/Data/Jail/conf/jails/fstab.news";
        ip6.addr = "";
        ;
        mount.devfs;
        exec.start ="/bin/sh /etc/rc";
        exec.stop ="/bin/sh /etc/rc.shutdown";
}
sickrage         {
        path = "/tank0/Data/Jail/sickrage";
        persist;
        host.hostname ="sickrage.localnet";
        enforce_statfs =;
        devfs_ruleset=103;
        mount.fstab="/tank0/Data/Jail/conf/jails/fstab.sickrage";
        ip6.addr = "";
        ;
        mount.devfs;
        exec.start ="/bin/sh /etc/rc";
        exec.stop ="/bin/sh /etc/rc.shutdown";
}
shell    {
        path = "/tank0/Data/Jail/shell";
        persist;
        host.hostname ="shell.localnet";
        enforce_statfs =;
        devfs_ruleset=104;
        mount.fstab="/tank0/Data/Jail/conf/jails/fstab.shell";
        ip6.addr = "";
        ;
        mount.devfs;
        exec.start ="/bin/sh /etc/rc";
        exec.stop ="/bin/sh /etc/rc.shutdown";
}
test     {
        path = "/tank0/Data/Jail/test";
        persist;
        host.hostname ="test.localnet";
        enforce_statfs =2;
        devfs_ruleset=105;
        mount.fstab="/tank0/Data/Jail/conf/jails/fstab.test";
        ip4.addr = "em0|192.168.42.225/24";
        allow.mount;
        allow.mount.devfs;
        allow.mount.procfs;
        mount.devfs;
        exec.start ="/bin/sh /etc/rc";
        exec.stop ="/bin/sh /etc/rc.shutdown";
}
Since it's looking at devfs_ruleset, here's the contents of that:

Code: Select all

# cat devfs.rules 
##Thebrig rulesets##
[devfsrules_jail_101plex01=101]
add include $devfsrules_hide_all
add include $devfsrules_unhide_basic
add include $devfsrules_unhide_login


[devfsrules_jail_news=102]
add include $devfsrules_hide_all
add include $devfsrules_unhide_basic
add include $devfsrules_unhide_login


[devfsrules_jail_sickrage=103]
add include $devfsrules_hide_all
add include $devfsrules_unhide_basic
add include $devfsrules_unhide_login


[devfsrules_jail_shell=104]
add include $devfsrules_hide_all
add include $devfsrules_unhide_basic
add include $devfsrules_unhide_login


[devfsrules_jail_test=105]
add include $devfsrules_hide_all
add include $devfsrules_unhide_basic
add include $devfsrules_unhide_login

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 28 Aug 2016 12:46
by alexey123

Code: Select all

enforce_statfs =;
Is no good. Please define it as 1 or 2
1 allow mount inside jail jail frendly filesystems, 2 not allow mounts inside jail

Code: Select all

 ip4.addr = "em0|192.168.42.220";
You need define IP as 192.168.42.220/YOUR NET MASK, for example as 192.168.42.220/24

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 28 Aug 2016 17:39
by blc
Thanks

I had a suspicion this was the case..
Weird thing is though.. when i try to change it in the webgui, it will not..
If i manually edit the conf file in ssh, it just works..

This is a long way longer than i had reached from before, so thank you. :)

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 01 Sep 2016 09:25
by Emeds
Just thought I would report back... I did a fresh install of the latest N4F, followed this guide step by step (as well as the Plex guide here) and got things up and running smoothly. I really like 10.3 and would like to thank you all for your hard work!

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 04 Sep 2016 15:09
by erico.bettoni
I've just upgraded from 10.2 to 10.3 (2942) and will update TheBrig using the webgui.
After that, what is the proper way to upgrade my jails from FreeBSD 10.2 to 10.3?

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 04 Sep 2016 18:26
by MikeMac
erico.bettoni wrote:the proper way to upgrade
whole procedure could be simple or complex, depending of your sw config

for whole procedure I've written a manual. It is in Russian, but hope Google translation will be understandable

By the way, all screenshots are from English interface

https://translate.google.ru/translate?s ... edit-text=

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 05 Sep 2016 15:17
by erico.bettoni
MikeMac wrote:
erico.bettoni wrote:the proper way to upgrade
whole procedure could be simple or complex, depending of your sw config

for whole procedure I've written a manual. It is in Russian, but hope Google translation will be understandable

By the way, all screenshots are from English interface

https://translate.google.ru/translate?s ... edit-text=
My jails are very simple with software installed via pkg.
What I understood from the guide is that in this case simply using TheBrig update feature would bring them from 10.2 to 10.3?
I though something like freebsd-upgrade was necessary...

I will try with a test jail and see how it goes.

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 05 Sep 2016 16:06
by erico.bettoni
erico.bettoni wrote: My jails are very simple with software installed via pkg.
What I understood from the guide is that in this case simply using TheBrig update feature would bring them from 10.2 to 10.3?
I though something like freebsd-upgrade was necessary...

I will try with a test jail and see how it goes.
Yep, that was it.

1. Updated NAS4Free;
2. Updated TheBrig;
3. Restarted all my jails (just in case...);
4. Fetched then Installed 10.3 on every jail through TheBrig interface;
5. pkg update on every jail;
6. pkg upgrade on every jail;
7. Restart all may jails again.

Thank you.

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 07 Sep 2016 14:39
by ernie
Hello

I have always an issue in order to mount datasets.

I am using thebrig (alcatraz) on nas4free 10.3.0.3.2898.

I create a fresh new jail and hereafter is the configuration:

Code: Select all

cloud	 {
	path = "/mnt/master/extensions/thebrig/cloud";
	persist;
	host.hostname ="cloud.local";
	enforce_statfs =0;
	devfs_ruleset=101;
	mount.fstab="/mnt/master/extensions/thebrig/conf/jails/fstab.cloud";
	ip4.addr = "igb0|192.168.xxx.zzz/24";
	allow.mount;
	allow.mount.devfs;
	allow.mount.zfs;
	allow.mount.procfs;
	mount.devfs;
	exec.prestart ="/bin/sh /mnt/master/extensions/thebrig/conf/jails/prestart.cloud";
	exec.start ="/bin/sh /etc/rc";
	exec.poststart ="/bin/sh /mnt/master/extensions/thebrig/conf/jails/poststart.cloud";
	exec.prestop ="/bin/sh /mnt/master/extensions/thebrig/conf/jails/prestop.cloud";
	exec.stop ="/bin/sh /etc/rc.shutdown";
	exec.poststop ="/bin/sh /mnt/master/extensions/thebrig/conf/jails/poststop.cloud";
}
I added to this jail:
- at first a fstab information:

Code: Select all

/mnt/master/documents /mnt/master/extensions/thebrig/cloud/usr/local/www/owncloud/data/champagne/files/documents nullfs rw 0 0
then I saved, and then "apply". After I pressed the start button. Nothing happens

-At second I decided to use the 'zfs mount' field as I am using dataset:
Capture du 2016-09-07 14-31-07.png
Same behavior.

I would like to mount my datasets in owncloud. What is the right approach ?

Thanks for your help

Edit:
the dataset that I used disappeared...
I see it in dataset/information:
master/documents 64.3G 498G 59.9G /mnt/master/documents

But not in file manager view and not via CLI:

Code: Select all

zpool list
NAME     SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
master  1.09T   392G   720G         -    16%    35%  1.00x  ONLINE  -
pool1   7.25T  3.53T  3.72T         -     8%    48%  1.00x  ONLINE  -
nas4free1: ~# cd /mnt
nas4free1: /mnt# cd master
nas4free1: master# ls
admin      download   musiques   vbox
apple      extensions photos     video_pers
A synchronisation of zfs didn't change the issue.

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 08 Sep 2016 16:55
by ernie
Hello

With
zfs mount master/documents

I solved my issue on my disappeared dataset.

I see also that the property 'jailed' was switch on 'on'. I think it is an order of thebrig.

Does anybody know how to mount a dataset in a jail ?

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 11 Sep 2016 11:10
by vaskos
I have also problem with mounting zfs dataset into jail. Dataset property "jailed" is set to OFF.

If I enable option "ZFS dataset, mounted to jail" to /mnt/Mypool/hdbox1_dataset|/mnt , I can't start jail. If I delete this value, jail will start without problem.

Does anybody know how to mount ZFS dataset into jail ?

Thanks a lot for feedbacks :roll:

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 11 Sep 2016 11:40
by nef
Hi Guys!

I've got following problem with installing the brig. I am using latest amd64 embedded version of NAS4Free. Could you help me?

Code: Select all

nas4free: ~# fetch -o /tmp/thebrig_install.sh https://github.com/fsbruva/thebrig/raw/working/thebrig_install.sh
/tmp/thebrig_install.sh                       100% of 3839  B   11 MBps 00m00s
nas4free: ~# chmod a+x /tmp/thebrig_install.sh
nas4free: ~# /bin/sh /tmp/thebrig_install.sh /mnt/pool1/jail 2
fetch: https://github.com/fsbruva/thebrig/archive/alcatraz.zip: size of remote file is not known
alcatraz.zip                                           145 kB  301 kBps 00m00s
Unpacking the tarball...
Done!

Warning: file(/var/tmp/install_stage/conf/ext/thebrig/lang.inc): failed to open stream: No such file or directory in /root/temporary/conf/bin/change_ver.php on line 49
Hello, we will begin installing TheBrig now
/tmp/thebrig_install.sh: 81: Syntax error: "fi" unexpected (expecting "then")
nas4free: ~#

Re: [HOWTO] Install TheBrig - one Jail manager for N4F

Posted: 24 Sep 2016 14:07
by cookiemonster
@nef : yes, it seems the links from the first post are outdated. Looks like we'll need to look backwards from latest page on this thread searching for the latest working remote path. There is an url to the install script, which then fetches the files from the remote location as well.
I'm looking myself as well.