The HyperTrap
Alexandre Chartre's Weblog
Archives
« May 2007 »
SunMonTueWedThuFriSat
  
1
2
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
31
  
       
Today
Links
All | General | LDoms
« Previous day (May 2, 2007) | Main | Next day (May 4, 2007) »
20070503 Thursday May 03, 2007
Some virtual disks can lose label when rebinding a domain
Logical Domains (LDoms) can export a file as a virtual disk. Unfortunately there is a case where the label of such a disk can be lost. This is a known problem which is already fixed in OpenSolaris and that will be fixed in the next update of Solaris 10. But in the meantime, you will have to be careful when using a file as a virtual disk and you should use the following procedure and script to avoid any problem.

Problem

In some cases, when a file is used as a virtual disk, the label of that virtual disk can be lost when rebinding a domain (ldm bind) using that file (or a copy of that file) as a virtual disk.

For example, if a domain uses a file as a virtual disk and the Solaris system gets installed on that virtual disk (using boot net) then all will be running without any problem while the domain is not unbound. If the domain is unbound (using ldm unbind) then the label on the file used as a virtual disk might be lost the next time a domain using that file is bound (using ldm bind). In such a situation, the newly bound domain will be unable to use the system installed on the virtual disk and it will fail to boot with an error like "the file does not appear to be bootable" or it might fail to mount the root filesystem with an error like "vfs_mountroot: cannot mount root".

This problem is referenced as bug 6544963 (vdisk can lose label when rebinding domain)

Workaround

To prevent this problem, you need to use the following script fcksum. This script will check if you are in the case where the label will not be correctly validated during the next "ldm bind", and if this is the case it will change the label and its checksum so that it can be correctly validated. The script should be run on any file that has been used as a virtual disk and for which the disk label or disk partitioning has been changed. The script should be run right after the domain using the virtual disk is unbound (ldm unbind) for the first time.

For example, if file filedisk is used by a domain as a virtual disk and if the Solaris system is being installed onto that virtual disk then you should run the script after doing the first "ldm unbind" on that domain. Note that the script should be run before doing any "ldm bind' otherwise you can loose the disk label.

The syntax to run the script is: ./fcksum filedisk

Note that the script will first backup the existing label of the file in a file named label.file.day_time.

Here is the output you will get if your label is updated:

   $ ./fcksum rootdisk
   Backing up original label in label.rootdisk.070314_201917
                   Changing checksum
   0x1fe:          0xe456  =       0x6456
                   Changing dummy field
   0x1b8:          0       =       0x8000
                   Label checksum has been updated
Otherwise if the label does not need to be updated, you will get:
   $ ./fcksum rootdisk
   Backing up original label in label.rootdisk.070314_201005
                   Label checksum is okay

Dowmnload the fcksum script (use the Save Link as... option of your browser)


May 03 2007, 11:21:50 AM PDT Permalink

From Bad Trap to Hyper Trap
I am doing the yearly update of my blog :-) Hopefully I will update it more frequently now. Actually I have a lot of things to blog about and I really need to take the time to do it.

So first I am changing the name of my blog from "The Bad Trap" to "The Hyper Trap" because I am not dealing with Solaris "Bad Trap" bugs anymore, instead I am now working with the hyper traps of the new SPARC processors. Concretely this means that I have moved from the Solaris Sustaining group to the Niagara/Rock Software Engineering group and I am now part of the Logical Domains development team.

Logical Domains (LDoms) is a brand new product which has been released few days ago. This is a virtualization solution for SPARC systems which allows to create up to 32 domains on a Sun Fire T1000 or T2000 server. Each domain can then run its own operating system. The virtualization is done using a thin hypervisor layer which is directly implemented in the firmware of the system and which uses some special features of the UltraSPARC-T1 processor (aka Niagara).

With this position and job change, I also moved from France to Menlo Park in California, and I just arrived in the US four weeks ago. These first weeks were very busy to settle in but now this is starting to be quieter so more time should be available to blog.


May 03 2007, 10:01:07 AM PDT Permalink