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!

Jails won't start after power loss

Jails with XigmaNAS
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
mrhanman
NewUser
NewUser
Posts: 6
Joined: 28 Feb 2014 15:38
Status: Offline

Jails won't start after power loss

Post by mrhanman »

I have two jails, and neither will start after I lost power unexpectedly last night (Time for a UPS battery replacement). I've tried manually starting from the commandline, and I get this -

Code: Select all

nas4free: ~ # /etc/rc.d/jail start ownCloud
Configuring jails:.
Starting jails: cannot start jail "ownCloud": 
jail: exec /bin/sh: No such file or directory
jail: /bin/sh /etc/rc: failed
.
I tired reinstalling theBrig, but it didn't help. I can't find any error's in theBrig's logs, or anywhere else. I'm really not sure where to go from here.

Please help!

EDIT: I created a new, empty jail, and it starts fine. Comparing the two configs, I noticed that the ownCloud jail didn't have a jail start command. I copied the start command from my test jail to it, but it still won't start.

mrhanman
NewUser
NewUser
Posts: 6
Joined: 28 Feb 2014 15:38
Status: Offline

Re: Jails won't start after power loss

Post by mrhanman »

Does anyone have any ideas? Maybe some logs I can look at?

howi42
Starter
Starter
Posts: 17
Joined: 02 Jul 2012 03:41
Status: Offline

Re: Jails won't start after power loss

Post by howi42 »

Same problem for me.
I get :

# /etc/rc.d/jail start owncloud Configuring jails:.
Starting jails: cannot start jail "owncloud":
jail: exec /bin/sh: Permission denied
jail: /bin/sh /etc/rc: failed

Not sure what is missing.

howi42
Starter
Starter
Posts: 17
Joined: 02 Jul 2012 03:41
Status: Offline

Re: Jails won't start after power loss

Post by howi42 »

Since nothing worked, I formatted the disk with TheBrig installation ans started over.
This is what I get :

fetch -o /tmp/thebrig_install.sh https://github.com/fsbruva/thebrig/raw/ ... install.sh
/tmp/thebrig_install.sh 100% of 4053 B 13 MBps 00m00s
howiserver: /tmp # chmod a+x /tmp/thebrig_install.sh
howiserver: /tmp # /bin/sh /tmp/thebrig_install.sh /mnt/jails/jails 2
Retrieving the testing branch as a zip file
working.zip 100% of 248 kB 479 kBps 00m01s
Unpacking the tarball...
x README
x conf/
x conf/bin/
x conf/bin/change_ver.php
x conf/bin/ftp_amd64
x conf/bin/ftp_i386
x conf/bin/jail.sh
x conf/bin/thebrig_fetch.sh
x conf/bin/thebrig_ports_cron.php
x conf/bin/thebrig_start.php
x conf/bin/thebrig_start.sh
x conf/bin/thebrig_stop.sh
x conf/bin/thebrig_update_cron.php
x conf/ext/
x conf/ext/thebrig/
x conf/ext/thebrig/extensions_thebrig.php
x conf/ext/thebrig/extensions_thebrig_check.php
x conf/ext/thebrig/extensions_thebrig_config.php
x conf/ext/thebrig/extensions_thebrig_download.php
x conf/ext/thebrig/extensions_thebrig_edit.php
x conf/ext/thebrig/extensions_thebrig_fstab.php
x conf/ext/thebrig/extensions_thebrig_log.php
x conf/ext/thebrig/extensions_thebrig_manager.php
x conf/ext/thebrig/extensions_thebrig_ports.php
x conf/ext/thebrig/extensions_thebrig_tarballs.php
x conf/ext/thebrig/extensions_thebrig_tools.php
x conf/ext/thebrig/extensions_thebrig_update.php
x conf/ext/thebrig/fstab.png
x conf/ext/thebrig/functions.inc
x conf/ext/thebrig/lang.inc
x conf/ext/thebrig/menu.inc
x conf/ext/thebrig/off_small.png
x conf/ext/thebrig/on_small.png
x conf/freebsd-update.conf
x conf/freebsd-update_thin.conf
x conf/make.conf
x conf/periodic.conf
x conf/portsnap.conf
x conf/sbin/
x conf/sbin/freebsd-update
x conf/sbin/portsnap
x thebrig_install.sh
No need updates
You use fresh version



After that the installation dir is empty ( besides a logfile telling me about a successful installation )

I am lost.

dreamcat4
experienced User
experienced User
Posts: 111
Joined: 21 Mar 2014 21:59
Status: Offline

Re: Jails won't start after power loss

Post by dreamcat4 »

howi42 wrote:Since nothing worked, I formatted the disk with TheBrig installation ans started over.
After that the installation dir is empty ( besides a logfile telling me about a successful installation )
I am lost.
Hi howie42,
Perhaps "theBrig" isn't working anymore (i honestly don't know myself). You may go back to using theBrig in future if it gets fixed again later on.

But until then, you are welcome to try my tool: "Finch"

http://www.forums.nas4free.org/viewtopi ... =79&t=6260

They do not interfere or conflict with each other.

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

Re: Jails won't start after power loss

Post by raulfg3 »

now you need to download tarball for BSD.

go to tarball management: download/file.php?id=1815

and remember that you do install on /mnt/jails/jails not in /mnt/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

howi42
Starter
Starter
Posts: 17
Joined: 02 Jul 2012 03:41
Status: Offline

Re: Jails won't start after power loss

Post by howi42 »

No, that is not possible. As I said, following the commands described above, the install dir is empty - no extension is loaded.
BTW, if I run the three install commands via the nas4free command option, I get the following error:

Parse error: syntax error, unexpected '<' in /bin/sh on line 90

