Thursday May 14, 2009

Transferring root image of opensolaris to another disk

After so long, I got something really interesting that made me start my blogs again! :-)

 My Workstation runs opensolaris and this started as a pilot project to see whether opensolaris would serve me better than Solaris Express in my Work. So my initial installation of opensolaris had a small root partition of 20gb. It turned out that opensolaris was giving me whatever I wanted with a much better look and feel. My pilot project went live and I was permanently switching to opensolaris from SXCE. Now I got a problem, my root partition was running out of space :-(.

My manager came to my help and gave me a second hard disk with a greater storage :-). Wow, Now I had space, but I didn't want to reinstall opensolaris on second disk. Yes, I wanted to transfer my root image to the second hard disk! My Unix common sense started working and I was lost in the world of format, fdisk, dd etc etc for some time. Wait a minute, did I hear ZFS??? Yes opensolaris has zfs boot, why should I worry? Its time to scrap years of obsolete concepts! ;-).

So what I did was quick and neat!

1)Created a 50gb partition in the second disk(c9d0s0)

2)#zfs attach rpool c8d0S0 c9d0S0

Zfs started its resilvering process soon and I had my mirror ready in 15 minutes. Now  installing grub on second hard disk

3)#installgrub -m /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c9d0s0

 I didn't wan't to take chance, so I rebooted with the mirror configuration for rpool. I changed Hard disk order in BIOS and happily booted into opensolaris. I didn't want my mirror configuration any more and I had plans with that extra space in first hard disk. So I did:

4)#zpool detach rpool c8d0S0

 There it is, I have my Opensolaris root image transfered to the second hard disk and happily running! :-)

 This was pretty interesting for me to see all the stuff going on so smoothly which would have been a bit complicated, if it was not for zfs. Now I have my root image transferred to a bigger partition and I have a lot more space in root partition now!

ZFS, you rock!!! :-)

Friday Apr 13, 2007

Belenix Saved My Day!

This week I had been to Chennai to present on Solaris 10 to a group of developers and sysadmins. As a part of the program, we had to give them a handson on Solaris installation.  The installation went on fine, but the problem started when we rebooted after the install. System was unable to autodetect the refersh rates of the monitor and hence the screen went blank :-(.

 All the systems were intel 32 bit systems. Ctrl+Alt+BkSpace was also not working since X was immediately restarting. There was no way to get a console to work on. The only way was to reboot and then we logged in to try out some random xorg configuration. None worked!

 My Colleague Sundararajan had Belenix CD with him. An idea flashed through my mind: why not boot it with Belenix and see? Yes I did that and belenix happily gave me the xfce GUI. I copied the xorg.conf of belenix  to the root filesystem, rebooted the machine. There it is, JDS Desktop with all its beauty :-). Audience were really happy to see Solaris with such a nice interface :-)

If it had been not for Belenix, it would have been very difficult for me to get the JDS working. We tried different combination for refresh rates in the xorg.conf file but of no use!

Thanks a ton Belenix, You made my day!


Saturday Dec 09, 2006

BOSUG meet on 9/12/2006

We had the Bangalore Open Solaris User group meeting on SUN office bangalore yesterday! As expected we had a good crowd to start with! It was a mixed crowd with students from proffesional colleges as well as IT proffessionals. 

Yesterday's meeting was planned as an introductory session on Solaris and Open Solaris as there were many new faces on the meet! Moinak gave an introductory talk on Open solaris and its cool features. Followed by Moinak's speech, Pradhap gave a demo on how to install Solaris on to a x86 machine. A question answer session was also there where lots of interesting questions were raised.

The results of the written Quiz that we conducted in was anounced and Dr. Bish got the first prize( 1 GB Thumb drive :-) ).

It was a fantastic session and I am sure that all those who where new to Solaris would have gained something from it. We plan to continue this session with more elaborate talks on the details like SMF, Zones, ZFS, dtrace etc. I hope the next BOSUG meet would be on early January 2006. See you BOSUGians next year :-)

Sunday Dec 03, 2006

My experience with ZFS! ( Creating ZFS filesystem for /usr )

Few days back, I was playing with ZFS and got a strange idea to convert my /usr and /opt to ZFS. I created a ZFS pool and then created two filesystems:
sparkle@~# zfs list
pool 3.50G 5.31G 24.5K /pool
pool/opt 1.45G 5.31G 1.45G /pool/opt
pool/usr 2.05G 5.31G 2.05G /pool/usr

I copied the contents of /usr and /opt to ZFS filesystems and changes the mount point of these to filesystems to /usr and /opt. And I rebooted to see the system going into maintenance mode :-(. The system did not boot up because ZFS mounting was coming some wher later in the boot process and system could not find the /usr. With the help of my colleagues Moinak and Ananth (and of course Google ;-) ), we solved the issue. Here is how you can mount /usr as a ZFS file system.

1)Create the filesystem and copy the contents.
2)Set the mount point as legacy
sparkle@~# zfs set mountpoint=legacy pool/usr
3)Add an entry in the vfstab like:
pool/usr - /usr zfs - yes -

Reboot the system and Enjoy the power of ZFS :-)!

Saturday Nov 25, 2006

My First ever Weblog!

It has been an item in my to-do list for a while to start bloging!! But as always, there was a starting trouble for this action item also. At last, on a wonderful Sunday morning like this, here I am writing my first ever Weblog! :-).

To put it in plain terms, I am a Solaris Sustaining engineer in SUN working from Bangalore, India. I deal with the user land stuff like, utilities, commands, zones, SMF, install area so on and so forth. Solaris is such a wonderful operating system to work with and I really enjoy my work over here. The thrill and enthusiasm is at its peak as we are building up a large opensource community around Solaris called open solaris. I love evangelizing Solaris and spreading words about Solaris as far as it can reach! Expect many more blogs on opensolaris and my adventures on Solaris. Wish me happy bloging!




« July 2016