Results 1 to 3 of 3

Thread: FreeNAS root on ZFS

  1. #1
    Junior Member
    Join Date
    May 2011
    Posts
    3

    FreeNAS root on ZFS

    As I am a big fan of ZFS, I tweaked FreeNAS to boot&run completely from ZFS. No UFS at all. On a single 2Gb stick, root filesystem takes 431Mb on ZFS.
    Having root on ZFS brings the advantages of customization of the filesystem (rw root) without the worries of "pulling-the-plug" solved by read-only root +MD of nanobsd.
    The upgrades/downgrades could be simple zfs receive or clone/rollbacks.


    The web interface doesn't see the zpool but sees the snapshots in root zfs.
    I suppose I have to go into some sqlite db and manually add something, since the autoimport doesn't work for active zpools.

    Any ideas on how to do this?
    ZFS Addicted

  2. #2
    Super Moderator
    Join Date
    May 2011
    Location
    Missouri, USA
    Posts
    622
    Hi HarryE,

    Sounds like a very cool project you have going on there. Be sure to let us know what you find out!

    -Will
    FreeNAS-9.1.0-ALPHA - 8 x Samsung F3 HD103SJ 7200RPM Drives
    ZFS raidz2 - Supermicro X9SCL-F - Intel i3-2100 Dual-Core 3.1Ghz
    IBM BR10i - 16GB DDR3-1333 ECC - Intel "PT" Quad-Port Gig-E NIC

  3. #3
    Junior Member
    Join Date
    May 2011
    Posts
    3

    Smile Almost there...

    Here it is:
    I used my regular FreeBSD 8.2 to create 3 partitions on a 2GB stick as described in FreeBSD's Root-on-zfs tutorial, 1 for bootstrap, one for swap, and one for zpool.
    Then I created the zpool, named it nanozfs to please the two worlds :-) . Inside I created 3 zfs filesystems named nanozfs/part1, nanozfs/cfg and nanozfs/data.
    Next I copied the content of the FreeNAS partitions from another stick into nanozfs/part1, nanozfs/cfg and nanozfs/data filesystems accordingly.
    Adjusted loader.conf, fstab, rc.conf and created a necessary fsck_zfs (as a simple exit 0). Removed /conf/default/etc/remount.
    At some point there was a "zpool set bootfs=nanozfs/part1 nanozfs" involved.
    Since then I found the necessary tables to be modified in order to manually import zfs filesystems into web interface.
    In the morning I'll download a newer version of FreeNas, create a nanozfs/part2 filesystem, copy the content + tweaks into it.
    Then snaphot nanozfs/cfg, nanozfs/data just in case I want to rollback.
    A zpool set bootfs=nanozfs/part2 nanozfs will help to boot the new version.
    ZFS Addicted

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •