View Source

h1. SmartOS Clean Re-install

SmartOS can be re-installed clean on a previously used system after removing the old persistent zpool made by the installation script.
This zpool is named "zones" by default.

{note}Migrate all important ZFS snapshots, VM datasets, KVM images, /usbkey/config NIC settings, or persistent SMF scripts that you want to keep onto another system. This procedure WILL DESTROY all the persistent information stored in ZFS on the system.

Reboot SmartOS from media and choose the GRUB menu \[Live 64-bit(noinstall)\] option.
This disables the setup script and avoids importing and activating the persistent zpool.

Login and password are both "root" for single user (noinstall) mode.

From a SmartOS prompt the system can be scheduled for a factory reset (which will *DELETE* your zpools and the data on them) on the next reboot:

#zfs set smartdc:factoryreset=yes zones/var

Reboot will take you back to the GRUB menu, and the default installation script will be activated after timeout.

{note}If you can't or want to avoid boot, you can set *destroy_zpools=true* in grub boot params to do the same thing. WARNING: this will destroy *ALL* zpools, not just zones.

NOW you should be at the point where you can reboot with a system with raidz2 with compression.

The system will find no old zpool to refer to on the drive and it is ready for a clean installation.

h3. Changing the zpool default configuration

Using the method, i.e., choosing the GRUB menu \[Live 64-bit(noinstall)\] option we can recreate the zpool with a different configuration (a raidz1 by default):

# zpool import zones
# zpool destroy zones
Now, instead of rebooting the OS, you can create a new zpool with different options:

# zpool create zones raidz2 c0t1d0 c1t1d0 c4t1d0 c5t1d0 c6t1d0 c7t1d02
NOW you should be at the point where you can reboot with a system with raidz2.

From [the mailing list|]. Thanks to Christopher W.V. Hogue.