AustinPowersISU
NewUser
NewUser
Posts: 3
Joined: 27 Aug 2014 15:19
Status: Offline

Re: Jails won't start after power loss

Post by AustinPowersISU »

Did anyone figure out what's going on with this error?

I can't upgrade form the initial version of theBrig to 0.8 because of this error. After the upgrade, my jails start/stop just fine, but after a nas reboot I get the exact same error about /bin/sh not being available.

I figure it must have something to do with my thin jails and the basejail not linking up correctly, as the bin directory is shared with the basejail. I have since reverted to a snapshot and restored my config back to the original version of theBrig.

AustinPowersISU
NewUser
NewUser
Posts: 3
Joined: 27 Aug 2014 15:19
Status: Offline

Re: Jails won't start after power loss

Post by AustinPowersISU »

In the original version of theBrig, I see this in my mounts:

/mnt/vault/jails/basejail on /mnt/vault/jails/lms/basejail (nullfs, local, read-only)

(and other similar entries, one for each jail)

I don't have 0.8 installed right now, but I don't think that was present when I was trying to start my jails. If that isn't getting mounted, that would explain why /bin/sh isn't accessible in the jail, as that's part of the basejail.

I wonder if there is something wrong when upgrading theBrig with thin jails.

Upiter
NewUser
NewUser
Posts: 2
Joined: 26 Oct 2014 14:15
Status: Offline

Re: Jails won't start after power loss

Post by Upiter »

UP :!:

I have the same problem as AustinPowersISU

BodgeIT
Starter
Starter
Posts: 74
Joined: 03 Jul 2012 17:39
Location: London
Status: Offline

Re: Jails won't start after power loss

Post by BodgeIT »

This is now getting more common.
Can someone help?

I have brig 0.8 installed on Nas4Free 9.3.0.2.
NAS4Free: 11.4.0.4 - (7682) amd64-embedded
Mobo: Supermicro X9SCL-F, CPU: Xeon E3-1230v2; RAM: Crucial 32GB ECC
System: IBM M1015it SAS controller(SAS2008 v20); Intel Dual 1Gb Server Nic; Thermaltake 1KW PSU;

Storage: Raidz1(3x Toshiba N300 6TB), Raidz1(3x WD Red 3TB), UFS(1x 1TB) Utility disk, ZFS Cache(64Gb SSD)

User avatar
alexey123
Moderator
Moderator
Posts: 1469
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: Jails won't start after power loss

Post by alexey123 »

For UFS I run fsck in case power lost. But without any background job - with umount and fsck -y.

For zfs...
Hmmm.. WTF snapshot on zfs tabs?
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

BodgeIT
Starter
Starter
Posts: 74
Joined: 03 Jul 2012 17:39
Location: London
Status: Offline

Re: Jails won't start after power loss

Post by BodgeIT »

I've put my brig and jails on a ufs drive that is always on.
Not sure of the point of ZFS for running apps?

I noticedin another post that there is a comment about installing ports within the jail...does that apply here?
NAS4Free: 11.4.0.4 - (7682) amd64-embedded
Mobo: Supermicro X9SCL-F, CPU: Xeon E3-1230v2; RAM: Crucial 32GB ECC
System: IBM M1015it SAS controller(SAS2008 v20); Intel Dual 1Gb Server Nic; Thermaltake 1KW PSU;

Storage: Raidz1(3x Toshiba N300 6TB), Raidz1(3x WD Red 3TB), UFS(1x 1TB) Utility disk, ZFS Cache(64Gb SSD)

BodgeIT
Starter
Starter
Posts: 74
Joined: 03 Jul 2012 17:39
Location: London
Status: Offline

Re: Jails won't start after power loss

Post by BodgeIT »

This issue is less to do with drive failure than a Brig that is not fully configured.

I've noticed that when I create my jail and configure it and then start, I can interact with it normally but when I add shares to my fstab and try and run mount -a, I get

Code: Select all

fstab: /etc/fstab:0: No such file or directory
I can see that the shares are being redirected but I know that jail will not start following a restart.

I also have this error in my Brig Log:

Code: Select all

 	TheBrig error!: 	/etc/rc.d/jail: ERROR: jail: /etc/fstab.plex does not exist
I can confirm that fstab.plex does exist in NAS4Free /etc/
NAS4Free: 11.4.0.4 - (7682) amd64-embedded
Mobo: Supermicro X9SCL-F, CPU: Xeon E3-1230v2; RAM: Crucial 32GB ECC
System: IBM M1015it SAS controller(SAS2008 v20); Intel Dual 1Gb Server Nic; Thermaltake 1KW PSU;

Storage: Raidz1(3x Toshiba N300 6TB), Raidz1(3x WD Red 3TB), UFS(1x 1TB) Utility disk, ZFS Cache(64Gb SSD)

BodgeIT
Starter
Starter
Posts: 74
Joined: 03 Jul 2012 17:39
Location: London
Status: Offline

Re: Jails won't start after power loss

Post by BodgeIT »

I have now found that I can create jails and have them restart after a reboot so long as I use full jails as opposed to slim jails.

Something in the linkage for the slim jail content with the basejail messes up and prevents it from starting.
NAS4Free: 11.4.0.4 - (7682) amd64-embedded
Mobo: Supermicro X9SCL-F, CPU: Xeon E3-1230v2; RAM: Crucial 32GB ECC
System: IBM M1015it SAS controller(SAS2008 v20); Intel Dual 1Gb Server Nic; Thermaltake 1KW PSU;

Storage: Raidz1(3x Toshiba N300 6TB), Raidz1(3x WD Red 3TB), UFS(1x 1TB) Utility disk, ZFS Cache(64Gb SSD)

Post Reply

Return to “Jails”