*New 12.1 series Release:
2020-09-13: XigmaNAS 12.1.0.4.7743 - released

*New 11.4 series Release:
2020-09-12: XigmaNAS 11.4.0.4.7741 - released!


We really need "Your" help on XigmaNAS https://translations.launchpad.net/xigmanas translations. Please help today!

Producing and hosting XigmaNAS costs money. Please consider donating for our project so that we can continue to offer you the best.
We need your support! eg: PAYPAL

[EXTENSION] BE Manager (Boot Environments Manager)

XigmaNAS Extensions / Add-ons

Moderator: crest

Forum rules
Set-Up GuideFAQsForum Rules
User avatar
JoseMR
Hardware & Software Guru
Hardware & Software Guru
Posts: 1166
Joined: 16 Apr 2014 04:15
Location: PR
Contact:
Status: Offline

[EXTENSION] BE Manager (Boot Environments Manager)

#1

Post by JoseMR »

Boot Environments Manager extension for XigmaNAS.
An utility to manage Boot Environments with ZFS compliant platforms.

-------------------------------------------------------------------------------------
This Extension has been updated to work with either `beadm` or `bectl` BE utilities, however if a future XigmaNAS built-in BE Manager is developed, this Extension may become Obsolete/Unmaintained.
-------------------------------------------------------------------------------------

Hello, as previously requested by raulfg3 HERE, XigmaNAS RootOnZFS Platforms users now can download/install the Boot Environments Manager Extension(BE Manager) for ease and convenience.

Also newcomers interested in the RootOnZFS Platforms features and benefits, but are afraid of the command-line, and/or limited knowledge about Boot Environments, now can create, edit, activate, rename Bakup and Restore BE's from the WebGUI with confidence.

Note:This extension is compatible with RootOnZFS platforms only, also it will not interfere with similar functionality added into base on future releases.

This extension can be easily installed with the OneButtonInstaller

Manual installation:
Just Save-As This File to your desktop, then with SSH and WinSCP or FileZilla create a dedicated directory for BE Manager, e.g: "/mnt/data/extensions/bemanager", then place the file there, make executable and execute like in the below example:

Code: Select all

# mkdir -p /mnt/data/extensions/bemanager
# chmod +x /mnt/data/extensions/bemanager/beminit
# cd /mnt/data/extensions/bemanager/beminit
# ./beminit

Screenshots:
Screenshot from 2019-05-01 17-31-42.png
Screenshot from 2019-05-01 17-48-13.png
BEM6.png

Regards
You do not have the required permissions to view the files attached to this post.
System: FreeBSD 12 RootOnZFS Mirror, MB: Supermicro X8SI6-F, Xeon X3450, 16GB DDR3 ECC RDIMMs.
XigmaNAS RootOnZFS
Addons at GitHub
BastilleBSD
Boot Environments Intro
Resources Home Page

cookiemonster
Advanced User
Advanced User
Posts: 321
Joined: 23 Mar 2014 02:58
Location: UK
Status: Offline

Re: [EXTENSION] BE Manager

#2

Post by cookiemonster »

Sweeeet!. Do we clear the original manual files installed in /usr/local/www ?
Main: Xigmanas 11.2.0.4 x64-full-RootOnZFS as ESXi VM with 24GB memory.
Main Host: Supermicro X8DT3 Memory: 72GB ECC; 2 Xeon E5645 CPUs; Storage: (HBA) - LSI SAS 9211-4i with 3 SATA x 1 TB in raidZ1, 1 x 3 TB SAS drive as single stripe, 3 x 4 TB SAS drives in raidZ1.
Spare1: HP DL360 G7; 6 GB ECC RAM; 1 Xeon CPU; 5 x 500 GB disks on H210i
Backup1: HP DL380 G7; 24 GB ECC RAM; 2 Xeon E5645 CPUs; 8 x 500 GB disks on IBM M1015 flashed to LSI9211-IT

User avatar
JoseMR
Hardware & Software Guru
Hardware & Software Guru
Posts: 1166
Joined: 16 Apr 2014 04:15
Location: PR
Contact:
Status: Offline

Re: [EXTENSION] BE Manager

#3

Post by JoseMR »

cookiemonster wrote:
30 Apr 2019 22:27
Sweeeet!. Do we clear the original manual files installed in /usr/local/www ?
Hi cookiemonster, while the extension does not interfere with the previous manager preview/test source files, users running the previous BE Manager Preview files(before it was crated as separate extension) may want to clean and restore the default "disks_zfs_zpool.php" system file.

Note: Please be careful with the below rm commands.

Code: Select all

# cd /usr/local/www
# rm -f disks_zfs_bootenv.php
# rm -f disks_zfs_bootenv_add.php
# rm -f disks_zfs_bootenv_edit.php
# rm -f disks_zfs_bootenv_info.php
Then go to SourceForge and download the original "disks_zfs_zpool.php" for XigmaNAS matching your version/revision.


Between I just added BE mount/unmount functionality to the BE Manager Extension, please use "beminit -u" since the maintenance tab is not implemented yet.

Update BE Manager Extension:

Code: Select all

beminit -u
Screenshot:
BEM7.png
Regards
You do not have the required permissions to view the files attached to this post.
System: FreeBSD 12 RootOnZFS Mirror, MB: Supermicro X8SI6-F, Xeon X3450, 16GB DDR3 ECC RDIMMs.
XigmaNAS RootOnZFS
Addons at GitHub
BastilleBSD
Boot Environments Intro
Resources Home Page

