Tuesday Mar 17, 2009

Time-slider saves the day (or at least a lot of frustration)

As I was tidying up my Live Upgrade boot environments yesterday, I did something that I thought was terribly clever but had some pretty wicked side effects. While linking up all of my application configuration directories (firefox, mozilla, thunderbird, [g]xine, staroffice) I got blindsided by the GNOME message client: pidgin, or more specifically one of our migration assistants from GAIM to pidgin.

As a quick background, Solaris, Solaris Express Community Edition (SXCE), and OpenSolaris all have different versions of the GNOME desktop. Since some of the configuration settings are incompatible across releases the easy solution is to keep separate home directories for each version of GNOME you might use. Which is fine until you grow weary of setting your message filters for Thunderbird again or forget which Firefox has that cached password for the local recreation center that you only use once a year. Pretty quickly you come up with the idea of a common directory for all shared configuration files (dot directories, collections of pictures, video, audio, presentations, scripts).

For one boot environment you do something like
$ mkdir /export/home/me
$ for dotdir in .thunderbird .purple .mozilla .firefox .gxine .xine .staroffice .wine .staroffice\* .openoffice\* .VirtualBox .evolution bin lib misc presentations 
> do
> mv $dotdir /export/home/me
> ln -s /export/home/me/$dotdir   $dotdir
> done
And for the other GNOME home directories you do something like
$ for dotdir in .thunderbird .purple .mozilla .firefox .gxine .xine .staroffice .wine .staroffice\* .openoffice\* .VirtualBox .evolution bin lib misc presentations 
> do
> mv $dotdir ${dotdir}.old
> ln -s /export/home/me/$dotdir   $dotdir
> done
And all is well. Until......

Booted into Solaris 10 and fired up pidgin thinking I would get all of my accounts activated and the default chatrooms started. Instead I was met by this rather nasty note that I had incompatible GAIM entries and it would try to convert them for me. What it did was wipe out all of my pidgin settings. And sure enough when I look into the shared directory, .purple contained all new and quite empty configuration settings.

This is where I am hoping to get some sympathy, since we have all done things like this. But then I remembered I had started time-slider earlier in the day (from the OpenSolaris side of things).
$ time-slider-setup
And there were my .purple files from 15 minutes ago, right before the GAIM conversion tools made a mess of them.
$ cd /export/home/.zfs/snapshot
$ ls
zfs-auto-snap:daily-2009-03-16-22:47
zfs-auto-snap:daily-2009-03-17-00:00
zfs-auto-snap:frequent-2009-03-17-11:45
zfs-auto-snap:frequent-2009-03-17-12:00
zfs-auto-snap:frequent-2009-03-17-12:15
zfs-auto-snap:frequent-2009-03-17-12:30
zfs-auto-snap:hourly-2009-03-16-22:47
zfs-auto-snap:hourly-2009-03-16-23:00
zfs-auto-snap:hourly-2009-03-17-00:00
zfs-auto-snap:hourly-2009-03-17-01:00
zfs-auto-snap:hourly-2009-03-17-02:00
zfs-auto-snap:hourly-2009-03-17-03:00
zfs-auto-snap:hourly-2009-03-17-04:00
zfs-auto-snap:hourly-2009-03-17-05:00
zfs-auto-snap:hourly-2009-03-17-06:00
zfs-auto-snap:hourly-2009-03-17-07:00
zfs-auto-snap:hourly-2009-03-17-08:00
zfs-auto-snap:hourly-2009-03-17-09:00
zfs-auto-snap:hourly-2009-03-17-10:00
zfs-auto-snap:hourly-2009-03-17-11:00
zfs-auto-snap:hourly-2009-03-17-12:00
zfs-auto-snap:monthly-2009-03-16-11:38
zfs-auto-snap:weekly-2009-03-16-22:47

$ cd zfs-auto-snap:frequent-2009-03-17-12:15/me/.purple
$ rm -rf /export/home/me/.purple/\*
$ cp -r \* /export/home/me/.purple

(and this is is really really important)
$ mv $HOME/.gaim $HOME/.gaim-never-to-be-heard-from-again

