Finally!
ZFS root has been in Indiana (aka OpenSolaris 2008.05) for a while, but I prefer Solaris Express.
As of build 90, it’s supported by the installer.
I installed it on my crappy P4 test box : 1Gb Ram, twin 40Gb disks. Burn the DVD ISO and boot it if you want to play along.
the secret handshake
Choose ‘Solaris Express’ (not ‘Solaris Express Developer Edition), then ‘3 . Solaris Interactive Text (Desktop Session)‘
Only the ‘Interactive Text’ options have the ZFS root option.
Running ‘Desktop’ not ‘Console’ session lets you start a Terminal
to enable compression on the pool when its created (40Gb disks, remember?).
Enabling ZFS compression won’t convert blocks that have already been written (good explanation here), so you want to do it before you populate the filesystem.
you know the drill
- Choose ‘English’
- [X starts up]
- rightclick the desktop and choose ‘programs -> terminal’
- system id
- networked: yes
- DHCP: yes
- IPv6: no
- [it'll do a DHCP request]
- Kerberos: no
- Name service : None (no need if you’re on DHCP)
- NFS domain : Use NFSv4 domain derived by the system
- Time Zone : Europe -> Britain (UK)
- root password : ‘secret’ (heh)
- F2. Standard install
- Manually eject DVD
- Manually reboot
- Choose Media : CD/DVD
- Accept license
- Geographic regions – leave all blank
- System Locale : POSIX C (C)
- Web Start : None
- Choose Filesystem Type : ZFS
- Select Software : Entire Distribution
- choose both disks (this makes a ZFS mirrored pool)
- select ‘put /var on a separate dataset’ (personal choice, but stops / filling up)
- Skip ‘Mount Remote File Systems’
fingers on buzzers
In the Terminal you opened, create a script called ‘readysetgo.sh’
#! /bin/sh
until [ "`zpool list rpool`" ];
do
:
done
zfs set compression=on rpool
until [ "`zfs list rpool/ROOT`" ];
do
:
done
zfs set compression=on rpool/ROOT
Then just run
sh readysetgo.sh
in the Terminal you opened earlier.
You can now start the install. Once the pool is created, it’ll have compression
enabled automatically.
scrooged
Let’s see how much benefit we got. The ‘Entire Distribution’ took about
5Gb of disk without compression, looks to be about 3 Gb with..
vera:~ $ zfs get -r compressratio rpool
NAME PROPERTY VALUE SOURCE
rpool compressratio 1.62x -
rpool/ROOT compressratio 1.74x -
rpool/ROOT/snv_90 compressratio 1.74x -
rpool/ROOT/snv_90/var compressratio 2.60x -
rpool/dump compressratio 1.00x -
rpool/swap compressratio 1.37x -
vera:~ $
(UPDATED - thanks to Glenns blog for the neater script, and Andrew in the comments for tidying it up further)