doktornotor
Advanced User
Advanced User
Posts: 202
Joined: 16 May 2017 00:22
Status: Offline

Re: [EXTENSION] BE Manager

#4

Post by doktornotor »

Looks great, plus it even seems like it's actually working. :lol:

Thanks. 8-)

User avatar
JoseMR
Hardware & Software Guru
Hardware & Software Guru
Posts: 1166
Joined: 16 Apr 2014 04:15
Location: PR
Contact:
Status: Offline

Re: [EXTENSION] BE Manager

#5

Post by JoseMR »

doktornotor wrote:
01 May 2019 13:30
Looks great, plus it even seems like it's actually working. :lol:

Thanks. 8-)

Hi doktornotor, thanks for testing the Extension. :)

Between I've added full Boot Environments Backup and Restore for convenience, also very useful for restoring to dissimilar hardware e.g. redoing the RootOnZFS installation from a single drive to a mirror, swapping HDD or UBS sticks with SSD's etc. is up to your imagination. :lol:

Note that this does not replace "bemanager" CLI/TUI utility for advanced cron and remote BE backup/restore tasks.

Regards
System: FreeBSD 12 RootOnZFS Mirror, MB: Supermicro X8SI6-F, Xeon X3450, 16GB DDR3 ECC RDIMMs.
XigmaNAS RootOnZFS
Addons at GitHub
BastilleBSD
Boot Environments Intro
Resources Home Page

doktornotor
Advanced User
Advanced User
Posts: 202
Joined: 16 May 2017 00:22
Status: Offline

Re: [EXTENSION] BE Manager

#6

Post by doktornotor »

JoseMR wrote:
01 May 2019 23:58
doktornotor wrote:
01 May 2019 13:30
Looks great, plus it even seems like it's actually working. :lol:

Thanks. 8-)

Hi doktornotor, thanks for testing the Extension. :)

Between I've added full Boot Environments Backup and Restore for convenience, also very useful for restoring to dissimilar hardware e.g. redoing the RootOnZFS installation from a single drive to a mirror, swapping HDD or UBS sticks with SSD's etc. is up to your imagination. :lol:
Thanks, upgraded to 0.1.6. Small typo on the Maintenance tab: s/Sumamary/Summary/g

User avatar
JoseMR
Hardware & Software Guru
Hardware & Software Guru
Posts: 1166
Joined: 16 Apr 2014 04:15
Location: PR
Contact:
Status: Offline

Re: [EXTENSION] BE Manager

#7

Post by JoseMR »

doktornotor wrote:
02 May 2019 11:47
Thanks, upgraded to 0.1.6. Small typo on the Maintenance tab: s/Sumamary/Summary/g

Thanks for reporting the typo, sometimes forgot to verify some words with Google Translate. :lol:

I will update the typo along with some optimizations today for 0.1.7 extension release.

Regards
System: FreeBSD 12 RootOnZFS Mirror, MB: Supermicro X8SI6-F, Xeon X3450, 16GB DDR3 ECC RDIMMs.
XigmaNAS RootOnZFS
Addons at GitHub
BastilleBSD
Boot Environments Intro
Resources Home Page

User avatar
JoseMR
Hardware & Software Guru
Hardware & Software Guru
Posts: 1166
Joined: 16 Apr 2014 04:15
Location: PR
Contact:
Status: Offline

Re: [EXTENSION] BE Manager

#8

Post by JoseMR »

BE Manager Extension Updated to 0.1.7.

Git commit: Move global variables to inc file and config checks.

Any funny typos and/or any bug please let me know so I can fix asap. :)

Regards
System: FreeBSD 12 RootOnZFS Mirror, MB: Supermicro X8SI6-F, Xeon X3450, 16GB DDR3 ECC RDIMMs.
XigmaNAS RootOnZFS
Addons at GitHub
BastilleBSD
Boot Environments Intro
Resources Home Page

cookiemonster
Advanced User
Advanced User
Posts: 321
Joined: 23 Mar 2014 02:58
Location: UK
Status: Offline

Re: [EXTENSION] BE Manager

#9

Post by cookiemonster »

Hi, after updating as per instruction on post #3, I have an error on disks_zfs_zpool.php

Code: Select all

Fatal error: Uncaught Error: Call to undefined method co_sphere_grid::set_enadis() in /usr/local/www/disks_zfs_zpool.php:47 Stack trace: #0 /usr/local/www/disks_zfs_zpool.php(110): disks_zfs_zpool_get_sphere() #1 {main} thrown in /usr/local/www/disks_zfs_zpool.php on line 47 
After the update of the php file I used bemanager from command line. Ver 0.6.4b for beadm 1.2.9 2018/07/08. With it I created a new BE, activated it and rebooted. Then I went to check my zfs pools and triggered the error.
What have I done wrong please?
Edit: I am on 11.2.0.4 - Omnius (revision 6315)
Main: Xigmanas 11.2.0.4 x64-full-RootOnZFS as ESXi VM with 24GB memory.
Main Host: Supermicro X8DT3 Memory: 72GB ECC; 2 Xeon E5645 CPUs; Storage: (HBA) - LSI SAS 9211-4i with 3 SATA x 1 TB in raidZ1, 1 x 3 TB SAS drive as single stripe, 3 x 4 TB SAS drives in raidZ1.
Spare1: HP DL360 G7; 6 GB ECC RAM; 1 Xeon CPU; 5 x 500 GB disks on H210i
Backup1: HP DL380 G7; 24 GB ECC RAM; 2 Xeon E5645 CPUs; 8 x 500 GB disks on IBM M1015 flashed to LSI9211-IT

cookiemonster
Advanced User
Advanced User
Posts: 321
Joined: 23 Mar 2014 02:58
Location: UK
Status: Offline

Re: [EXTENSION] BE Manager

#10

Post by cookiemonster »

I think the instruction was to rollback only /usr/local/www/disks_zfs_zpool.php but the original instruction (with the tarball now unavailable) here viewtopic.php?f=4&t=14236#p88346 has files (plural):
Installation:
Unzip and copy the files to "/usr/local/www" and reset browser cache.
After that simply navigate to: "Disks > ZFS > Boot Environments > Boot Environments"
Therefore could it be that I need to rollback more files? I can't tell as the tarball is not there anymore to check which files it replaced.
Main: Xigmanas 11.2.0.4 x64-full-RootOnZFS as ESXi VM with 24GB memory.
Main Host: Supermicro X8DT3 Memory: 72GB ECC; 2 Xeon E5645 CPUs; Storage: (HBA) - LSI SAS 9211-4i with 3 SATA x 1 TB in raidZ1, 1 x 3 TB SAS drive as single stripe, 3 x 4 TB SAS drives in raidZ1.
Spare1: HP DL360 G7; 6 GB ECC RAM; 1 Xeon CPU; 5 x 500 GB disks on H210i
Backup1: HP DL380 G7; 24 GB ECC RAM; 2 Xeon E5645 CPUs; 8 x 500 GB disks on IBM M1015 flashed to LSI9211-IT

User avatar
JoseMR
Hardware & Software Guru
Hardware & Software Guru
Posts: 1166
Joined: 16 Apr 2014 04:15
Location: PR
Contact:
Status: Offline

Re: [EXTENSION] BE Manager

#11

Post by JoseMR »

cookiemonster wrote:
03 May 2019 19:16
I think the instruction was to rollback only /usr/local/www/disks_zfs_zpool.php but the original instruction (with the tarball now unavailable) here viewtopic.php?f=4&t=14236#p88346 has files (plural):
Installation:
Unzip and copy the files to "/usr/local/www" and reset browser cache.
After that simply navigate to: "Disks > ZFS > Boot Environments > Boot Environments"
Therefore could it be that I need to rollback more files? I can't tell as the tarball is not there anymore to check which files it replaced.


Hi cookiemonster, that installation method no longer applies here, if you have experienced extension page duplicates, please follow the old BE Manager testing files removal HERE, that older names are reserved for the future BE Manager base integration, hence the BE Manager extension, got renamed to don't mess with default system files.

Let me know if working for you.

Regards
System: FreeBSD 12 RootOnZFS Mirror, MB: Supermicro X8SI6-F, Xeon X3450, 16GB DDR3 ECC RDIMMs.
XigmaNAS RootOnZFS
Addons at GitHub
BastilleBSD
Boot Environments Intro
Resources Home Page

cookiemonster
Advanced User
Advanced User
Posts: 321
Joined: 23 Mar 2014 02:58
Location: UK
Status: Offline

Re: [EXTENSION] BE Manager

#12

Post by cookiemonster »

Thx JoseMR. I'm raking my brains here all confused which is old and new. I can't explain how I also missed that post. I must be going crazy.
Main: Xigmanas 11.2.0.4 x64-full-RootOnZFS as ESXi VM with 24GB memory.
Main Host: Supermicro X8DT3 Memory: 72GB ECC; 2 Xeon E5645 CPUs; Storage: (HBA) - LSI SAS 9211-4i with 3 SATA x 1 TB in raidZ1, 1 x 3 TB SAS drive as single stripe, 3 x 4 TB SAS drives in raidZ1.
Spare1: HP DL360 G7; 6 GB ECC RAM; 1 Xeon CPU; 5 x 500 GB disks on H210i
Backup1: HP DL380 G7; 24 GB ECC RAM; 2 Xeon E5645 CPUs; 8 x 500 GB disks on IBM M1015 flashed to LSI9211-IT

cookiemonster
Advanced User
Advanced User
Posts: 321
Joined: 23 Mar 2014 02:58
Location: UK
Status: Offline

Re: [EXTENSION] BE Manager

#13

Post by cookiemonster »

Nope not working. It appears to me I didn't miss the post, but has been edited. No problem.
Those files are not there as were removed with the previous unedited post

Code: Select all

freenas: www# rm -f disks_zfs_bootenv*.php
and I have the newly downloaded file with

Code: Select all

freenas: www# fetch --no-verify-peer -ao /usr/local/www/disks_zfs_zpool.php http://svn.code.sf.net/p/xigmanas/code/branches/11.2.0.4/www/disks_zfs_zpool.php
.
In other words as per initial note, I've followed the instruction and gives me the error.
I've attached the disks_zfs_zpool.php I have in the system and I get the error posted. I must be getting confused and should have another version instead. I've mounted the previous BE to get it from there and I can see a one line difference at the bottom where "include 'fend.inc';" is on about 4 lines above.
i'm still looking.
You do not have the required permissions to view the files attached to this post.
Main: Xigmanas 11.2.0.4 x64-full-RootOnZFS as ESXi VM with 24GB memory.
Main Host: Supermicro X8DT3 Memory: 72GB ECC; 2 Xeon E5645 CPUs; Storage: (HBA) - LSI SAS 9211-4i with 3 SATA x 1 TB in raidZ1, 1 x 3 TB SAS drive as single stripe, 3 x 4 TB SAS drives in raidZ1.
Spare1: HP DL360 G7; 6 GB ECC RAM; 1 Xeon CPU; 5 x 500 GB disks on H210i
Backup1: HP DL380 G7; 24 GB ECC RAM; 2 Xeon E5645 CPUs; 8 x 500 GB disks on IBM M1015 flashed to LSI9211-IT

