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!

First time jail creation

Jails with XigmaNAS
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
mrjrussell
Starter
Starter
Posts: 48
Joined: 26 Jun 2012 04:31
Status: Offline

First time jail creation

Post by mrjrussell »

I followed the how to create a jail.

http://wiki.nas4free.org/doku.php?id=do ... owto:jails

when i type jls the responce i get is

Code: Select all

# JID  IP Address      Hostname                      Path
No jails are listed.

I am stuck, where should I start looking ?

also the FETCH

Code: Select all

 fetch ftp://ftp.freebsd.org/pub/FreeBSD/releases/`uname -m`/`uname -m`/`uname -r | cut -d- -f1-2`/base.txz
I got a error for CUT wrong so I typed out the address after verifying it online and was able to fetch the files.
SGI Rackable NM46X, x64 Dual Processor - embedded on Dual-Core AMD Opteron(tm) Processor 8216 HE 16GB Ram -9.2.0.1 - Shigawire (rev 925)
My setup posting.php?mode=edit&f=63&t=179&p=363

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

Re: First time jail creation

Post by raulfg3 »

mrjrussell wrote:lso the FETCH

Code: Select all

 fetch ftp://ftp.freebsd.org/pub/FreeBSD/releases/`uname -m`/`uname -m`/`uname -r | cut -d- -f1-2`/base.txz
I got a error for CUT wrong so I typed out the address after verifying it online and was able to fetch the files.
This works fine in the latest Nas4free 9.1.0.1.573 because is based on BSD 9.1 release and do not work in previos 9.1RC

Please upgrade first to latest N4F:

Code: Select all

login as: root
root@192.168.1.17's password:
Last login: Fri Dec 21 18:51:48 2012
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
        The Regents of the University of California.  All rights reserved.

Welcome to NAS4Free!
rnas:~# cd /tmp
rnas:/tmp# ls
config.cache                            sess_13e805b8df25d69b412f175bb9388232   sess_bb6cc5a23b714ecf2e9598a902abc006
jail.iOw1q4gY                           sess_82b00933041c954ad290f7adc4a6ed1f   sess_feb139a4cf94530023c3b329b37256fb
sess_0294a01cb38f339793800a6a74ecc204   sess_85aa67f3178d0330bc1cd235de3ce885
sess_0fdbc28475065bae7052550b7184f54b   sess_877865f0c3c2d3b517a4c6c51f0a731b
rnas:/tmp# fetch ftp://ftp.freebsd.org/pub/FreeBSD/releases/`uname -m`/`uname -m`/`uname -r | cut -d- -f1-2`/base.txz
base.txz                                      100% of   57 MB  262 kBps 00m00s
rnas:/tmp# ls -l
total 58564
-rw-r--r--  1 root  wheel  59854248 Dec  4 11:09 base.txz
-rw-------  1 root  wheel     29045 Dec 21 18:49 config.cache
drwx------  2 root  wheel       512 Nov 24 21:31 jail.iOw1q4gY
-rw-------  1 www   wheel       119 Dec 20 14:45 sess_0294a01cb38f339793800a6a74ecc204
-rw-------  1 www   wheel      2648 Dec 20 13:26 sess_0fdbc28475065bae7052550b7184f54b
-rw-------  1 www   wheel       119 Dec 20 20:48 sess_13e805b8df25d69b412f175bb9388232
-rw-------  1 root  wheel        88 Dec 18 21:38 sess_82b00933041c954ad290f7adc4a6ed1f
-rw-------  1 root  wheel        88 Dec 20 20:35 sess_85aa67f3178d0330bc1cd235de3ce885
-rw-------  1 root  wheel        88 Dec 19 21:42 sess_877865f0c3c2d3b517a4c6c51f0a731b
-rw-------  1 www   wheel      1050 Dec 20 15:22 sess_bb6cc5a23b714ecf2e9598a902abc006
-rw-------  1 root  wheel        88 Dec 20 15:40 sess_feb139a4cf94530023c3b329b37256fb
rnas:/tmp#


PD: If you do not want to upgrade: viewtopic.php?f=72&t=1732&p=8404
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

