pool: exportpool
state: ONLINE
status: The pool is formatted using an older on-disk format. The pool can
still be used, but some features are unavailable.
action: Upgrade the pool using 'zpool upgrade'. Once this is done, the
pool will no longer be accessible on older software versions.
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
exportpool ONLINE 0 0 0
c0t0d0s7 ONLINE 0 0 0
c0t1d0 ONLINE 0 0 0
errors: No known data errors
So, for a verbal explanation, it’s a striped pool made up of one whole disk, plus one partition on c0t0d0, which also happens to be the root disk, where there are numerous other partitions housing the ufs filesystems. Those partitions are completely unmirrored. Oh, and it’s out of date, to boot.
If either disk goes, the whole system goes. The performance for the zpool will be completely weird depending on which disk it hits. And to top it all off, they are forever entangled now. This is set in stone, unless a complete system wipe can be performed.
Good job.
It may be a day late and a dollar short, since I replaced the bad cat 5 cable that kept causing my colo’ed server to get disconnected, but it’d be a shame to let that extra interface go to waste.
May 13 14:39:54 holcasaur.us in.mpathd[25625]: [ID 832587 daemon.error] Successfully failed over from NIC bge0 to NIC bge1
May 13 14:40:20 holcasaur.us in.mpathd[25625]: [ID 620804 daemon.error] Successfully failed back to NIC bge0
So I say, go ahead, treat my cables roughly. Jiggle the connections, come what may! Let me not bother the poor support staff any longer.
It was so easy to set up I’m not even going to write about it. Just go to the docs.
Now that you’ve purchased MySQL, I’m guessing that you’ll want to include it in Solaris. I know it’s in SFW now, but the version is really old, and getting it started is an arduous process. Well not so much arduous as silly.
At any rate, the /etc/init.d script for this should disappear pronto. With smf, why would you have _anything_ in the old-style init scripts? Moreover, when migrating to smf, don’t just copy the init script as the service method. Think about it… that whole mysqld_safe thing? That’s just a special case of smf for one particular process. It’s a restarter and something to set options/privileges. So I say nix it! Here’s the (abridged) svcprop dump of my mysql manifest:
holcomb@unit3021[~]$ svcprop mysql
…
start/group astring :default
start/limit_privileges astring :default
start/privileges astring :default
start/project astring web
start/resource_pool astring :default
start/supp_groups astring :default
start/timeout_seconds count 60
start/type astring method
start/use_profile boolean false
start/user astring mysql
start/working_directory astring :default
start/exec astring /usr/sfw/sbin/mysqld &
stop/exec astring :kill -TERM
stop/project astring :default
stop/resource_pool astring :default
stop/timeout_seconds count 60
stop/type astring method
stop/working_directory astring :default
refresh/exec astring :kill -HUP
refresh/project astring :default
refresh/resource_pool astring :default
refresh/timeout_seconds count 120
refresh/type astring method
refresh/working_directory astring :default
tm_common_name/C ustring Mysql database server
…
As you can see it sets the user to “mysql” (and project web) and just runs mysqld & (all options are in the my.cnf – though any command line options could be set by a svc method and arbitrary svcprops). I have tested killing off the daemon and svc.startd does its duty. It is still kind of rough in that you can’t specify multiple instances, the documentation isn’t there, I’m not exactly sure if kill -HUP works, etc, but is a far cry from lrc:/etc/rc3_d/S99mysql.
Yeah I suppose this isn’t all that important. I just thought that what I did was really clever and had to tell somebody. Why won’t you people leave me alone?
Check this out:
holcomb@unit3021[~]$ svcs -l abemotron
fmri svc:/site/supybot:abemotron
name Supybot
enabled true
state online
next_state none
state_time Mon Dec 31 18:01:56 2007
logfile /var/svc/log/site-supybot:abemotron.log
restarter svc:/system/svc/restarter:default
contract_id 1076
dependency require_any/none svc:/network/loopback (online)
dependency require_all/none svc:/network/service (online)
dependency require_all/none svc:/network/physical (online)
dependency require_all/none svc:/system/filesystem/local (online)
If you understand that, you’ll realize just how wrong it is.
With apologies to mentos.
So wordpress 2.3 is out now. I thought, might as well upgrade, why the fuck not. But just to be sure, I took a snapshot of the filesystems on which apache and mysql live.
First, I shut down the services…
svcadm disable -t apache2
svcadm disable -t mysql
Then took a snapshot of the data…
zfs snapshot data/apache2@pre-2.3
zfs snapshot data/mysql@pre-2.3
Performed the upgrade…
Hello.
Re-enabled the services…
svcadm enable mysql
svcadm enable apache2
Got a bunch of SQL errors… Well fuck, now what. My blog is hosed. Oh wait…
Re-disabled the services…
svcadm disable -t apache2
svcadm disable -t mysql
Roll back the snapshots…
zfs rollback data/mysql@pre-2.3
zfs rollback data/apache2@pre-2.3
Re-re-enabled the services…
svcadm enable mysql
svcadm enable apache
Viola! errr Voila! I knew those french classes would come in handy.
In my previous job, we had a few issues of zfs. These were completely outweighed by the benefits, and anyway, I knew patches would come along eventually to fix them. Looks like, at least for two problems, they’re on the way.
ZFS and NFS latency issues begone: separate ZILs, especially on NVRAM, greatly accelerate small writes.
ZFS will now be much better at aligned writes, which dbs apparently really like.
Wonder how much the NVRAM cards cost…