User avatar
JoseMR
Hardware & Software Guru
Hardware & Software Guru
Posts: 1166
Joined: 16 Apr 2014 04:15
Location: PR
Contact:
Status: Offline

Re: [EXTENSION] BE Manager

#14

Post by JoseMR »

cookiemonster wrote:
03 May 2019 21:27
Nope not working. It appears to me I didn't miss the post, but has been edited. No problem.
Those files are not there as were removed with the previous unedited post

Code: Select all

freenas: www# rm -f disks_zfs_bootenv*.php
and I have the newly downloaded file with

Code: Select all

freenas: www# fetch --no-verify-peer -ao /usr/local/www/disks_zfs_zpool.php http://svn.code.sf.net/p/xigmanas/code/branches/11.2.0.4/www/disks_zfs_zpool.php
.
In other words as per initial note, I've followed the instruction and gives me the error.
I've attached the disks_zfs_zpool.php I have in the system and I get the error posted. I must be getting confused and should have another version instead. I've mounted the previous BE to get it from there and I can see a one line difference at the bottom where "include 'fend.inc';" is on about 4 lines above.
i'm still looking.

Hello, the file is getting renamed to current instead "disks_zfs_zpool.php", you can always download manually from SF and overwrite over to the current BE, I will verify that command again here in my XN VM's

Regards
System: FreeBSD 12 RootOnZFS Mirror, MB: Supermicro X8SI6-F, Xeon X3450, 16GB DDR3 ECC RDIMMs.
XigmaNAS RootOnZFS
Addons at GitHub
BastilleBSD
Boot Environments Intro
Resources Home Page

cookiemonster
Advanced User
Advanced User
Posts: 321
Joined: 23 Mar 2014 02:58
Location: UK
Status: Offline

Re: [EXTENSION] BE Manager

#15

Post by cookiemonster »

No JoseMR is not, that was just the name I gave it to save it locally so that I could post on forum. I'm going to try to bring it from svn. Got the hint on freenode.
Main: Xigmanas 11.2.0.4 x64-full-RootOnZFS as ESXi VM with 24GB memory.
Main Host: Supermicro X8DT3 Memory: 72GB ECC; 2 Xeon E5645 CPUs; Storage: (HBA) - LSI SAS 9211-4i with 3 SATA x 1 TB in raidZ1, 1 x 3 TB SAS drive as single stripe, 3 x 4 TB SAS drives in raidZ1.
Spare1: HP DL360 G7; 6 GB ECC RAM; 1 Xeon CPU; 5 x 500 GB disks on H210i
Backup1: HP DL380 G7; 24 GB ECC RAM; 2 Xeon E5645 CPUs; 8 x 500 GB disks on IBM M1015 flashed to LSI9211-IT

cookiemonster
Advanced User
Advanced User
Posts: 321
Joined: 23 Mar 2014 02:58
Location: UK
Status: Offline

Re: [EXTENSION] BE Manager

#16

Post by cookiemonster »

For the thread benefit, this is now solved with the help of JoseMR and ms49434. The updated steps in post #3 are now correct.
Main: Xigmanas 11.2.0.4 x64-full-RootOnZFS as ESXi VM with 24GB memory.
Main Host: Supermicro X8DT3 Memory: 72GB ECC; 2 Xeon E5645 CPUs; Storage: (HBA) - LSI SAS 9211-4i with 3 SATA x 1 TB in raidZ1, 1 x 3 TB SAS drive as single stripe, 3 x 4 TB SAS drives in raidZ1.
Spare1: HP DL360 G7; 6 GB ECC RAM; 1 Xeon CPU; 5 x 500 GB disks on H210i
Backup1: HP DL380 G7; 24 GB ECC RAM; 2 Xeon E5645 CPUs; 8 x 500 GB disks on IBM M1015 flashed to LSI9211-IT

Shperrung
experienced User
experienced User
Posts: 149
Joined: 04 Apr 2018 16:29
Status: Offline

Re: [EXTENSION] BE Manager (Boot Environments Manager)

#17

Post by Shperrung »

Hello JoseMR!
Can you briefly explain how to use BE manager?
How to backup?
How to rollback?
I understand what I do when pressing "+" to add new Boot Environment. Next steps are not obvious for me like "Activate", "mount" (what?), "unmount", "backup" (what? where? How to get it back?). What is meant under NR and R in "Status"?
You do not have the required permissions to view the files attached to this post.
ASRock J3710-ITX, 16Gb RAM; RAID-Z 4Tx3HDD, 2T Stripe; UPS
Debian+OMV+ZFS

User avatar
JoseMR
Hardware & Software Guru
Hardware & Software Guru
Posts: 1166
Joined: 16 Apr 2014 04:15
Location: PR
Contact:
Status: Offline

Re: [EXTENSION] BE Manager (Boot Environments Manager)

#18

Post by JoseMR »

Shperrung wrote:
13 Dec 2019 16:48
Hello JoseMR!
Can you briefly explain how to use BE manager?
How to backup?
How to rollback?
I understand what I do when pressing "+" to add new Boot Environment. Next steps are not obvious for me like "Activate", "mount" (what?), "unmount", "backup" (what? where? How to get it back?). What is meant under NR and R in "Status"?

Hi Shperrung, Boot Environments(BE Manager) is just a wrapper for the "beadm" utility.

Between the backup and restore section is simply a ZFS 1:1 send/recv from a compressed file(.xz by default), but exposed as .zsf for simplicity.

Regards
System: FreeBSD 12 RootOnZFS Mirror, MB: Supermicro X8SI6-F, Xeon X3450, 16GB DDR3 ECC RDIMMs.
XigmaNAS RootOnZFS
Addons at GitHub
BastilleBSD
Boot Environments Intro
Resources Home Page

Shperrung
experienced User
experienced User
Posts: 149
Joined: 04 Apr 2018 16:29
Status: Offline

Re: [EXTENSION] BE Manager (Boot Environments Manager)

#19

Post by Shperrung »

Therefore exhaustive BE guideline is here
https://www.freebsd.org/cgi/man.cgi?query=beadm
Thank you!
ASRock J3710-ITX, 16Gb RAM; RAID-Z 4Tx3HDD, 2T Stripe; UPS
Debian+OMV+ZFS

User avatar
JoseMR
Hardware & Software Guru
Hardware & Software Guru
Posts: 1166
Joined: 16 Apr 2014 04:15
Location: PR
Contact:
Status: Offline

Re: [EXTENSION] BE Manager (Boot Environments Manager)

#20

Post by JoseMR »

Shperrung wrote:
14 Dec 2019 12:50
Therefore exhaustive BE guideline is here
https://www.freebsd.org/cgi/man.cgi?query=beadm
Thank you!
Exactly!, thanks for posting the correct link to the "beadm" manual, I provided a wrong link on mi previous post to the "bemanager" CLI utility which is another tool.

Regards
System: FreeBSD 12 RootOnZFS Mirror, MB: Supermicro X8SI6-F, Xeon X3450, 16GB DDR3 ECC RDIMMs.
XigmaNAS RootOnZFS
Addons at GitHub
BastilleBSD
Boot Environments Intro
Resources Home Page

User avatar
JoseMR
Hardware & Software Guru
Hardware & Software Guru
Posts: 1166
Joined: 16 Apr 2014 04:15
Location: PR
Contact:
Status: Offline

Re: [EXTENSION] BE Manager (Boot Environments Manager)

#21

Post by JoseMR »

Hello!

As for version 0.2.7, Boot Environments Manager Extension will use .XZ file extension for standardize, as usual previous files will be imperturbable.

Just the same for the Bemanager CLI/TUI utility.

Regards
System: FreeBSD 12 RootOnZFS Mirror, MB: Supermicro X8SI6-F, Xeon X3450, 16GB DDR3 ECC RDIMMs.
XigmaNAS RootOnZFS
Addons at GitHub
BastilleBSD
Boot Environments Intro
Resources Home Page

User avatar
Maurizio
Starter
Starter
Posts: 68
Joined: 05 Jul 2018 21:49
Location: Linate (MIlan)
Status: Offline

Re: XigmaNAS 12.1.0.4.7542 released (FreeBSD 12.1-RELEASE-P3)

#22

Post by Maurizio »

A problem with bemanager 0.8.4b on my RootOnZFS installation:
- the /usr/bin/whereis executable is missing, I have copied it from a jail.
- in /usr/local/etc/bemanager.conf I have added the line
ZFS_BE_MANAGER="bectl"

Regards
Maurizio
XigmaNAS 12.1.0.4 on Dell R710 144GB RAM - RootOnZFS zroot on 2x 64GB 15k HDDs in mirror, zdata on 3x 1TB SSD in RAIDZ1.
2x XigmaNAS 11.2.0.4 - RootOnZFS on HPE Proliant Microserver gen10 X3216 - 3x 4TB WD RED. In mirror with zrep.

User avatar
JoseMR
Hardware & Software Guru
Hardware & Software Guru
Posts: 1166
Joined: 16 Apr 2014 04:15
Location: PR
Contact:
Status: Offline

Re: XigmaNAS 12.1.0.4.7542 released (FreeBSD 12.1-RELEASE-P3)

#23

Post by JoseMR »

Maurizio wrote:
20 Apr 2020 18:22
A problem with bemanager 0.8.4b on my RootOnZFS installation:
- the /usr/bin/whereis executable is missing, I have copied it from a jail.
- in /usr/local/etc/bemanager.conf I have added the line
ZFS_BE_MANAGER="bectl"

Regards
Maurizio

Hi Maurizio, asked ms to move here the post for users further reference. ;)

While I don't like changing configuration files, I've updated the bemanager to follow standards among FreeBSD users, and the most notorious is that now the exported BE backups extension is just .XZ, rather than the .ZFS which is commonly associated with C++ assembly, however you can still use previous extension for import or rename the files as well, as well as letting the user choice between `beadm` and `bectl` utilities.

Also compress and decompress options now has hardcoded the `xz` command and only let the user set comp level and threading options for simplicity.

The application by default should set `bectl` if there is no command defined to use, also here below is how the configuration looks on latest `bemanager` release:

My config file for reference:

Code: Select all

# Run-time configuration file for bemanager.
# Auto-generated file from bemanager.

# Set the preferred zfs boot environments management utility, e.g. "beadm".
ZFS_BE_MANAGER=""

# Path where to save boot environments backup files, e.g. "/mnt/tank/zfsbackups".
ZFS_BACKUP_PATH="/mnt/storage/zfsbackups/nas"

# Path to use for mounting boot environments, e.g. "/mnt".
ZFS_MOUNT_PATH="/mnt/bemount"

# Skip backup mode dialog, set between "local" or "remote" backup modes.  
ZFS_BACKUP_MODE="local"