mrjrussell
Starter
Starter
Posts: 48
Joined: 26 Jun 2012 04:31
Status: Offline

Re: First time jail creation

Post by mrjrussell »

I was able to fetch and tar the files though so im not sure thats the issue .
SGI Rackable NM46X, x64 Dual Processor - embedded on Dual-Core AMD Opteron(tm) Processor 8216 HE 16GB Ram -9.2.0.1 - Shigawire (rev 925)
My setup posting.php?mode=edit&f=63&t=179&p=363

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

Re: First time jail creation

Post by raulfg3 »

sorry , in this case I do not understad your question, I figure that fetch command failed for you.


At this moment I am creating a new jail to test my "howto install minidlna into a jail" I actually use N4F 9.1.0.1.573, so I test the wiki procedure in a few minutes.

In the middle revise config files and result of comand jail start
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

mrjrussell
Starter
Starter
Posts: 48
Joined: 26 Jun 2012 04:31
Status: Offline

Re: First time jail creation

Post by mrjrussell »

raulfg3 wrote:sorry , in this case I do not understad your question, I figure that fetch command failed for you.


At this moment I am creating a new jail to test my "howto install minidlna into a jail" I actually use N4F 9.1.0.1.573, so I test the wiki procedure in a few minutes.

In the middle revise config files and result of comand jail start

I was able to fetch the files from teh correct location and tar then as the instructions said to do

I got no errors, except the unexpected output of # jls
SGI Rackable NM46X, x64 Dual Processor - embedded on Dual-Core AMD Opteron(tm) Processor 8216 HE 16GB Ram -9.2.0.1 - Shigawire (rev 925)
My setup posting.php?mode=edit&f=63&t=179&p=363

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

Re: First time jail creation

Post by raulfg3 »

but jls is at the end of jail creation and start of it, please provide your IP, and con/rc.conf.local to revise that is correct.

mine if you want to compare is (for 3 jails, named proto, upnp and minidlna):

Code: Select all

jail_enable="YES"                       # enable jails YES|NO
jail_list="proto upnp minidlna"                 # name of the jails to start "proto www..."
jail_proto_rootdir="/jail/proto"        # path to our jail
jail_proto_hostname="proto"             # hostname
jail_proto_ip="192.168.1.201"           # ip of the jail
jail_proto_interface="em0"              # Network Interface to use,replace on your NAS interface name
jail_proto_devfs_enable="YES"           # use devfs
jail_proto_mount_enable="YES"           # mount YES|NO
jail_proto_fstab="/jail/conf/fstab.proto"       # File with Filesystems to mount
jail_upnp_rootdir="/jail/upnp"
jail_upnp_hostname="upnp"
jail_upnp_ip="192.168.1.202"
jail_upnp_interface="em0"
jail_upnp_devfs_enable="YES"
jail_upnp_mount_enable="YES"
jail_upnp_fstab="/jail/conf/fstab.upnp"
jail_minidlna_rootdir="/jail/minidlna"           # path to our jail
jail_minidlna_hostname="minidlna"       # hostname
jail_minidlna_ip="192.168.1.203"                # ip of the jail
jail_minidlna_interface="em0"           # Network Interface to use, replace on your NAS interface name
jail_minidlna_devfs_enable="YES"                # use devfs
jail_minidlna_mount_enable="YES"                # mount YES|NO
jail_minidlna_fstab="/jail/conf/fstab.minidlna" # File with Filesystems to mount

PD. what happend when you type:

Code: Select all

/jail/conf/jail_start
<- this is the command that autostart jails when you reboot yor nas, but you can execute first time to start jail to test that works fine.


Edit: confirmed, jail works if you use wiki:

Code: Select all

rnas:/jail/minidlna/mnt# jls
   JID  IP Address      Hostname                      Path
     5  192.168.1.201   proto                         /jail/proto
     6  192.168.1.202   upnp                          /jail/upnp
     7  192.168.1.203   minidlna                      /jail/minidlna
rnas:/jail/minidlna/mnt#
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
misterredman
Forum Moderator
Forum Moderator
Posts: 184
Joined: 25 Jun 2012 13:31
Location: Switzerland
Status: Offline

