This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!



I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!

Embedded N4F Install - Jail issues - Out of Space

Jails with XigmaNAS
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
kalamingo
NewUser
NewUser
Posts: 14
Joined: 09 Jun 2013 18:13
Status: Offline

Embedded N4F Install - Jail issues - Out of Space

Post by kalamingo »

Hey guys,

I followed the instructions listed here: http://lameguy.wordpress.com/2013/02/05 ... l/#more-13
and have nas4Free installed on a 8GB flash drive and running, and setup a jails where when I type jls in shell it shows the process running so I know I've done all the steps correctly.

However, when I try to install some packages after that (following some steps here:viewtopic.php?f=72&t=1760&p=13614), i get out of disk space issues. Here is what I'm running:-

Code: Select all

mount_unionfs -o w /mnt/WD2TB/extensions/usr/ /usr/
umount -f /var
mount_unionfs -o w /mnt/WD2TB/extensions/var/ /var/
setenv PKG_TMPDIR /mnt/WD2TB/extensions/tmp/
setenv PACKAGESITE "ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-9-current/Latest/"
pkg_add -rv python27 py27-sqlite3
Python never successfully finishes because it runs out of space. I know that I've got the jails setup steps done but I'm not sure how to ensure the files are installed within the jails directory, and if I've configured it correctly.
In my rc.conf.local I have the following lines:

Code: Select all

 
jail_enable="YES" # enable jails YES|NO
jail_list="plugins" # name of the jail 
jail_plugins_rootdir="/jail/plugins" # path to my jail
jail_plugins_hostname="local" # hostname as configured in web GUI
jail_plugins_ip="192.168.1.10" # When I try the same IP address as the Nas server, i lose connectivity to the Nas, can't ping, when I try something random, I'm back online
jail_plugins_interface="bge0" # My network interface as listed on the splash screen once Nas4Free has finish booting up
jail_plugins_devfs_enable="YES" # use devfs
jail_plugins_mount_enable="YES" # mount YES|NO
jail_plugins_fstab="/jail/conf/fstab.plugins" # File with Filesystems to mount
Could someone advise whats wrong with my configuration and how I can get python (along with all the other packages that I need for SabNZBD, couchpotato, sickbeard) to be installed in a Jail instead of the USB.

Thanks heaps guys

kalamingo
NewUser
NewUser
Posts: 14
Joined: 09 Jun 2013 18:13
Status: Offline

Re: Embedded N4F Install - Jail issues - Out of Space

Post by kalamingo »

My list of mount points as from diagnosis > info > mounts

Code: Select all

List of mount points
/dev/md0 on / (ufs, local)
devfs on /dev (devfs, local, multilabel)
procfs on /proc (procfs, local)
/dev/ufsid/4dd77de144644ba4 on /mnt/WD1TB (ufs, local, soft-updates, acls)
/dev/ufsid/4dd1279b064f2792 on /mnt/WD2TB (ufs, local, soft-updates, acls)
/dev/ufsid/4deb776479b9b810 on /mnt/S250GB (ufs, local, soft-updates, acls)
/mnt/WD2TB/jail on /jail (nullfs, local)
/dev/da0s1a on /cf (ufs, local, read-only)
<above>:/mnt/WD2TB/extensions/usr on /usr (unionfs, local)
<above>:/mnt/WD2TB/extensions/var on /var (unionfs, local)

User avatar
raulfg3
Site Admin
Site Admin
Posts: 4865
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

Re: Embedded N4F Install - Jail issues - Out of Space

Post by raulfg3 »

this way to install jails is deprecated ( or only for BSD gurus), for normal users , you must use TheBrig:
viewtopic.php?f=79&t=3894

Please install TheBrig, and create a new jail for your needs.
12.1.0.4 - Ingva (revision 7743) on SUPERMICRO X8SIL-F 8GB of ECC RAM, 11x3TB disk in 1 vdev = Vpool = 32TB Raw size , so 29TB usable size (I Have other NAS as Backup)

Wiki
Last changes

HP T510

kalamingo
NewUser
NewUser
Posts: 14
Joined: 09 Jun 2013 18:13
Status: Offline

Re: Embedded N4F Install - Jail issues - Out of Space

Post by kalamingo »

Great. I'm reinstalling nas4free then installing TheBrig.

Still, could someone tell me what commands I need to run so I will be installing the packages below in the jail? Will just running these commands in the jail folder automatically download them in the jail?

Code: Select all

pkg_add -rv python27 py27-sqlite3
pkg_add -rv unzip
pkg_add -rv py27-yenc
pkg_add -rv py27-cheetah
pkg_add -rv py27-openssl
pkg_add -rv py27-feedparser
pkg_add -rv py27-utils
pkg_add -rv unrar
pkg_add -rv par2cmdline

kalamingo
NewUser
NewUser
Posts: 14
Joined: 09 Jun 2013 18:13
Status: Offline

Re: Embedded N4F Install - Jail issues - Out of Space

Post by kalamingo »

Hey guys,

Got TheBrig installed, added in a Jail but I can't get it to start!