# Set zfs send extra parameters, e.g. "-v" default empty.
ZFS_SEND_PARAMS=""

# Set zfs receive extra parameters, e.g. "-v" default empty.
ZFS_RECV_PARAMS=""

# Set SSH parameters, e.g. "root@192.168.1.250".
SSH_NET_PARAMS="-q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@192.168.1.XXX"

# Set custom compression method, e.g. "-9 -v --threads=0", empty for defaults.
XZ_COMPRESS_OPTIONS="-9 -v --threads=0"

# Set custom decompression method, e.g. "-c -d -v --threads=0", empty for defaults.
XZ_DECOMPRESS_OPTIONS="-c -d -v --threads=0"

# Display boot environments only and always take a recent snapshot before backup, empty to disable.
UI_SIMPLE_MODE="yes"
EDIT: The tool can't even start in XigmasNAS indeed as it does not ship `whereis`, I will schedule for a fix today, sorry inconvenience.

Hope that helps
Regards
System: FreeBSD 12 RootOnZFS Mirror, MB: Supermicro X8SI6-F, Xeon X3450, 16GB DDR3 ECC RDIMMs.
XigmaNAS RootOnZFS
Addons at GitHub
BastilleBSD
Boot Environments Intro
Resources Home Page

User avatar
JoseMR
Hardware & Software Guru
Hardware & Software Guru
Posts: 1166
Joined: 16 Apr 2014 04:15
Location: PR
Contact:
Status: Offline

Re: [EXTENSION] BE Manager (Boot Environments Manager)

#24

Post by JoseMR »

The bemanager TUI/CLI utility has been updated to v0.8.5

Advanced users using the bemanager tool can update by executing the below command in SSH:

Code: Select all

fetch --no-verify-peer https://github.com/JRGTH/bemanager/archive/master.zip && tar -xvf master.zip --strip-components 1 'bemanager-master/bemanager*' && chmod 555 bemanager && mv bemanager /usr/local/sbin/ && mv bemanager.conf.sample /usr/local/etc/ && rm master.zip
Note: If the variable "ZFS_BE_MANAGER" is not defined, the utility will default to the `bectl` as the Boot Environments management utility.

Regards
System: FreeBSD 12 RootOnZFS Mirror, MB: Supermicro X8SI6-F, Xeon X3450, 16GB DDR3 ECC RDIMMs.
XigmaNAS RootOnZFS
Addons at GitHub
BastilleBSD
Boot Environments Intro
Resources Home Page

igr4free
experienced User
experienced User
Posts: 98
Joined: 19 Dec 2016 15:12
Status: Offline

Re: [EXTENSION] BE Manager (Boot Environments Manager)

#25

Post by igr4free »

Hello,

Today after updating to 12.1.0.4 - Ingva (revision 7542) in beadm I realized that I had no data. I still had version 0.2.0 installed without updating, so I have updated, without success. In the list of snapshots it gave an error of not finding beadm.

After that, I have uninstalled beadm and reinstalled, 0.3.0, and the last 5 snapshots are already seen.

I'm not sure if there have been any errors during the last system upgrades. Or that a few days ago I deleted a lot of snapshots (although I'm pretty sure they weren't from the system partition and it was from data).

In any case, it seems that with version 0.3.0 everything is working correctly :)
XigmaNAS 12.1.0.4.7542 released (FreeBSD 12.1-RELEASE-P3) RootOnZFS (mirror disk)
HPE Proliant Microserver Gen8 / CPU: E3-1265L V2 @ 2.50GHz / Mem: 16GB DDR3 ECC / Storage: IBM ServerRaid m1015, 4x 1TB HITACHI RaidZ1, 2x 1TB HITACHI Stripe, OS Disk: 2x 80GB INTEL SSD

User avatar
JoseMR
Hardware & Software Guru
Hardware & Software Guru
Posts: 1166
Joined: 16 Apr 2014 04:15
Location: PR
Contact:
Status: Offline

Re: [EXTENSION] BE Manager (Boot Environments Manager)

#26

Post by JoseMR »

igr4free wrote:
21 Apr 2020 14:28
Hello,

Today after updating to 12.1.0.4 - Ingva (revision 7542) in beadm I realized that I had no data. I still had version 0.2.0 installed without updating, so I have updated, without success. In the list of snapshots it gave an error of not finding beadm.

After that, I have uninstalled beadm and reinstalled, 0.3.0, and the last 5 snapshots are already seen.

I'm not sure if there have been any errors during the last system upgrades. Or that a few days ago I deleted a lot of snapshots (although I'm pretty sure they weren't from the system partition and it was from data).

In any case, it seems that with version 0.3.0 everything is working correctly :)

Hi igr4free, it was already added to the readme file to let the user be aware of the beadm drop:

"Notice for RootOnZFS platform users, the `beadm` utility to manage boot environments has been replaced by the `bectl` which behaves the same way as the predecessor `beadm`, users with existing scripting on `beadm` can create an alias or a symlink for `/usr/local/sbin/beadm` to point to `/sbin/bectl`, sorry for inconvenience."

However XigmaNAS users using either of the BE Managers don't have to worry about manual alias or symlinks, as both the Extension and the CLI tool has been recently updated to automatically deal with either current `bectl` or older `beadm` regarding the verison being used.


If you still encounter any issue let me know.

Regards
System: FreeBSD 12 RootOnZFS Mirror, MB: Supermicro X8SI6-F, Xeon X3450, 16GB DDR3 ECC RDIMMs.
XigmaNAS RootOnZFS
Addons at GitHub
BastilleBSD
Boot Environments Intro
Resources Home Page

