*New 11.3 series Release:
2019-10-19: XigmaNAS 11.3.0.4.7014 - released

*New 12.0 series Release:
2019-10-05: XigmaNAS 12.0.0.4.6928 - released!

*New 11.2 series Release:
2019-09-23: XigmaNAS 11.2.0.4.6881 - 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

NOTICE: For RootOnZFS Users

General information about XigmaNAS
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
User avatar
JoseMR
Hardware & Software Guru
Hardware & Software Guru
Posts: 1160
Joined: 16 Apr 2014 04:15
Location: PR
Contact:
Status: Offline

NOTICE: For RootOnZFS Users

#1

Post by JoseMR » 02 Nov 2018 21:56

Hello RootOnZFS Platform users, as for Revision 6165 RootOnZFS platforms strictly follows "FreeBSD bsdinstall" zroot datasets scheme, this makes for the "/var" directory reside inside each Boot Environment while the "/var/log" and "/var/tmp" being shared across them, this changes will also simplify for Boot Environment backups/exports since "/var" is included there is no longer the need for any separate "/var" dataset backups, useful for the bemanager users, also this will improve the overall consistency across Boot Environments.

To benefit from this new changes, it will require a RootOnZFS re-install, however since this affects only new installs current users can stay using/upgrading RootOnZFS normally if a re-install is not an option.

Additionally advanced ZFS users can perform this changes manually through booting from any live media platform, however since there's possibility of data lost due to human errors, I will encourage any RootOnZFS platform users wanting latest features to just backup config.xml and any file.conf/custom scripts if any and restore them after re-install, additional packages added through "pkg install" need to be reinstalled as expected.

Remember that after re-install and restoring config.xml, just execute "zpool import -f -a" and synchronize the pools to update config, that's it.

FAQS:
Q: But why this was not made on the first place?
A: The previous dataset scheme was intended to save Boot Environments space by sharing "/var" across them, in favor for USB sticks users but no longer the case.

Q: Can I still upgrade from WebGUI on my previous install, I have lots of packages and I'm lazy for a re-install.
A: Yes any previous users can still upgrade to latest from the WebGUI since this only affects new installs.

Additional details on latest zroot datasets/mountpoints:

Code: Select all

xigmanas: ~# zfs list -r zroot
NAME                         USED  AVAIL  REFER  MOUNTPOINT
zroot                        839M  12.3G    88K  /zroot
zroot/Data                    88K  12.3G    88K  /mnt/Data
zroot/ROOT                   837M  12.3G    88K  none
zroot/ROOT/default-install   837M  12.3G   837M  /
zroot/tmp                    124K  12.3G   124K  /tmp
zroot/var                    324K  12.3G    88K  /var
zroot/var/log                148K  12.3G   148K  /var/log
zroot/var/tmp                 88K  12.3G    88K  /var/tmp
xigmanas: ~# df -hT
Filesystem                  Type      Size    Used   Avail Capacity  Mounted on
zroot/ROOT/default-install  zfs        13G    837M     12G     6%    /
devfs                       devfs     1.0K    1.0K      0B   100%    /dev
zroot/tmp                   zfs        12G    124K     12G     0%    /tmp
zroot/var/log               zfs        12G    148K     12G     0%    /var/log
zroot/var/tmp               zfs        12G     88K     12G     0%    /var/tmp
procfs                      procfs    4.0K    4.0K      0B   100%    /proc
xigmanas: ~# mount | grep zroot
zroot/ROOT/default-install on / (zfs, local, noatime, nfsv4acls)
zroot/tmp on /tmp (zfs, local, noatime, nosuid, nfsv4acls)
zroot/var/log on /var/log (zfs, local, noatime, noexec, nosuid, nfsv4acls)
zroot/var/tmp on /var/tmp (zfs, local, noatime, nosuid, nfsv4acls)
xigmanas: ~#
Regards
System: FreeBSD 12 RootOnZFS, MB: Supermicro X8SI6-F, Xeon X3450, 16GB DDR3 ECC RDIMMs.
Addons at GitHub
JoseMRPubServ
Boot Environments Intro

Bruce
Starter
Starter
Posts: 15
Joined: 06 Mar 2017 14:39
Status: Offline

Re: NOTICE: For RootOnZFS Users

#2

Post by Bruce » 04 Nov 2018 05:49

Can I re-install from XigmaNAS 11.2.0.4 (6026) or 5774?

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

Re: NOTICE: For RootOnZFS Users

#3

Post by JoseMR » 04 Nov 2018 06:04

Bruce wrote:
04 Nov 2018 05:49
Can I re-install from XigmaNAS 11.2.0.4 (6026) or 5774?

