16 February 2018

Solaris 11.4 Beta: Fast (asynchronous) ZFS destroy

A destroy of a larger ZFS filesystem takes some time.
If you would like to destroy and re-create a filesystem
you need to wait till the destroy is done.

This was the case in the past. Solaris 11.4 Beta
includes a new feature: It destroys ZFS filesystems asynchronously.

You can re-create your filesystem quickly. The destroy
runs in the background. Using zpool monitor you
see how long the background destroy takes.

# zfs list destroytest/fs1
NAME USED AVAIL REFER MOUNTPOINT
destroytest/fs1 22.1G 17.1G 22.1G /fs1


# time zfs destroy destroytest/fs1; zfs create -o mountpoint=/fs1 destroytest/fs1

real 0m0.654s
user 0m0.005s
sys 0m0.621s




# zpool monitor -t destroy destroytest 5
POOL PROVIDER TOTAL SPEED TIMELEFT
destroytest destroy 22.1G 0 unknown
destroytest destroy 20.1G 401M 51s
destroytest destroy 13.5G 872M 15s
destroytest destroy 10.8G 767M 14s
destroytest destroy 4.92G 878M 5s



If you need to wait till the filesystem is destroyed completely
you can use the new -s flag.

# time zfs destroy -s destroytest/fs1


real 0m26.438s
user 0m0.005s
sys 0m0.509s



Learn more about the new Solaris 11.4 Beta on

07 February 2018

Upgrade from Solaris 11.3 to 11.4 Beta with only 4 commands using JomaSoft VDCF

You need VDCF 7.0.8 or later which supports the Solaris 11.4 Beta release.
Check your current Version using vdcfadm -c show_version

-bash-4.1$ vdcfadm -c show_version
      Package  Version     Arch.   Install-Date        Name
  JSvdcf-base  7.0.8f      i386    Feb 07 2018 11:30   JomaSoft VDCF - Base

If you don't use VDCF so far here the link to the Free Edition download
https://www.jomasoft.ch/downloads/#vdcf-free
VDCF automates lots of Solaris operations and includes best practices to save time and avoid errors.

To install Solaris 11.4 Beta and to upgrade existing systems,
we create an IPS repository. Download the 7 files from
http://www.oracle.com/technetwork/server-storage/solaris11/114beta/114betarepo-4258266.html

Place the files in a temporary directory

-bash-4.1$ ls -l /ips/zipfiles
total 18352831
-rw-r--r--   1 marcel   staff      12262 Feb  7 10:51 install-repo.ksh
-rw-r--r--   1 marcel   staff    2008529484 Feb  7 11:30 sol-11_4-beta-repo_1of5.zip
-rw-r--r--   1 marcel   staff    1702107787 Feb  7 11:23 sol-11_4-beta-repo_2of5.zip
-rw-r--r--   1 marcel   staff    2002857649 Feb  7 11:39 sol-11_4-beta-repo_3of5.zip
-rw-r--r--   1 marcel   staff    1956904984 Feb  7 11:32 sol-11_4-beta-repo_4of5.zip
-rw-r--r--   1 marcel   staff    1719447798 Feb  7 11:41 sol-11_4-beta-repo_5of5.zip
-rw-r--r--   1 marcel   staff        520 Feb  7 10:51 sol-11_4-beta-repo_digest.txt

The first VDCF command creates the new repository including the SMF service.

-bash-4.1$ ipsadm -c create_repo name=s114 dir=/ips/zipfiles zpool=repo114
Port 8282 is assigned to the repository
Using sol-11_4-beta-repo download.
Uncompressing sol-11_4-beta-repo_1of5.zip...done.
Uncompressing sol-11_4-beta-repo_2of5.zip...done.
Uncompressing sol-11_4-beta-repo_3of5.zip...done.
Uncompressing sol-11_4-beta-repo_4of5.zip...done.
Uncompressing sol-11_4-beta-repo_5of5.zip...done.
Repository can be found in /ips/repo/s114.
Repository installed in /ips/repo/s114
refresh smf service application/pkg/server:s114 ...
Repo server application/pkg/server:s114 listening on http://localhost:8282
rebuilding index (pkgrepo rebuild)
enable smf service application/pkg/server:s114 ...
Setup of IPS repository finished:
PUBLISHER PACKAGES STATUS           UPDATED
solaris   6435     online           2018-02-07T11:45:13.891850Z
Repository s114 successfully created

Then we create an AI service to allow us to install new systems with the
second VDCF command

-bash-4.1$ ipsadm -c create_service name=s114beta platform=i386 patchlevel=4.0 repository=http://localhost:8282
Creating Install service s114beta - this may take a moment ...
Service s114beta successfully created


VDCF uses reusable build definitions to reference a specific Solaris SRU, AI service
and IPS repository:

-bash-4.1$ ipsadm -c create_build name=s114betax service=s114beta repository=http://localhost:8282
Repo server http://localhost:8282 with Solaris 11 patchlevel 4.0.0.0.12.1 (U4) selected
Build s114betax successfully created


Now we can upgrade an existing Solaris 11.3 server:

-bash-4.1$ node -c upgrade name=vbox-sol11c build=s114betax reboot
Node Upgrade started for Node vbox-sol11c ...
doing a 'pkg set-publisher -g http://10.1.1.78:8282/ solaris' now ..
 Startup: Refreshing catalog 'solaris' ... Done
 Startup: Caching catalogs ... Done
doing a 'pkg update  -C 5 --accept --be-name s11.4.0.0.0.12.1 --ignore-missing --reject system/input-method/ibus/anthy --reject system/input-method/ibus/pinyin --reject system/input-method/ibus/sunpinyin --reject system/input-method/library/m17n/contrib entire@11.4,5.11-11.4.0.0.0.12.1' now ...
 Startup: Refreshing catalog 'solaris' ... Done
Planning: Solver setup ... Done
Planning: Running solver ... Done
Planning: Finding local manifests ... Done
Planning: Fetching manifests:    0/1416  0% complete

< CUT >

Current BootEnvironment list:
BE               Flags Mountpoint Space  Policy Created
--               ----- ---------- -----  ------ -------
s11.3.26.0.5.0   N     /          6.69M  static 2018-02-07 15:37
s11.4.0.0.0.12.1 R     -          29.91G static 2018-02-07 17:39
Node vbox-sol11c updated to Solaris 11 entire@11.4,5.11-11.4.0.0.0.12.1. Node is rebooting now.