User avatar
Maurizio
Starter
Starter
Posts: 68
Joined: 05 Jul 2018 21:49
Location: Linate (MIlan)
Status: Offline

Re: [EXTENSION] BE Manager (Boot Environments Manager)

#27

Post by Maurizio »

JoseMR wrote:
20 Apr 2020 20:59
Note: If the variable "ZFS_BE_MANAGER" is not defined, the utility will default to the `bectl` as the Boot Environments management utility.
Thank you for your support, as usual.
I am testing the version

Code: Select all

# bemanager -v
bemanager 0.8.5b
I must always define the variable "ZFS_BE_MANAGER", my /usr/local/etc/bemanager.conf is

Code: Select all

# Run-time configuration file for bemanager.
# Auto-generated file from bemanager.

# Commenting this line the command 'bemanager -b beName' doesn't work
ZFS_BE_MANAGER=""

# Path where to save boot environments backup files, e.g. "/mnt/tank/zfsbackups".
ZFS_BACKUP_PATH="/mnt/ztemp/backup/backup_os"

# Path to use for mounting boot environments, e.g. "/mnt".
ZFS_MOUNT_PATH="/mnt/be"

# Skip backup mode dialog, set between "local" or "remote" backup modes.
ZFS_BACKUP_MODE=""

# Set zfs send extra parameters, e.g. "-v" default empty.
ZFS_SEND_PARAMS=""

# Set zfs receive extra parameters, e.g. "-v" default empty.
ZFS_RECV_PARAMS=""

# Set SSH parameters, e.g. "root@192.168.1.250".
SSH_NET_PARAMS=""

# Set custom compression method, e.g. "xz -9 -v --threads=0", empty for defaults.
XZ_COMPRESS_OPTIONS="-0 -v --threads=0"

# Set custom decompression method, e.g. "xz -c -d -v --threads=0", empty for defaults.
XZ_DECOMPRESS_OPTIONS="-c -d -v --threads=0"

# Display boot environments only and always take a recent snapshot before backup, empty to disable.
UI_SIMPLE_MODE="yes"
Enabling the debug (set -x) in the /usr/local/sbin/bemanager and commenting the line ZFS_BE_MANAGER="" I have:

Code: Select all

# bemanager -b upgrade-2020-04-20-174135 local
+ PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
+ VERSION=0.8.5b
+ id -u
+ [ 0 -ne 0 ]
+ basename /usr/local/sbin/bemanager
+ SCRIPTNAME=bemanager
+ CONFIG_PATH=/usr/local/etc
+ CONFIG_FILE=/usr/local/etc/bemanager.conf
+ PRD_NAME='Boot Environments Manager'
+ ZBE_MANAGER_DEF=bectl
+ DEFAULT_COMPRESS='-0 -v'
+ DEFAULT_DECOMPRESS='-c -d -v'
+ ARCHIVE_EXT=xz
+ MOUNT_PREFIX=_BE
+ mount
+ awk '/ \/ / {print $1}'
+ ROOT_FS=zroot/ROOT/upgrade-2020-04-20-174135
+ echo zroot/ROOT/upgrade-2020-04-20-174135
+ awk -F / '{print $1}'
+ ZROOT_POOL=zroot
+ zpool list -H -o bootfs zroot
+ BOOT_FS=zroot/ROOT/upgrade-2020-04-20-174135
+ echo zroot/ROOT/upgrade-2020-04-20-174135
+ sed 's|/[^/]*$||'
+ ZROOT_DATASET=zroot/ROOT
+ PARAM2=upgrade-2020-04-20-174135
+ PARAM3=local
+ echo zroot/ROOT/upgrade-2020-04-20-174135
+ grep -q -m 1 -E ^/dev/
+ echo zroot/ROOT/upgrade-2020-04-20-174135
+ awk -F / '{print NF}'
+ [ 3 -lt 3 ]
+ [ -z zroot/ROOT/upgrade-2020-04-20-174135 -o zroot/ROOT/upgrade-2020-04-20-174135 '=' - ]
+ TMPFILE=/tmp/bemanager.71471
+ trap 'rm -f /tmp/bemanager.71471' 0 1 2 3 5 6 9 15
+ getopts :acmunbrsd option
+ CLI=1
+ runtime_configuration
+ [ ! -f /usr/local/etc/bemanager.conf ]
+ runtime_variables
+ [ '' '!=' 1 ]
+ sysrc -f /usr/local/etc/bemanager.conf -qn ZFS_BE_MANAGER
+ ZBE_COMMAND=''
+ rm -f /tmp/bemanager.71471
XigmaNAS 12.1.0.4 on Dell R710 144GB RAM - RootOnZFS zroot on 2x 64GB 15k HDDs in mirror, zdata on 3x 1TB SSD in RAIDZ1.
2x XigmaNAS 11.2.0.4 - RootOnZFS on HPE Proliant Microserver gen10 X3216 - 3x 4TB WD RED. In mirror with zrep.

User avatar
JoseMR
Hardware & Software Guru
Hardware & Software Guru
Posts: 1166
Joined: 16 Apr 2014 04:15
Location: PR
Contact:
Status: Offline

Re: [EXTENSION] BE Manager (Boot Environments Manager)

#28

Post by JoseMR »

Maurizio wrote:
21 Apr 2020 16:00
JoseMR wrote:
20 Apr 2020 20:59
Note: If the variable "ZFS_BE_MANAGER" is not defined, the utility will default to the `bectl` as the Boot Environments management utility.
Thank you for your support, as usual.
I am testing the version

