czwartek, 15 maj 2008

beadm

In my last post I wrote a short howto to handmade zfs rpool cloning. It takes only a few steps, but forgetting one of them may provide wrong results. But OpenSolaris has one nice tool to do it all for you:

beadm create opensolaris-2

Simply do it, and your system will be cloned, your grub will have a new entry and the new filesystem's /etc/vfstab will have it's '/' entry corrected.
Now, why not do a clone every few days, just in case you ever remove your '/etc'?

wtorek, 13 maj 2008

Playing with fire

Following losely Indiana update guidelines found here I have done a clone of my root filesystem. Then I have fooled around with it a little bit.

zfs snapshot rpool/ROOT/opensolairs@for-cloning
zfs clone rpool/ROOT/opensolaris@for-cloning rpool/ROOT/opensolaris-1
zfs set mountpoint=legacy rpool/ROOT/opensolaris-1
mount -F zfs rpool/ROOT/opensolaris-1 /mnt
vim /mnt/etc/vfstab

Here I have replaced rpool/ROOT/opensolaris with rpool/ROOT/opensolaris-1. I yet edited /rpool/boot/grub/menu.lst by copying an OpenSolaris entry and changing the bootfs rpool/ROOT/opensolaris line in the copy to bootfs rpool/ROOT/opensolaris-1. In the end I had two different entries in grub boot menu.
I then did:

rm -rf /platform/

and rebooted. In the above one line I have effectively wiped out kernel and boot_archive. It came as no surprise, that grub complained that it couldn't boot my old system. Oh well, I choose the second entry, booted from the clone, promoted it with zfs promote, destroyed the old system, which became the clone now, and type to you quite happily from working OpenSolaris 2008.05.
Have a Nice day.

niedziela, 11 maj 2008

docs.sun.com

Docs at Sun.com ought to be one of the most advertised sites for OpenSolaris/Solaris. Many people I meet are not aware that it exists and after they find out, they fell in love with it. Just as I did.

piątek, 9 maj 2008

ZFS snapshots

I started to like them. I became accustomed to create a snapshot of my filesystems periodically, just as I click Save button in Editors. Really nice feature, which makes my life easier. Undelete is almost obsolete. :)
For interested:


-bash-3.2# cat /usr/bin/zfs_snapshot.sh
#!/bin/sh

zfs snapshot -r rpool@`date +%Y-%m-%d:-:%H:%M`



-bash-3.2# time zfs_snapshot.sh

real 0m1.257s
user 0m0.014s
sys 0m0.023s

-bash-3.2# zfs list
NAME USED AVAIL REFER MOUNTPOINT
rpool 21,2G 67,9G 56,5K /rpool
rpool/ROOT 5,94G 67,9G 18K /rpool/ROOT
rpool/ROOT/opensolaris-1 5,94G 67,9G 5,28G legacy
rpool/ROOT/opensolaris-1@2008-05-09:-:22:59 0 - 5,28G -
rpool/ROOT/opensolaris-1/opt 673M 67,9G 673M /opt
rpool/ROOT/opensolaris-1/opt@2008-05-09:-:22:59 0 - 673M -
rpool/export 15,2G 67,9G 19K /export
rpool/export/home 15,2G 67,9G 15,2G /export/home
rpool/export/home@2008-05-09:-:22:59 70,5K - 15,2G -

środa, 7 maj 2008

OpenSolaris RC2a -> 2008.05 upgrade

I did the upgrade yesterday. Went like this:

  • pkg refresh --full

  • pkg image-update -v

  • reboot


It did a clone of original ROOT filesystem (took a second or two; compare this to creating second LU environment!), upgraded the clone and added an entry to grub menu. After I booted the upgraded ROOT and decided that it's simply working, I destroyed a previous ROOT fs. I also noticed, that the update process did a snapshot of a new ROOT. My, is it fun or what? :)
On the other note, additional pkg repositories:

  • SunFreeware repo: http://pkg.sunfreeware.com:9000

  • Blastwave has one: http://blastwave.network.com:10000



Not a long list. :) Hopefully, will get longer and the original repository will get more contributors.

sobota, 3 maj 2008

Indiana

I was going to reinstall my laptop with new Ubuntu for My Better Half and with new SXCE for myself. But since I did a full backup anyway, I decided to boldly go where I have never gone before and installed the lastest release candidate for OpenSolaris Developer Preview also known as Indiana. I've never been a supporter of so called "bridging the gap" or whatever, as I always felt that Solaris doesn't need to become more Linux users friendly to get new users. After installing Indiana I have to say that I'm at least partially converted. While there are some bugs in Gnome (please, please, please, fix the damn Polish keyboard layout guys! I've begged already!), so far it's smooth and nice. VirtualBox 1.6 installs out of the box. New packaging system with the new GUI (Hi, migi!) simply rox. The ZFS root is also very nice feature. What I really, really miss now is this Polish keyboard mapping. If you chose pl during install, you get the typist's mapping which in Poland is quite obsolete. Everyone I know and their Granma are using Polish programmer's layout AND not the one with switched chars { and [ and their counterparts.

poniedziałek, 28 kwiecień 2008

Stable API/ABI

I was once a believer. I believed in Linus and his wisdom. When Linus said that stable API/ABI is a bullshit, I believed. And then I become a sysadmin. Since then my point of view has changed. I not only dislike the constant amorphism of Linux' API/ABI, but I really started to love the ability to simply load a binary driver compiled for kernel eight years ago into the newest kernel and simply run it.
Take for example VMWare Server. Every time I had to upgrade Linux distribution, I had to hack VMWare's kernel module, because it failed to load, due to changes in Linux's module API. Not to mention that it had to be compiled for every new version of kernel. I could live with that.
But why, when I can take the module and if its written accordingly to operating system's vendor manual, it simply loads. The end of it. A binary, compiled module. Really. No pain.
I know. For someone coming from Linux side of things it sounds weird and unrealistic, but there are really some people that are used to it. And Linux admins may feel that they need to defend the Linux way and once I felt like it too. But when I switched my servers to Solaris and got a taste of this ABI/API staility, among other niceties, I got used to it too. And I got to love it.