Re: First time jail creation

Post by misterredman »

Seems that in the the jail howto the command to start the jail after creation is "missing". So you add the script to postinit but nowhere is mentioned you must run jail_start manually or reboot (although adding the script could be seen as a hint to reboot).

After

Code: Select all

# chmod 755 /jail/conf/jail_start
we should add

Code: Select all

# /jail/conf/jail_start
to actually start the jail (or ask for a reboot).
NAS1: Pentium E6300 - Abit IP35Pro - 4GB RAM - Backup of NAS2
NAS2: Core 2 Quad Q9300 - Asus P5Q-EM - 8GB RAM
pyload - flexget - tvnamer - subsonic - owncloud - crashplan - plex media server

mrjrussell
Starter
Starter
Posts: 48
Joined: 26 Jun 2012 04:31
Status: Offline

Re: First time jail creation

Post by mrjrussell »

/jail/conf/rc.conf.local

Code: Select all

### EXAMPLE - MODIFY TO FIT YOUR NEEDS ###
jail_enable="YES"	# enable jails YES|NO
jail_list="proto"	# name of the jails to start "proto www..."
jail_proto_rootdir="/mnt/data/jail/proto"		# path to our jail
jail_proto_hostname="proto.domain.local"	# hostname 
jail_proto_ip="192.168.1.201"		# ip of the jail 
jail_proto_interface="em0"		# Network Interface to use, replace on your NAS interface name
jail_proto_devfs_enable="YES"		# use devfs 
jail_proto_mount_enable="YES"		# mount YES|NO 
jail_proto_fstab="mnt/data/jail/conf/fstab.proto"	# File with Filesystems to mount
attached is the image of
# jail_start
# jls

I am using 9.0.0.1 - Sandstorm (revision 249)
and used files from ftp://ftp.freebsd.org/pub/FreeBSD/relea ... 0-RELEASE/
You do not have the required permissions to view the files attached to this post.
SGI Rackable NM46X, x64 Dual Processor - embedded on Dual-Core AMD Opteron(tm) Processor 8216 HE 16GB Ram -9.2.0.1 - Shigawire (rev 925)
My setup posting.php?mode=edit&f=63&t=179&p=363

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

Re: First time jail creation

Post by raulfg3 »

first question: do you have a pool named data?
remember that you need to sustitute data by your pool name: line

Code: Select all

mount_nullfs /mnt/data/jail /jail
fails because probably your mount have other name, in my case :

Code: Select all

mount_nullfs /mnt/NAS-A/jail /jail


second ; this line jail_proto_rootdir="/mnt/data/jail/proto" must be jail_proto_rootdir="/jail/proto" because you mount /jail in your root to easy access

PD: better that a jpg of your shell output use copy&Paste
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

mrjrussell
Starter
Starter
Posts: 48
Joined: 26 Jun 2012 04:31
Status: Offline

Re: First time jail creation

Post by mrjrussell »

I tried every variant and could not get it to work with 9.0 .

I installed (on a vbox) 9.1.0.1 - Sandstorm (revision 457) And was able to get it to work

also I could not get the howto file instructions :
# fetch ftp://ftp.freebsd.org/pub/FreeBSD/releases/`uname -m`/`uname -m`/`uname -r | cut -d- -f1-2`/base.txz:

I fetched the files manually from here.
ftp://ftp.freebsd.org/pub/FreeBSD/relea ... 1-RELEASE/

I like to test to make sure everything works.. so i installed subsonic first. the installer could not locate the files so I modified the script adding the same above source. I had a bit of a problem installing subsonic on the vbox
SGI Rackable NM46X, x64 Dual Processor - embedded on Dual-Core AMD Opteron(tm) Processor 8216 HE 16GB Ram -9.2.0.1 - Shigawire (rev 925)
My setup posting.php?mode=edit&f=63&t=179&p=363

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

Re: First time jail creation

Post by raulfg3 »

Sorry to take a long time to understand your problem, Jls, jexec, and other Jail commands are added by daoyama on 9.1 branch, so Jls can't work on 9.0.

You need to update your current 9.0 to latest 9.1 to use jails.
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

Post Reply

Return to “Jails”