Sure you can always re-install, just make sure to backup your config and any customs if any.

Regards
System: FreeBSD 12 RootOnZFS, MB: Supermicro X8SI6-F, Xeon X3450, 16GB DDR3 ECC RDIMMs.
Addons at GitHub
JoseMRPubServ
Boot Environments Intro

Bruce
Starter
Starter
Posts: 15
Joined: 06 Mar 2017 14:39
Status: Offline

Re: NOTICE: For RootOnZFS Users

#4

Post by Bruce » 04 Nov 2018 06:45

How to bakup "any file.conf/custom scripts" and how to restore them after re-install?

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

Re: NOTICE: For RootOnZFS Users

#5

Post by JoseMR » 04 Nov 2018 08:11

Bruce wrote:
04 Nov 2018 06:45
How to bakup "any file.conf/custom scripts" and how to restore them after re-install?

You can backup this files usually by copying them into a safe location, e.g. your DATA pool/array, with rsync, cp, tar etc. there are several ways to accomplish this, however if you haven't installed a bunch of packages, or packages with several configuration files such as Apache, Webmin etc. you can safely ignore and simply backup XigmaNAS config.xml and reinstall. ;)

Between for users wondering where this files usually resides, the most common locations for most packages are "/etc", "/usr/local/etc"

Regards
System: FreeBSD 12 RootOnZFS, MB: Supermicro X8SI6-F, Xeon X3450, 16GB DDR3 ECC RDIMMs.
Addons at GitHub
JoseMRPubServ
Boot Environments Intro

Bruce
Starter
Starter
Posts: 15
Joined: 06 Mar 2017 14:39
Status: Offline

Re: NOTICE: For RootOnZFS Users

#6

Post by Bruce » 04 Nov 2018 09:00

JoseMR wrote:
04 Nov 2018 08:11
Bruce wrote:
04 Nov 2018 06:45
How to bakup "any file.conf/custom scripts" and how to restore them after re-install?

You can backup this files usually by copying them into a safe location, e.g. your DATA pool/array, with rsync, cp, tar etc. there are several ways to accomplish this, however if you haven't installed a bunch of packages, or packages with several configuration files such as Apache, Webmin etc. you can safely ignore and simply backup XigmaNAS config.xml and reinstall. ;)

Between for users wondering where this files usually resides, the most common locations for most packages are "/etc", "/usr/local/etc"

Regards
Thanks a lot!

Bruce
Starter
Starter
Posts: 15
Joined: 06 Mar 2017 14:39
Status: Offline

Re: NOTICE: For RootOnZFS Users

#7

Post by Bruce » 05 Nov 2018 02:44

It is right?
zroot/ROOT/upgrade-2018-10-05-110709 21.4G 124G 4.01G /

Code: Select all

form: bin# zfs list -r zroot
NAME                                   USED  AVAIL  REFER  MOUNTPOINT
zroot                                  153G   124G    88K  /zroot
zroot/ROOT                            21.5G   124G    88K  /zroot/ROOT
zroot/ROOT/default-install            1.99M   124G  1.40G  /
zroot/ROOT/upgrade-2017-12-01-084106  2.31M   124G  1.61G  /
zroot/ROOT/upgrade-2017-12-03-091459  2.56M   124G  2.13G  /
zroot/ROOT/upgrade-2017-12-11-131145  2.17M   124G  2.14G  /
zroot/ROOT/upgrade-2017-12-12-144411  2.63M   124G  2.44G  /
zroot/ROOT/upgrade-2018-04-24-170304  2.96M   124G  2.40G  /
zroot/ROOT/upgrade-2018-05-19-204528  2.72M   124G  2.50G  /
zroot/ROOT/upgrade-2018-05-23-225228  2.79M   124G  2.40G  /
zroot/ROOT/upgrade-2018-06-15-163245  3.09M   124G  2.52G  /
zroot/ROOT/upgrade-2018-07-11-235258  2.87M   124G  2.65G  /
zroot/ROOT/upgrade-2018-07-13-073501  2.91M   124G  2.64G  /
zroot/ROOT/upgrade-2018-07-13-080349  3.05M   124G  2.73G  /
zroot/ROOT/upgrade-2018-07-20-074446  3.62M   124G  2.64G  /
zroot/ROOT/upgrade-2018-08-10-061805  2.45M   124G  2.59G  /
zroot/ROOT/upgrade-2018-10-05-110709  21.4G   124G  4.01G  /
zroot/data                             132G   124G   132G  /zroot/data

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

Re: NOTICE: For RootOnZFS Users

#8

Post by JoseMR » 05 Nov 2018 05:50

Bruce wrote:
05 Nov 2018 02:44
It is right?
zroot/ROOT/upgrade-2018-10-05-110709 21.4G 124G 4.01G /