Log out and back in to refresh the GNOME configuration settings and everything is as it should be. OpenSolaris time-slider is just one more reason that I'm glad that it is my daily driver.

Technocrati Tags:

Tuesday Nov 07, 2006

Updated multi-boot disk layout

It's been a while since our Getting Started article on multi-boot disk configurations. The old Solaris bootloader is long gone, in favor of the more flexible (and multiboot friendly) GRUB. ZFS is now available in both Solaris and OpenSolaris. The Branded Zones and Xen OpenSolaris projects are getting more interesting. And in making the best of a difficult situation, a laptop disk failure has given me an opportunity to re-think the original layout.

In addition to the project goals in the original article, here are some new capabilities that I would like to explore.
  • Zones - I want to build zones, and lots of them. Solaris as well as Linux zones.
  • Leverage Live Upgrade so that I can upgrade my system while winging my way across the US
  • Consolidate all of my home directories into a small but useful set
  • Be able to build OpenSolaris on a more regular basis
  • Find a more efficient way of sharing a large Open Source repository across multiple OS instances
  • Start using ZFS for more than just simple demonstrations
  • Reserve some space to play with Linux distributions such as Fedora Core and Ubuntu
  • GNOME 2.16 development builds for OpenSolaris


Before we proceed we need to make sure that the file systems will be sized properly. With only 80GB to work with, we will have to be efficient in a few places (like sharing the Software Companion, Blastwave repository, and Staroffice 8), even at the cost of a bit of complexity.

Estimated disk requirements

Component
Size
Notes
Solaris 10
Entire Software Group
4GB
The main boot environment will include Solaris 10, Staroffice 8, development tools, Software Companion, and Blastwave repository
Software Express (Nevada)
Entire Software Group
5GB
Includes space for GNOME 2.16 development
OpenSolaris Nightly Build 5GB
BFU from Nevada or nightly build from source
Solaris 10
Software Companion
2GB
Installed in Solaris 10 /opt, shared in other installations
Staroffice 8 500MB
Installed in Solaris 10 /opt, shared in other installations
Compilers 1GB
Installed in Solaris 10 /opt, shared in other installations
Blastwave Repository 1GB
Installed in Solaris 10 /opt, shared in other installations
Swap 2GB
Not really needed for Solaris, but will be shared with Linux


Taking all of this into consideration, the new disk layout looks something like this.

Partition
Size
Type
Mount Point
Notes
1
12GB
NTFS
Window XP C:
/xp
Read-only access under Linux using Linux-ntfs kernel modules
No access from Solaris
2
44GB
Solaris UFS
s0 - S10 boot environment (8GB)
s1 - swap
s3 - Nevada boot environment (6GB)
s4 - OpenSolaris boot environment (6GB)
s5 - ZFS slice 1 (2GB)
s6 - ZFS slice 2 (2GB)
s7 - /export (16GB)
Solaris swap partition is available to Linux as /dev/hda9
4
22GB
Extended
N/A

5
4GB
FAT32
Windows XP E:
/pc on Solaris (pcfs) and Linux (vfat)
Device name is /dev/hda5 in Linux and /dev/dsk/c0d0p0:1 in Solaris
6
10GB
Linux (ext3)
/
Linux root (today Fedora Core, may soon be Ubuntu as Fedora Core 5 was a major disappointment)
7
6GB
Linux (ext3)
/export
Shared home directory that can quickly be reused for CentOS 3 (for testing BrandZ things) and Ubuntu releases.


Next time, a short example of using Live Upgrade to install a new version of Solaris Express while running the Solaris 10 daily driver.

Technocrati Tags:
About

Bob Netherton is a Principal Sales Consultant for the North American Commercial Hardware group, specializing in Solaris, Virtualization and Engineered Systems. Bob is also a contributing author of Solaris 10 Virtualization Essentials.

This blog will contain information about all three, but primarily focused on topics for Solaris system administrators.

Please follow me on Twitter Facebook or send me email

Search

Archives
« April 2015
SunMonTueWedThuFriSat
   
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
  
       
Today