I have my Jail location at: /mnt/WD2TB/jailcell/plugins/
Jail Name: plugins
fstab: /mnt/WD2TB/installations /mnt/WD2TB/jailcell/plugins/installations nullfs ro 0 0

Rudiment config, Installation Folders:
/mnt/WD2TB/jailcell/
/mnt/WD2TB/jailcell/basejail/
/mnt/WD2TB/jailcell/template/

All the relevant folders above have been created, but my jail can't start. I'm also not sure what to configure the IP Address to.
So my router is 192.168.1.254, computer devices range from 192.168.1.100 - 110, and NAS is 192.168.1.10.

I've tried 192.168.1.200, 192.168.2.100 and 10.0.0.100 and it still wont start. I'm also still confused as to how I can install python on in one of these jail folders so I can install SabNZBd, couchpotato, sickbeard.

Any help appreciated, thanks alot!

User avatar
raulfg3
Site Admin
Site Admin
Posts: 4865
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

Re: Embedded N4F Install - Jail issues - Out of Space

Post by raulfg3 »

no, you need first log into the jail.

first read about jails on:
http://wiki.nas4free.org/doku.php?id=do ... owto:jails

once done, you understand how to log into jail:

first you need to know what jail number have:
jls

next log into jail:
jexec numberofjail csh

once you log into jail, you can pkg_add what you need.

PD: remember to create jail folder into your data disk, so if you reinstall N4F in your boot device, you only need to restore previosly saved config to restore your working jails.
And because create a jail is ridiculus easy, you can test / try to install anything until works fine / as you need ( if not work, delete jail and create a new one)
12.1.0.4 - Ingva (revision 7743) on SUPERMICRO X8SIL-F 8GB of ECC RAM, 11x3TB disk in 1 vdev = Vpool = 32TB Raw size , so 29TB usable size (I Have other NAS as Backup)

Wiki
Last changes

HP T510

User avatar
raulfg3
Site Admin
Site Admin
Posts: 4865
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

Re: Embedded N4F Install - Jail issues - Out of Space

Post by raulfg3 »

before install anything into a jail, jail must start properly.
1 use an IP in the same range of you NAS, in your case 192.168.1.201 is a good IP
2 first time do not write any in fstab and try to start jail, if start good revise your fstab ( both folder must exist, /mnt/WD2TB/installations and /mnt/WD2TB/jailcell/plugins/installations nullfs)
12.1.0.4 - Ingva (revision 7743) on SUPERMICRO X8SIL-F 8GB of ECC RAM, 11x3TB disk in 1 vdev = Vpool = 32TB Raw size , so 29TB usable size (I Have other NAS as Backup)

Wiki
Last changes

HP T510

kalamingo
NewUser
NewUser
Posts: 14
Joined: 09 Jun 2013 18:13
Status: Offline

Re: Embedded N4F Install - Jail issues - Out of Space

Post by kalamingo »

Hi raulfg3,

Thanks for the details. I think I get my next steps from your comments and a few other tutorials I found. But the issue now I have to fix is starting the jail.

I've tried that IP range and removed the fstab, and it still doesnt start up. I went into the logs and notice this error:-
root: /etc/rc.d/jail: WARNING: devfs_domount(): Unable to mount devfs on /mnt/WD2TB/jailmaster/prototype//dev