Code: Select all

form: bin# zfs list -r zroot
NAME                                   USED  AVAIL  REFER  MOUNTPOINT
zroot                                  153G   124G    88K  /zroot
zroot/ROOT                            21.5G   124G    88K  /zroot/ROOT
zroot/ROOT/default-install            1.99M   124G  1.40G  /
zroot/ROOT/upgrade-2017-12-01-084106  2.31M   124G  1.61G  /
zroot/ROOT/upgrade-2017-12-03-091459  2.56M   124G  2.13G  /
zroot/ROOT/upgrade-2017-12-11-131145  2.17M   124G  2.14G  /
zroot/ROOT/upgrade-2017-12-12-144411  2.63M   124G  2.44G  /
zroot/ROOT/upgrade-2018-04-24-170304  2.96M   124G  2.40G  /
zroot/ROOT/upgrade-2018-05-19-204528  2.72M   124G  2.50G  /
zroot/ROOT/upgrade-2018-05-23-225228  2.79M   124G  2.40G  /
zroot/ROOT/upgrade-2018-06-15-163245  3.09M   124G  2.52G  /
zroot/ROOT/upgrade-2018-07-11-235258  2.87M   124G  2.65G  /
zroot/ROOT/upgrade-2018-07-13-073501  2.91M   124G  2.64G  /
zroot/ROOT/upgrade-2018-07-13-080349  3.05M   124G  2.73G  /
zroot/ROOT/upgrade-2018-07-20-074446  3.62M   124G  2.64G  /
zroot/ROOT/upgrade-2018-08-10-061805  2.45M   124G  2.59G  /
zroot/ROOT/upgrade-2018-10-05-110709  21.4G   124G  4.01G  /
zroot/data                             132G   124G   132G  /zroot/data

Very nice for the x15 Boot Environments count dating back to 2017 :P , Looking good to me indeed, I assume you don't reinstalled, just upgraded and that's fine as well.

Remember that you can always delete older boot environments and just keep a small count e.g. the last 4 or so BE's, to save space, but I see you use plenty of space and can hold many more, also remember that snapshots can also add additionally refer space. ;)

Regards
System: FreeBSD 12 RootOnZFS, MB: Supermicro X8SI6-F, Xeon X3450, 16GB DDR3 ECC RDIMMs.
Addons at GitHub
JoseMRPubServ
Boot Environments Intro

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

Re: NOTICE: For RootOnZFS Users

#9

Post by doktornotor » 05 Nov 2018 09:50

JoseMR wrote:
02 Nov 2018 21:56
Additionally advanced ZFS users can perform this changes manually through booting from any live media platform
Happen to have a short howto? I have a custom install with ZIL/L2ARC using some leftover space on the zroot SSD, not exactly keen to redo that.

Thanks,

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

Re: NOTICE: For RootOnZFS Users

#10

Post by JoseMR » 05 Nov 2018 13:42

doktornotor wrote:
05 Nov 2018 09:50
JoseMR wrote:
02 Nov 2018 21:56
Additionally advanced ZFS users can perform this changes manually through booting from any live media platform
Happen to have a short howto? I have a custom install with ZIL/L2ARC using some leftover space on the zroot SSD, not exactly keen to redo that.

Thanks,

Hi, I know how that feels, I've created a small quick script to perform this, but never posted about, however I will share this only for the advanced users AS-IS without any guarantees, I've tested this script with a system specs as low as just 2GB RAM, and 2 CPU Cores, between the more RAM the better, additionally you can execute "pkg clean" to remove the pkg cache files from backup(recommended).

The zipped zroot-update script can be found HERE

Note: I've take down the script link and can supply on PM for interested users, this is to prevent for the earlier releases of RootOnZFS users unaware of the changes to break they system, additionally RootOnZFS users with limited ZFS CLI experience, backup *config and reinstall is the way to go.

Instructions:
1: Upgrade to latest RootOnZFS before continue with this procedure.
2: Execute beadm list and copy the active(NR) Boot Environment name, e.g. "upgrade-2018-11-05-120842".
3: Reboot into any LiveMedia, setup SSH and place script into /root and execute the script with the below usage instructions.

Usage: "./zroot-update boot_environment_name"

Sample output:

Code: Select all

xigmanas: ~# ./zroot-update upgrade-2018-11-05-120842
Importing zroot to an alternate location.
Done!
Creating memory disk for backups...
Backup of var and logs in progress...
Unmount old dataset...
Set canmount=off to zroot/var...
Creating new dataset...
Restoring logs to new dataset...
Unmount new datasets...
Restoring var to upgrade-2018-11-05-120842...
Done!
zroot datasets conversion completed for the Boot Environment: upgrade-2018-11-05-120842
It is recommended to save the content of /tmp/backups prior to reboot.
xigmanas: ~#
If all wen well, the zroot datasets scheme should look like this:

Code: Select all

xigmanas: ~# mount | grep zroot
zroot/ROOT/upgrade-2018-11-05-120842 on / (zfs, local, noatime, nfsv4acls)
zroot/tmp on /tmp (zfs, local, noatime, nosuid, nfsv4acls)
zroot/var/log on /var/log (zfs, local, noatime, noexec, nosuid, nfsv4acls)
zroot/var/tmp on /var/tmp (zfs, local, noatime, nosuid, nfsv4acls)
xigmanas: ~#
At this point, only the selected Boot Environment will have the /var content inside , to restore on the rest of the BE's is as simple as mounting previous BE's and rsync /var to them one by one, or simply delete if they are unuseful.

Regards
System: FreeBSD 12 RootOnZFS, MB: Supermicro X8SI6-F, Xeon X3450, 16GB DDR3 ECC RDIMMs.
Addons at GitHub
JoseMRPubServ
Boot Environments Intro

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

Re: NOTICE: For RootOnZFS Users

#11

Post by doktornotor » 05 Nov 2018 22:16

JoseMR wrote:
05 Nov 2018 13:42
I've created a small quick script to perform this, but never posted about, however I will share this only for the advanced users AS-IS without any guarantees, I've tested this script with a system specs as low as just 2GB RAM, and 2 CPU Cores, between the more RAM the better.

The zipped zroot-update script can be found HERE
Thanks, much appreciated. 8-) Looks like a fairly simple process... Will give it a try this weekend and post back the results... :lol:

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

Re: NOTICE: For RootOnZFS Users

#12

Post by JoseMR » 05 Nov 2018 22:25

doktornotor wrote:
05 Nov 2018 22:16
JoseMR wrote:
05 Nov 2018 13:42
I've created a small quick script to perform this, but never posted about, however I will share this only for the advanced users AS-IS without any guarantees, I've tested this script with a system specs as low as just 2GB RAM, and 2 CPU Cores, between the more RAM the better.

The zipped zroot-update script can be found HERE
Thanks, much appreciated. 8-) Looks like a fairly simple process... Will give it a try this weekend and post back the results... :lol:

Remember to Upgrade to latest version then convert, I will lock the script to prevent unaware users from breaking their systems.
any additional questions about, please just ask for.

EDIT: Script has been updated, minimum allowed revision for the specified Boot Environment is 6166.

Regards
System: FreeBSD 12 RootOnZFS, MB: Supermicro X8SI6-F, Xeon X3450, 16GB DDR3 ECC RDIMMs.
Addons at GitHub
JoseMRPubServ
Boot Environments Intro

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

Re: NOTICE: For RootOnZFS Users

#13

Post by doktornotor » 06 Nov 2018 00:00

JoseMR wrote:
05 Nov 2018 22:25
Remember to Upgrade to latest version then convert
Already on 11.2.0.4.6177 but thanks for the update, safer this way... 8-)

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

Re: NOTICE: For RootOnZFS Users

#14

Post by doktornotor » 06 Nov 2018 13:35

@JoseMR

OK, there is a whole bunch of issues with the script that seem to exist on my test box:

Code: Select all

Backup of var and logs in progress...
tar: *: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors.
Unmount old dataset...
cannot open 'zroot/var': dataset does not exist
Set canmount=off to zroot/var...
cannot open 'zroot/var': dataset does not exist
Creating new dataset...
cannot create 'zroot/var/log': parent does not exist
cannot create 'zroot/var/tmp': parent does not exist
Restoring logs to new dataset...
tar: could not chdir to '/mnt/_zroot/var/log/'

Unmount new datasets...
cannot open 'zroot/var/log': dataset does not exist
cannot open 'zroot/var/tmp': dataset does not exist
Restoring var to ...
cannot open 'zroot/ROOT/': trailing slash in name
cannot open 'zroot/ROOT/': trailing slash in name
Done!
zroot datasets conversion completed for the Boot Environment:
It is recommended to save the content of /tmp/backups prior to reboot just in case.
Summarized by the below diff:

1/ When you unmount the old zroot, you have nothing to tar and backup after that.
2/ Second, you try to unmount a non-existent zroot/var "old" dataset
3/ Third, creating /var/log and /var/tmp datasets fails since the parent is missing
4/ The attempt to restore /var/log does to wrong place

Do I have some special setup in my about one year test rig, or???

Code: Select all

