On Sun, 27 Jan 2013, Reginald Beardsley wrote:

Several people have suggested FreeBSD for the OS for my N40L based ZFS server 
and using the internal USB socket w/ a flash drive for the OS  However, after 
trying FreeBSD 9.0 installed to an HDD, I'm not enthused about having to 
relearn FreeBSD admin. And I'm not GUI admin inclined.  I'd prefer to stick w/ 
what I'm most familiar with.

However, the idea has considerable attraction.  Has anyone done such a thing w/ 
OI?  A bunch of stuff would need to move out of rpool so that it was almost 
R/O, but I don't see any major obstacles.  I assume the LiveCD uses a memory 
filesystem for these, so I'd expect it to be pretty straight forward.

This still leaves the single point of failure for the root pool, but copies=2+ 
might give enough warning to avoid a crisis.  Creating a replacement from a 
disk image using dd would be pretty painless.

Any reports of success or failure?  I've seen rather poor USB flash 
performance, but that might be hardware specific.

I found some USB drives were slower than others and some (eg a Verbatim black "pinstripe" USB stick, for example) would not accept a UFS filesystem at all. I'm now using Intenso Rainbow Blue 4 GB flash drives on all my FreeBSD 9.0 installs on N40L servers.

USB drives used as system disks will be slow unless you put the /tmp and /var filesystems on memory filesystems (MFS). Here's what I do on my FBSD servers:

        1. boot system up normally (with or without the ZFS pool
           on the mechanical hard disks, it doesn't matter)

        2. tar up the existing /var and /tmp filesystems and save them
           somewhere on the USB filesystem, eg in /md_backups

        3. disable the automatic start-up of syslogd and devd daemons
           by editing /etc/defaults/rc.conf and making sure it has the
           following lines in it:

                devd_enable="NO"

            and

                syslogd_enable="NO"

        4. now add this to the /etc/rc.local script:

                # Create memory filesystems

                cd /
                mdmfs -s 500m md0 /tmp
                tar xzpf /md_backups/tmp.tgz
                mdmfs -s 500m md1 /var
                tar xzpf /md_backups/var.tgz

                # Start syslogd and devd daemons

                /etc/rc.d/syslogd onestart
                /etc/rc.d/devd onestart

                echo '.'
                exit 0

        (this creates two 500 MB memory filesystems /dev/md0 and /dev/md1
         and mounts them on /var and /tmp and unpacks the preserved /var
         and /tmp filesystems frm the tar.gz backups and then starts the
         devd and syslod daemons.

        5. next, to preserve the state of /var and /tmp across reboots
           add this to your /etc/rc.shutdown.local script (you might need
           to create this if it doesn't exist):

                # Insert other shutdown procedures here

                tar czf /md_backups/var.tgz /var
                tar czf /md_backups/tmp.tgz /tmp

                echo '.'
                exit 0

        6. finally, use the 'noatime' parameter in your /etc/fstab to
           prevent commiands like ls, etc from continually re-reading the
           contents of / - my /etc/fstab looks like this:

                # Device        Mountpoint      FStype  Options Dump    Pass#
                /dev/da0p2      /               ufs     rw,noatime      1       
1
                /dev/da0p3      /var            ufs     rw      2       2
                /dev/da0p4      /tmp            ufs     rw      2       2

This works a treat - the MFS is really fast and you wouldn't know the system disk was a USB drive.

By the way, I'm buying some new N36Ls cheap for my own use so will have a crack at getting OI 151a running on a USB drive.

cheers, Andy

_______________________________________________
OpenIndiana-discuss mailing list
[email protected]
http://openindiana.org/mailman/listinfo/openindiana-discuss



_______________________________________________
OpenIndiana-discuss mailing list
[email protected]
http://openindiana.org/mailman/listinfo/openindiana-discuss

Reply via email to