LDOMS and virtual disks

June 24th, 2009

Have you ever had an LDOM that failed to boot due to some erroneous configuration files in the root file system? Ever wish you could modify the root filesystem of that LDOM without having to boot the LDOM?

Well, you could take the virtual disk and re-assign it to another LDOM, and restarting the LDOM you just re-assigned it to, then access it from there.

For example:

ldm rm-vdisk bootdisk broken_ldom
ldm add-vdisk broken_bootdisk broken_ldom_bootdisk@primary-vds0 working_ldom
ldm stop working_ldom
ldm start working_ldom

Once working_ldom boots, you can run “devfsadm” to create the device links for the new disk. At which point you can mount it and fix whatever you want to fix.

But what if you didn’t have an LDOM that you could restart at this point? What if you didn’t have the resources to create a new temporary LDOM for this purpose?

There is another way but it has limitations. You will only be able to access the first partition on that virtual disk.

If the virtual disk is a zfs volume you can mount it directly as follows:
mount -o rw /dev/zvol/dsk/zpoolname/volname /mountpoint

If the virtual disk is a file, then you can use lofiadm to create a device for it:
lofiadm -a /path/to/vdisk/file
mount -o rw /dev/lofi/1 /mountpoint

I’ve only tested this on volumes that have UFS file systems on it. It may work with other file systems (even ZFS), I just haven’t tried it.

Now if anyone can figure out how to create device files for the other partitions within the volume (by mapping that device file to an offset within the file), then managing every slice in a virtual disk file or volume would be possible and greatly simplified.

-- Posted in Geeks Paradise

countdown …

July 22nd, 2008

Two days until we move. I have mixed emotions. On one hand I am excited at the prospects of moving to a new home. One that has been customized to a certain extent to our liking. One that is larger so that our two growing children will have more space to play and learn. One that is close to parks, a library, a community center, an Adventist school, shopping and many other amenities.

On the other hand, this old house is where many memories were made. This was our first home. Chris and I bought it together, moved into it together, planned our future here together. Both our children were born here. Caitlin has made many memories in this house. A part of me is sad to leave this home that has grown to be a part of us.

Being the son of a minister, I used to move from house to house a lot when I was a kid. I guess I never really got used to it. We may bring all our things, but it is inevitable that those intangible memories, although we bring them with us, makes us feel like we’ve left something behind.

It won’t be different this time around.

-- Posted in Journal

New Addition

March 19th, 2008

On March 15, 2008 at 4:58 P.M. my daughter Catherine Eeva was born. She was 5 lbs, 4.5 oz at birth. We are very grateful for this wonderful gift from God. Catherine is truly a gift from God, one we specifically asked for. Her arrival has been a “Hallelujah moment” for me.

I thank God for her, and I can only hope to do my best in training her for a life of dedicated service to the One who has entrusted her to me.

Edsel, Caitlin & Catherine

My two daugthers

-- Posted in Journal

Apple Macbook Air Parody

February 6th, 2008

I thought this was pretty cool.


-- Posted in Geeks Paradise

Air

April 3rd, 2007

There is nothing more frightening than to hear your two year old gasping for air after waking up from a nap. As usual, I arrive home from work after a long tiring day looking forward to a nice home cooked meal and a relaxing evening with my family. Caitlin was still napping, as Chris prepared dinner. Then we heard some noise coming from the bedroom, “She’s up,” Chris exclaims. “That’s not her, that’s the neighbor’s dog!” I retorted. After all, the noise I heard sounded like a barking noise. A few seconds later, I heard sobs. I quickly ran up the stairs and found her at the top of the stairs having difficulty breathing. My first thought was maybe she’s choking on something. Since her breaths were irregular and sporadic, I thought something might be blocking her airway. All those first aid classes as part of Pathfinders during my childhood quickly flashed into my mind. I proceeded to perform the Heimlich maneuver a few times. But nothing came out. That just made her cry all the more. At this point since she’s able to cry louder, she must be breathing, I concluded. She continued to gasp for air and make barking noises. A call to 911 was made, and in no time the ambulance had arrived. In the ambulance her breathing stabilized and her demeanor improved, even performing antics that made the paramedics laugh in the ambulance. At the hospital, the Doctor’s analysis was croup. A common condition in young children. Nothing to be alarmed about.

Although both Chris and I were calm during this whole ordeal, thoughts of possibly losing my 2 year old flashed in and out of my mind. Prayers were uttered.

Air is vital to survival. As a child, Caitlin already realizes this, as I saw her summon all her strength to take that next breath of air.

Prayer is the breath of our soul. Is my soul gasping for breath? Is yours?

-- Posted in Journal