--- zroot-update.orig   2018-11-05 17:11:28.000000000 +0000
+++ zroot-update        2018-11-06 12:20:36.000000000 +0000
@@ -59,7 +59,7 @@
        REVISION=$(/bin/cat /mnt/_${ZROOT}/etc/prd.revision)
        if [ "${REVISION}" -gt "${MINREVISION}" ]; then
                echo "Revision ok, proceeding with the conversion..."
-               zfs umount -f ${ZROOT}/ROOT/${BENAME}
+               # zfs umount -f ${ZROOT}/ROOT/${BENAME}
        else
                echo "Detected revision does not meet the minimum requirements."
                zfs umount -f ${ZROOT}/ROOT/${BENAME}
@@ -85,22 +85,22 @@
 sleep 1

 # Unmount datasets.
-echo "Unmount old dataset..."
-zfs unmount -f ${ZROOT}/var
-sleep 1
+# echo "Unmount old dataset..."
+# zfs unmount -f ${ZROOT}/var
+# sleep 1

+echo "Creating new dataset..."
+zfs create ${ZROOT}/var
 echo "Set canmount=off to ${ZROOT}/var..."
 zfs set canmount=off ${ZROOT}/var
 sleep 1
-
-echo "Creating new dataset..."
 zfs create -o exec=off -o setuid=off ${ZROOT}/var/log
 zfs create -o setuid=off ${ZROOT}/var/tmp
 sleep 1

 # Restore current logs from backup.
 echo "Restoring logs to new dataset..."
-cd ${BACKUPDIR} && tar -xf ${ZROOT}_log.tgz -C /mnt/_${ZROOT}/var/log/
+cd ${BACKUPDIR} && tar -xf ${ZROOT}_log.tgz -C /mnt/_${ZROOT}/${ZROOT}/var/log/
 sleep 1

 # Unoumt datasets.
@@ -111,7 +111,7 @@

 # Restore current var content to the specified boot environment.
 echo "Restoring var to ${BENAME}..."
-zfs mount ${ZROOT}/ROOT/${BENAME}
+# zfs mount ${ZROOT}/ROOT/${BENAME}
 cd ${BACKUPDIR} && tar -xf ${ZROOT}_var.tgz -C /mnt/_${ZROOT}/var/
 zfs umount -f ${ZROOT}/ROOT/${BENAME}
 sync && sleep 1
After the above debugging and quite a bunch of manual messing in the shell, this is the result for me:

Code: Select all

zfs list -r zroot
NAME                                   USED  AVAIL  REFER  MOUNTPOINT
zroot                                 6.23G  9.14G    88K  /zroot
zroot/ROOT                            6.22G  9.14G    88K  /zroot/ROOT
zroot/ROOT/default-install            2.43M  9.14G  1.43G  /
zroot/ROOT/upgrade-2018-09-14-224130  3.07M  9.14G  1.45G  /
zroot/ROOT/upgrade-2018-09-27-201427  2.47M  9.14G  1.44G  /
zroot/ROOT/upgrade-2018-10-24-134916  2.65M  9.14G  1.73G  /
zroot/ROOT/upgrade-2018-11-03-201212  6.21G  9.14G  1.79G  /
zroot/var                             4.88M  9.14G    88K  /zroot/var
zroot/var/log                         4.71M  9.14G  4.71M  /zroot/var/log
zroot/var/tmp                           88K  9.14G    88K  /zroot/var/tmp

Code: Select all

# mount | grep zroot
zroot/ROOT/upgrade-2018-11-03-201212 on / (zfs, local, nfsv4acls)
zroot/var/log on /zroot/var/log (zfs, local, noexec, nosuid, nfsv4acls)
zroot/var/tmp on /zroot/var/tmp (zfs, local, nosuid, nfsv4acls)
Sounds like we both probably have missed something in the process.
Last edited by doktornotor on 06 Nov 2018 14:50, edited 2 times in total.

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

Re: NOTICE: For RootOnZFS Users

#15

Post by doktornotor » 06 Nov 2018 14:35

Ok, getting closer. Rebooted to LiveCD once again and did

Code: Select all

zfs set mountpoint=/var zroot/var
after importing zroot. Now I have:

Code: Select all

# zfs list -r zroot
NAME                                   USED  AVAIL  REFER  MOUNTPOINT
zroot                                 6.23G  9.15G    88K  /zroot
zroot/ROOT                            6.22G  9.15G    88K  /zroot/ROOT
zroot/ROOT/default-install            2.43M  9.15G  1.43G  /
zroot/ROOT/upgrade-2018-09-14-224130  3.07M  9.15G  1.45G  /
zroot/ROOT/upgrade-2018-09-27-201427  2.47M  9.15G  1.44G  /
zroot/ROOT/upgrade-2018-10-24-134916  2.65M  9.15G  1.73G  /
zroot/ROOT/upgrade-2018-11-03-201212  6.21G  9.15G  1.79G  /
zroot/var                              296K  9.15G    88K  /var
zroot/var/log                          120K  9.15G   120K  /var/log
zroot/var/tmp                           88K  9.15G    88K  /var/tmp

Code: Select all

# mount | grep zroot
zroot/ROOT/upgrade-2018-11-03-201212 on / (zfs, local, nfsv4acls)
zroot/var/log on /var/log (zfs, local, noexec, nosuid, nfsv4acls)
zroot/var/tmp on /var/tmp (zfs, local, nosuid, nfsv4acls)
No data lost and looks pretty good, except that I'm still missing zroot/tmp. Nothing being done about that in the script AFAICT.

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

Re: NOTICE: For RootOnZFS Users

#16

Post by JoseMR » 06 Nov 2018 16:01

doktornotor wrote:
06 Nov 2018 14:35
Ok, getting closer. Rebooted to LiveCD once again and did

...

No data lost and looks pretty good, except that I'm still missing zroot/tmp. Nothing being done about that in the script AFAICT.

Hi doktornotor, it looks like you had the very first RootOnZFS release were everything was just tied down to "/" just like in the UFS version, hence the missing datasents stuff/tar executions just failed, I actually din't accounted into that and the that script just a quick write with nearly no validation existent, thanks for taking the risk, I will take down the links for safety, I'm really sorry for the hassle and inconvenience this can cause. :oops:

As for the missing /tmp dataset, you can create it by:

Code: Select all

zfs create -o mountpoint=/tmp -o exec=on -o setuid=off ${ZROOT}/tmp
Above code is taken directly from the zfsinstall.sh who follow bsdinstall zroot scheme.

Regards
System: FreeBSD 12 RootOnZFS, MB: Supermicro X8SI6-F, Xeon X3450, 16GB DDR3 ECC RDIMMs.
Addons at GitHub
JoseMRPubServ
Boot Environments Intro

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

Re: NOTICE: For RootOnZFS Users

#17

Post by doktornotor » 06 Nov 2018 16:10

JoseMR wrote:
06 Nov 2018 16:01
Hi doktornotor, it looks like you had the very first RootOnZFS release were everything was just tied down to "/" just like in the UFS version, hence the missing datasents stuff/tar executions just failed
LOL... I seem be encountering corner cases all the time. :lol: Also seems to explain my confusion about this announcement because it did not really make much sense to me given my setup. :P
JoseMR wrote:
06 Nov 2018 16:01
I actually din't accounted into that and the that script just a quick write with nearly no validation existent, thanks for taking the risk, I will take down the links for safety, I'm really sorry for the hassle and inconvenience this can cause. :oops:
Well, no problem at all... was a good exercise plus still less hassle than redoing the custom ZIL/L2ARC stuff (forgot to make notes of the steps I did).
JoseMR wrote:
06 Nov 2018 16:01
As for the missing /tmp dataset, you can create it by:

Code: Select all

zfs create -o mountpoint=/tmp -o exec=on -o setuid=off ${ZROOT}/tmp
Above code is taken directly from the zfsinstall.sh who follow bsdinstall zroot scheme.
Yeah, will do one last reboot to LiveCD this evening to finish this up.

Thanks for your help! 8-)

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

Re: NOTICE: For RootOnZFS Users

#18

Post by doktornotor » 06 Nov 2018 16:40

doktornotor wrote:
06 Nov 2018 16:10
JoseMR wrote:
06 Nov 2018 16:01
As for the missing /tmp dataset, you can create it by:

Code: Select all

zfs create -o mountpoint=/tmp -o exec=on -o setuid=off ${ZROOT}/tmp
Above code is taken directly from the zfsinstall.sh who follow bsdinstall zroot scheme.
Yeah, will do one last reboot to LiveCD this evening to finish this up.
OK, looks like we are done here:

Code: Select all

# zfs list -r zroot
NAME                                   USED  AVAIL  REFER  MOUNTPOINT
zroot                                 6.23G  9.15G    88K  /zroot
zroot/ROOT                            6.22G  9.15G    88K  /zroot/ROOT
zroot/ROOT/default-install            2.43M  9.15G  1.43G  /
zroot/ROOT/upgrade-2018-11-03-201212  6.21G  9.15G  1.79G  /
zroot/tmp                              408K  9.15G   408K  /tmp
zroot/var                              300K  9.15G    88K  /var
zroot/var/log                          124K  9.15G   124K  /var/log
zroot/var/tmp                           88K  9.15G    88K  /var/tmp