Code: Select all

# bemanager -v
bemanager 0.8.5b
I must always define the variable "ZFS_BE_MANAGER", my /usr/local/etc/bemanager.conf is
....
....
....

Hi Maurizio, thanks for the info, just to let you know, you can remove the "xz" from the compression options as the xz command is hardcoded into the `bemanager` utility to use XZ by default since very stable and can achieve very robust compression ratios.

In my case, my config has that "ZFS_BE_MANAGER" empty and it sets the default `bectl` command which is included in the FreeBSD base by default.

However I will install a fresh XigmaNAS RootOnZFS latest version to see what is going on there. :?

EDIT: Tested the latest `bemanager` 0.8.5 with most defaults on Fresh XigmaNAS 12.1.0.4 - 7542(No `beadm`, just default `bectl`) and seems working here while testing:

Code: Select all

xigmanas: ~# cat /usr/local/etc/bemanager.conf | grep 'ZFS_BE_MANAGER'
ZFS_BE_MANAGER=""
xigmanas: ~# bemanager -v
bemanager 0.8.5b
xigmanas: ~# bemanager -h
Usage: bemanager [option] [beName | beName@snap | fileName] | [local | remote]
Options:
      -a  Activate Boot Environment.
      -c  Create Boot Environment.
      -m  Mount Boot Environment.
      -u  Unmount Boot Environment.
      -n  Rename Boot Environment.
      -b  Backup Boot Environment.
      -r  Restore Boot Environment.
      -s  Snapshot Boot Environment.
      -d  Destroy Boot Environment.
      -v  Display version and exit.
      -h  Display this help message.
xigmanas: ~#
The tested configuration was as follow(for reference):

Code: Select all

# Run-time configuration file for bemanager.
# Auto-generated file from bemanager.

# Set the preferred zfs boot environments management utility, e.g. "beadm".
ZFS_BE_MANAGER=""

# Path where to save boot environments backup files, e.g. "/mnt/tank/zfsbackups".
ZFS_BACKUP_PATH="/mnt/Data"

# Path to use for mounting boot environments, e.g. "/mnt".
ZFS_MOUNT_PATH="/mnt/Data/mounts"

# Skip backup mode dialog, set between "local" or "remote" backup modes.  
ZFS_BACKUP_MODE=""

# Set zfs send extra parameters, e.g. "-v" default empty.
ZFS_SEND_PARAMS=""

# Set zfs receive extra parameters, e.g. "-v" default empty.
ZFS_RECV_PARAMS=""

# Set SSH parameters, e.g. "root@192.168.1.250".
SSH_NET_PARAMS=""

# Set custom compression method, e.g. "-9 -v --threads=0", empty for defaults.
XZ_COMPRESS_OPTIONS="-9 -v --threads=0"

# Set custom decompression method, e.g. "-c -d -v --threads=0", empty for defaults.
XZ_DECOMPRESS_OPTIONS="-c -d -v"

# Display boot environments only and always take a recent snapshot before backup, empty to disable.
UI_SIMPLE_MODE="yes"
P.S. I will provide more variable checks and fall back to defaults, and possibly built it as a package when proper documentation gets done for convenience. :roll:

EDIT2: Also testes latest Boot Environments Manager Extension(WebGUI) v0.3.0, which will create a `beadm` symlink to point to `bectl` in new installs, this is to let the previous version users with a working extension.


Regards
System: FreeBSD 12 RootOnZFS Mirror, MB: Supermicro X8SI6-F, Xeon X3450, 16GB DDR3 ECC RDIMMs.
XigmaNAS RootOnZFS
Addons at GitHub
BastilleBSD
Boot Environments Intro
Resources Home Page

User avatar
Maurizio
Starter
Starter
Posts: 68
Joined: 05 Jul 2018 21:49
Location: Linate (MIlan)
Status: Offline

Re: [EXTENSION] BE Manager (Boot Environments Manager)

#29

Post by Maurizio »

I have modified the https://github.com/JRGTH/bemanager/blob ... onf.sample downloaded with the installation command line and not the config file generated by bemanager, using the last one all work.

Regards
XigmaNAS 12.1.0.4 on Dell R710 144GB RAM - RootOnZFS zroot on 2x 64GB 15k HDDs in mirror, zdata on 3x 1TB SSD in RAIDZ1.
2x XigmaNAS 11.2.0.4 - RootOnZFS on HPE Proliant Microserver gen10 X3216 - 3x 4TB WD RED. In mirror with zrep.

User avatar
JoseMR
Hardware & Software Guru
Hardware & Software Guru
Posts: 1166
Joined: 16 Apr 2014 04:15
Location: PR
Contact:
Status: Offline

Re: [EXTENSION] BE Manager (Boot Environments Manager)

#30

Post by JoseMR »

Maurizio wrote:
23 Apr 2020 15:01
I have modified the https://github.com/JRGTH/bemanager/blob ... onf.sample downloaded with the installation command line and not the config file generated by bemanager, using the last one all work.

Regards
Thanks Maurizio for reporting the issue, I've updated the config sample, it was missing the `ZFS_BE_MANAGER` variable which is used to override the defaults.

Regards
System: FreeBSD 12 RootOnZFS Mirror, MB: Supermicro X8SI6-F, Xeon X3450, 16GB DDR3 ECC RDIMMs.
XigmaNAS RootOnZFS
Addons at GitHub
BastilleBSD
Boot Environments Intro
Resources Home Page

Post Reply

Return to “Extensions / Add-ons”