Apparently an extra/ is added to the jail_prototype_rootdir when you save a jail, and when I removed this trailing "/" from /etc/rc.conf.local this error does not appear again in the logs. Not sure if this is a known bug.
However still after removing it and seeing no errors in the logs, my jail wont start :(

I have tried full and slim, different IP addresses, doesnt start. jls in command prompt shows nothing as well. ;(

User avatar
raulfg3
Site Admin
Site Admin
Posts: 4865
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

Re: Embedded N4F Install - Jail issues - Out of Space

Post by raulfg3 »

I'm really confused bout your install, please post where you install TheBring and post some scren captures of how you configure TheBring, and how you configure your jail.

you ask 3 post above about:

/mnt/WD2TB/jailcell/
/mnt/WD2TB/jailcell/basejail/
/mnt/WD2TB/jailcell/template/



and now ask about:
/mnt/WD2TB/jailmaster/prototype

this makes no sense for me.

PD: save your actual TheBring config and atach as zip to see what you configure.
12.1.0.4 - Ingva (revision 7743) on SUPERMICRO X8SIL-F 8GB of ECC RAM, 11x3TB disk in 1 vdev = Vpool = 32TB Raw size , so 29TB usable size (I Have other NAS as Backup)

Wiki
Last changes

HP T510

kalamingo
NewUser
NewUser
Posts: 14
Joined: 09 Jun 2013 18:13
Status: Offline

Re: Embedded N4F Install - Jail issues - Out of Space

Post by kalamingo »

Hi Raulfg3,

Apologies for the confusion. I reinstalled a few times which changed things. I followed everything in here for installation: viewtopic.php?f=79&t=3894
and only changed step 3 from: /bin/sh /tmp/thebrig_install.sh /mnt/NAS-A/Jail
to : /bin/sh /tmp/thebrig_install.sh /mnt/WD2TB/jailmaster


Here are some screenshots of my config after that + backup file.

https://www.dropbox.com/s/022h63y70ahe991/1.png
https://www.dropbox.com/s/lcl16au8ryelqjh/2.png
https://www.dropbox.com/s/ihboiq2vam5hp5l/3.png

https://www.dropbox.com/s/axegm56xgpnpt ... 064316.rar
or find it attached.
You do not have the required permissions to view the files attached to this post.

kalamingo
NewUser
NewUser
Posts: 14
Joined: 09 Jun 2013 18:13
Status: Offline

Re: Embedded N4F Install - Jail issues - Out of Space

Post by kalamingo »

Also - while creating a Jail, under the last section "Installation Source", I did not tick any "'Official FreeBSD Flavor" as it doesnt mention I need to in the guide. I read in another tutorial someone selecting the base file, but doing so and saving it causes my Nas4Free server to not respond :/

User avatar
raulfg3
Site Admin
Site Admin
Posts: 4865
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

Re: Embedded N4F Install - Jail issues - Out of Space

Post by raulfg3 »

ok, first disable start on boot on both jails ( you only enable it , when totally sure taht works fine) , so first you need to start using "start-icon", and when works, you can enable start on boot.

second edit one jail and post a jpg ( I want to see if you mark FreeBSDxxxxBASE.txz to create slim jail.

I see in config:

Code: Select all

base_ver>Unknown</base_ver>
		<lib_ver>Not Installed</lib_ver>
		<src_ver>Not Installed</src_ver>
		<doc_ver>Not Installed</doc_ver>
This mean that you do not select lib32 (correct), source ( correct) and doc (correct), but not sure what mean Unknown


PD: You need to create a folder named ports inside the jail in /usr

you can do outside the jail like this:

Code: Select all

mkdir  /mnt/WD2TB/jailmaster/omega/usr/ports
once done try to start jail by hand using "start icon" in the right of webGUI
12.1.0.4 - Ingva (revision 7743) on SUPERMICRO X8SIL-F 8GB of ECC RAM, 11x3TB disk in 1 vdev = Vpool = 32TB Raw size , so 29TB usable size (I Have other NAS as Backup)

Wiki
Last changes

HP T510

kalamingo
NewUser
NewUser
Posts: 14
Joined: 09 Jun 2013 18:13
Status: Offline

Re: Embedded N4F Install - Jail issues - Out of Space

Post by kalamingo »

Thanks Raulfg3. My jail starts now, the problem was that I did not add any "'Official FreeBSD Flavor" when creating the jail. It was not in the tutorial so hence I missed it.

I've successfully installed python into my jail, but I now got some questions. Since I am in a jail, when I try to do commands to mount locations within the jail, it says operations not permitted. I don't necessarily need to mount locations anymore since space is no longer an issue, is this correct?

I've also successfully setup SabNZBD but the next thing is I'm not sure how to write the startup script for it. Since this lies within a Jail, and the Jail itself has no GUI, how can I get the jail to run the sabnzbd script from outside the jail:
/usr/local/share/SABnzbd-0.7.12/SABnzbd.py -d -f /mnt/extensions/sabnzbd/sabnzbd.ini -s 192.168.1.204:8085


Thanks!

User avatar
raulfg3
Site Admin
Site Admin
Posts: 4865
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

Re: Embedded N4F Install - Jail issues - Out of Space

Post by raulfg3 »

kalamingo wrote:when I try to do commands to mount locations within the jail, it says operations not permitted. I don't necessarily need to mount locations anymore since space is no longer an issue, is this correct?
correct, you do not need to mount /usr and others.


kalamingo wrote:/usr/local/share/SABnzbd-0.7.12/SABnzbd.py -d -f /mnt/extensions/sabnzbd/sabnzbd.ini -s 192.168.1.204:8085
check that this command run well from shell, once you are sure that works, yo can add as postinit in TheBrig webGUI config for your jail ( edit your jail config and locate somethig related to afterstart <- Command to execute after start the jail
12.1.0.4 - Ingva (revision 7743) on SUPERMICRO X8SIL-F 8GB of ECC RAM, 11x3TB disk in 1 vdev = Vpool = 32TB Raw size , so 29TB usable size (I Have other NAS as Backup)

Wiki
Last changes

HP T510

kalamingo
NewUser
NewUser
Posts: 14
Joined: 09 Jun 2013 18:13
Status: Offline

Re: Embedded N4F Install - Jail issues - Out of Space

Post by kalamingo »

Thanks. Are those commands textboxes comma separated so I can include more than 1 lines of commands to execute?

What I did was create a startup.sh file with "python /mnt/extensions/CouchPotatoServer/CouchPotato.py" then in Nas4Free UI added a command script for "jexec 1 /mnt/extensions/CouchPotatoServer/startup.sh"
Think your method is more better so I'll swap over :)

Thanks for all the help, everything works perfectly now :D

Post Reply

Return to “Jails”