Code: Select all

# mount | grep zroot
zroot/ROOT/upgrade-2018-11-03-201212 on / (zfs, local, nfsv4acls)
zroot/tmp on /tmp (zfs, local, nosuid, nfsv4acls)
zroot/var/log on /var/log (zfs, local, noexec, nosuid, nfsv4acls)
zroot/var/tmp on /var/tmp (zfs, local, nosuid, nfsv4acls)
8-) :geek: :lol:

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

Re: NOTICE: For RootOnZFS Users

#19

Post by JoseMR » 06 Nov 2018 22:18

doktornotor wrote:
06 Nov 2018 16:40

Code: Select all

# mount | grep zroot
zroot/ROOT/upgrade-2018-11-03-201212 on / (zfs, local, nfsv4acls)
zroot/tmp on /tmp (zfs, local, nosuid, nfsv4acls)
zroot/var/log on /var/log (zfs, local, noexec, nosuid, nfsv4acls)
zroot/var/tmp on /var/tmp (zfs, local, nosuid, nfsv4acls)
8-) :geek: :lol:
Just excellent, glad your system is on latest changes ;)

Regards
System: FreeBSD 12 RootOnZFS, MB: Supermicro X8SI6-F, Xeon X3450, 16GB DDR3 ECC RDIMMs.
Addons at GitHub
JoseMRPubServ
Boot Environments Intro

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

Re: NOTICE: For RootOnZFS Users

#20

Post by Maurizio » 07 Nov 2018 14:33

JoseMR wrote:
05 Nov 2018 13:42
Usage: "./zroot-update boot_environment_name"
Just upgraded my ASUS P8H67 with your script without problem.
Thank you.
XigmaNAS 11.2.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: 1160
Joined: 16 Apr 2014 04:15
Location: PR
Contact:
Status: Offline

Re: NOTICE: For RootOnZFS Users

#21

Post by JoseMR » 07 Nov 2018 20:06

Maurizio wrote:
07 Nov 2018 14:33
JoseMR wrote:
05 Nov 2018 13:42
Usage: "./zroot-update boot_environment_name"
Just upgraded my ASUS P8H67 with your script without problem.
Thank you.

Hi Maurizio, thanks for reporting script worked for you, with this RootOnZFS datasets changes, you no longer need to backup /var as it will reside inside each BE, this may simplify your BE's backup with "bemanager" and "zrep".

Remember that you may want to mount each additional BE(easily with bemanager) and rsync /var from current BE, if you switch between em.

Regards
System: FreeBSD 12 RootOnZFS, MB: Supermicro X8SI6-F, Xeon X3450, 16GB DDR3 ECC RDIMMs.
Addons at GitHub
JoseMRPubServ
Boot Environments Intro

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

Re: NOTICE: For RootOnZFS Users

#22

Post by Maurizio » 08 Nov 2018 17:13

JoseMR wrote:
07 Nov 2018 20:06
Hi Maurizio, thanks for reporting script worked for you, with this RootOnZFS datasets changes, you no longer need to backup /var as it will reside inside each BE, this may simplify your BE's backup with "bemanager" and "zrep".

Remember that you may want to mount each additional BE(easily with bemanager) and rsync /var from current BE, if you switch between em.

Regards
Hi JoseMR,

I have upgraded, simplifying, the backup/restore scripts and I am just testing them. If all works I will upgrade the post : XigmaNAS RootOnZFS installation backup/restore

Regards.
XigmaNAS 11.2.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: 1160
Joined: 16 Apr 2014 04:15
Location: PR
Contact:
Status: Offline

Re: NOTICE: For RootOnZFS Users

#23

Post by JoseMR » 09 Nov 2018 00:06

Maurizio wrote:
08 Nov 2018 17:13
Hi JoseMR,

I have upgraded, simplifying, the backup/restore scripts and I am just testing them. If all works I will upgrade the post : XigmaNAS RootOnZFS installation backup/restore

Regards.
Hi, really nice to know you are testing and simplifying your backup/restore plan/method, looking forward for your setup experience.

Regards
System: FreeBSD 12 RootOnZFS, MB: Supermicro X8SI6-F, Xeon X3450, 16GB DDR3 ECC RDIMMs.
Addons at GitHub
JoseMRPubServ
Boot Environments Intro

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

Re: NOTICE: For RootOnZFS Users

#24

Post by JoseMR » 13 Nov 2018 06:59

XigmaNAS RootOnZFS Revision 6195 available at SF featuring Input validation and optional user dataset creation for newcomers friendliness. :)

Regards
System: FreeBSD 12 RootOnZFS, MB: Supermicro X8SI6-F, Xeon X3450, 16GB DDR3 ECC RDIMMs.
Addons at GitHub
JoseMRPubServ
Boot Environments Intro

Bruce
Starter
Starter
Posts: 15
Joined: 06 Mar 2017 14:39
Status: Offline

Re: NOTICE: For RootOnZFS Users

#25

Post by Bruce » 06 Jan 2019 03:20

JoseMR wrote:
05 Nov 2018 05:50
Bruce wrote:
05 Nov 2018 02:44
It is right?
zroot/ROOT/upgrade-2018-10-05-110709 21.4G 124G 4.01G /

Code: Select all

form: bin# zfs list -r zroot
NAME                                   USED  AVAIL  REFER  MOUNTPOINT
zroot                                  153G   124G    88K  /zroot
zroot/ROOT                            21.5G   124G    88K  /zroot/ROOT
zroot/ROOT/default-install            1.99M   124G  1.40G  /
zroot/ROOT/upgrade-2017-12-01-084106  2.31M   124G  1.61G  /
zroot/ROOT/upgrade-2017-12-03-091459  2.56M   124G  2.13G  /
zroot/ROOT/upgrade-2017-12-11-131145  2.17M   124G  2.14G  /
zroot/ROOT/upgrade-2017-12-12-144411  2.63M   124G  2.44G  /
zroot/ROOT/upgrade-2018-04-24-170304  2.96M   124G  2.40G  /
zroot/ROOT/upgrade-2018-05-19-204528  2.72M   124G  2.50G  /
zroot/ROOT/upgrade-2018-05-23-225228  2.79M   124G  2.40G  /
zroot/ROOT/upgrade-2018-06-15-163245  3.09M   124G  2.52G  /
zroot/ROOT/upgrade-2018-07-11-235258  2.87M   124G  2.65G  /
zroot/ROOT/upgrade-2018-07-13-073501  2.91M   124G  2.64G  /
zroot/ROOT/upgrade-2018-07-13-080349  3.05M   124G  2.73G  /
zroot/ROOT/upgrade-2018-07-20-074446  3.62M   124G  2.64G  /
zroot/ROOT/upgrade-2018-08-10-061805  2.45M   124G  2.59G  /
zroot/ROOT/upgrade-2018-10-05-110709  21.4G   124G  4.01G  /
zroot/data                             132G   124G   132G  /zroot/data

Very nice for the x15 Boot Environments count dating back to 2017 :P , Looking good to me indeed, I assume you don't reinstalled, just upgraded and that's fine as well.

Remember that you can always delete older boot environments and just keep a small count e.g. the last 4 or so BE's, to save space, but I see you use plenty of space and can hold many more, also remember that snapshots can also add additionally refer space. ;)

Regards

Can you help me?
How to delete older boot environments? Thanks!

Code: Select all

/zroot# rm -i zroot/ROOT/upgrade-2017-12-03-091459
rm: zroot/ROOT/upgrade-2017-12-03-091459: No such file or directory
nas4platform: /zroot# rm -i /zroot/ROOT/upgrade-2017-12-03-091459
rm: /zroot/ROOT/upgrade-2017-12-03-091459: No such file or directory

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

Re: NOTICE: For RootOnZFS Users

#26

Post by JoseMR » 06 Jan 2019 09:38

Bruce wrote:
06 Jan 2019 03:20

Can you help me?
How to delete older boot environments? Thanks!

Code: Select all

/zroot# rm -i zroot/ROOT/upgrade-2017-12-03-091459
rm: zroot/ROOT/upgrade-2017-12-03-091459: No such file or directory
nas4platform: /zroot# rm -i /zroot/ROOT/upgrade-2017-12-03-091459
rm: /zroot/ROOT/upgrade-2017-12-03-091459: No such file or directory

Hi, never ever try to remove a Boot Environment with the rm command, just use the beadm utility for delete older BE's with "beadm destroy -F bename", (keep default-install), example below:

Code: Select all

beadm destroy -F upgrade-2017-12-03-091459
Or you can use This menu driven utility for ease.

Also a Boot Environment manager GUI integration is on the TODO list already, so you will be able to perform this from the WebGUI.

Regards
System: FreeBSD 12 RootOnZFS, MB: Supermicro X8SI6-F, Xeon X3450, 16GB DDR3 ECC RDIMMs.
Addons at GitHub
JoseMRPubServ
Boot Environments Intro

Bruce
Starter
Starter
Posts: 15
Joined: 06 Mar 2017 14:39
Status: Offline

Re: NOTICE: For RootOnZFS Users

#27

Post by Bruce » 06 Jan 2019 10:49

Hi JoseMR,

Thanks a lots!

Post Reply

Return to “GENERAL INFORMATION”