Friday Dec 11, 2009

Create a ZFS Storage pool on a Pen drive / USB Stick in OpenSolaris

You can do some crazy stuff with OpenSolaris and ZFS! Here is my crazy deal. Lets create a ZFS storage pool such that we have 2 Pen drives of 2 GB each and lets use it to save on big file of 3.5 GB (read store a nice DVD quality movie on two 2GB pendrives :P )


You will need two things for this:


1. Install OpenSolaris


2. Get two or more 2 GB (or of whatever size) pen drives / USB sticks (I do not have  2 pen drives with me so I will use one pen drive and one file to act like a pen drive. Process remains the same)


Step 1: Find out the device ID of your pen drive:



root@opensolaris:~# format -e
Searching for disks...done


AVAILABLE DISK SELECTIONS:
       0. c7d0 <DEFAULT cyl 3271 alt 2 hd 255 sec 63>
          /pci@0,0/pci-ide@1,1/ide@0/cmdk@0,0
       1. c9t0d0 <Generic-Flash Disk-8.07-1.87GB>
          /pci@0,0/pci8086,265c@b/storage@1/disk@0,0
Specify disk (enter its number):



In this case, the disk 0 is my hard disk, and 1 with device ID c9t0d0 is the USB stick. If I had two pen drives I would have had one more entry. However, I am going to create a new file of 2 GB under the name disk1 and use it.


Step 2: Create a new zpool on these devices. If you are using many multiple pen drives then instead of /root/disk2 use the device ID of the devices.



root@opensolaris:~# zpool create randomZpool c9t0d0 /root/disk2
root@opensolaris:~# zpool status -v
  pool: randomZpool
 state: ONLINE
 scrub: none requested
config:

    NAME           STATE     READ WRITE CKSUM
    randomZpool    ONLINE       0     0     0
      c9t0d0       ONLINE       0     0     0
      /root/disk2  ONLINE       0     0     0

errors: No known data errors

  pool: rpool
 state: ONLINE
 scrub: none requested
config:

    NAME        STATE     READ WRITE CKSUM
    rpool       ONLINE       0     0     0
      c7d0s0    ONLINE       0     0     0

errors: No known data errors



 Step 3: Create a ZFS filesystem on the storage pool



root@opensolaris:~# zfs list | grep randomZpool
randomZpool               101K  3.77G    19K  /randomZpool
randomZpool/dummy          19K  3.77G    19K  /randomZpool/dummy



Now you can see, that I have a ZFS filesystem of 3.77GB under the name randomZpool/dummy. Now let us define a mount point for the same.


Step 4: Define a mountpoint for the ZFS Filesystem.


root@opensolaris:~# zfs set mountpoint=/export/movies randomZpool/dummy
root@opensolaris:~# df -h /export/movies
Filesystem            Size  Used Avail Use% Mounted on
randomZpool/dummy     3.8G   19K  3.8G   1% /export/movies

 Now you have the backup of your 3.5 GB movie file on two pen drives :)


How you can use this small arrangement to do much bigger (and crazier) stuff is limited only by your creativity ;)


Happy hacking to all!



Sunday Dec 06, 2009

FOSS.IN 09 - Abhishek was here!

FOSS.IN 2009 was pinnacle of geekfests and it was after a long time that I saw so many open source fanatics under one roof!! Thanks to Bangalore OpenSolaris User Group (specially Sriram Narayanan and Anil Gulecha) OpenSolaris platform was successful beyond expectations in making hackers heads turn!



Sriram explaining stuff about OpenSolaris to interested participants of FOSS.IN


Everyone was so impressed with our demos based on ZFS, DTrace and Crossbow that I literally lost the count of number of times I heard phrases like "That is so cooool!" Even though we managed to keep just a table and two laptops (one was Sriram's personal laptop and the other one was mine :P ) people kept flocking to us while we demonstrated our simple hacks on OpenSolaris 2009.06.


On the last day, thanks to Joe George from Sun IEC, Bangalore, we managed to get some OpenSolaris T-Shirts and it was a riot! We had around 50 T-shirts and we had kept a condition that anyone who wants a T-Shirt would have to compete an assignment based on either ZFS, DTrace, Crossbow or Zones and we gave different sets of assignments to every participants. People were allowed to use man pages and google and it became such an interesting game that we had a long queue of people waiting for their turn to try their hands out at it.Within 5 hours all our T-Shirts were gone!


Me giving our first winner the opensolaris t-shirt


Me giving a OpenSolaris T-Shirt to our first winner


The most interesting bit happened when one of the participants (who said that he is feeling really out of place because he was very new to the world of computers) walked into our booth and asked if OpenSolaris has got something to do with solar energy. After I had a 15 mins chat, he got so interested and excited that he said even he would like to try his hand at OpenSolaris and by the end of the day, he won a T-Shirt by completing his assignment of creating a ZFS snapshot, deleting the Download folder and rolling back!


One guy trying out his assignment to win Opensolaris t-shirt while others listen to Sriram


One of the participants using my laptop to complete his assignments while others listen are taking their assignments from Sriram


Foss.in


Keynote from Philip Tellis of Yahoo! in FOSS.IN 


A few GNU skeptics who walked to us commenting on the CDDL were sent back satisfied by examples like Belenix and Nexenta. Over all, it was a great event and we learned many new lessons too! I hope hackers who drool on cool technologies will continue to fall in love with OpenSolaris!



Shining new Sun Cluster 3.2 11/09 is now available

Sun Cluster is one of the best things Solaris has! Cluster engineering group just came out with the new version of Sun Cluster 3.2 11/09 which is now available! Some of the exciting new development Solaris Cluster 3.2 11/09 has is tons of improvements in infrastructure features, some new features in Scalable services and of course better support for MySQL replication in Geographic edition. New deployment options for Oracle DB and RAC is also a feature to look out for in this release.


 Read more about it on Sun Cluster Oasis - http://blogs.sun.com/SC/entry/solaris_cluster_3_2_11


Wednesday Jul 08, 2009

OpenSolaris 2009.06 exclusive booklet in Indian Press

OpenSolaris has been a hot topic in India for quite some time now and in the month of July its going to be everywhere!! In the ongoing effort to take OpenSolaris to every hand in India, we have worked with Indian media and bundled OpenSolaris 2009.06 Live CD with 2 major IT magazines! Going even ahead of it we have created a 16 page exclusive booklet for OpenSolaris 2009.06 which has been bundled with Chip Magazine. So more than 120,000 readers in India would have a copy of something to give them a head start on OpenSolaris and a Live CD to play around with. :) A total of more than 250,000 Live Disks of OpenSolaris has hit Indian newsstands this month and I hope it would give a good push to our community in India.




Feel free to download the OpenSolaris booklet here and distribute if you want. It features new features of OpenSolaris 2009.06, Installation guide, guide to setup Web development and Java Development environment and develop an example project in each, and an interview of Glynn Foster . It also includes details on OpenSolaris communities and OSUM! Good work by the magazine team and our OpenSolaris people! I hope you enjoy reading it ;)

Tuesday Feb 24, 2009

And We are back again! With Education, Open Source, Tech Days and Joe!

Hello!! Its been more than 6 months since I made my last blog entry... Sorry for that as I was busy working with loads of stuff in Sun Clusters, OpenSolaris Marketing and in Campus Ambassador Program.. But now I am back with some interesting stuff...


Sun Tech Days happened at Hyderabad from 18th Feb to 20th Feb which was attended by many many people! Many legends including James Gosling were there for the show! Joe Hartley was there for the event on 20th Feb and I took this opportunity to catch up with him about developments on education, open source and technologies to look for! Joe gave us some insights on what the future of education might be in light of growing adoption of social networking services like OSUM and penetration of the network. With help from Vasudha who is our campus ambassador at Manipal University, we recorded this pool side talk :-) Here is the video:



It was very interesting to talk to Joe after an year of WWERC 2008 held at San Francisco where I got a chance to interview him on similar lines. Watch that video here!

Friday Jul 11, 2008

GLOSS gets the First Feel of Second Life!

On 9th of July, 450 members of GLOSS got to experience one (or I should say two) of the most amazing things of our ages! It was the OpenSolaris in Second Life!



Thanks to Terri, GLOSS got a chance to be a part of the OpenSolaris Chat in second life and we got a VIP pass! You can see the chat presentation here.. Now that we have many technical restrictions in Second Life and also that we have some network issues at SASTRA, I decided to pull all the crowd into TIFAC CORE auditorium and do a live screencast of the event, so that everyone would get to experience the chat as well as ask question. My initial expection was a crowd of just (now it sounds "just" :P) 200 students but thanks to Anand, who offered help to get it arrange for the girls in Nirman Vihar audi also. In a very short notice, we got everything arranged, and before I could realize, I was coordinating a crowd of 450 students spread across two different auditoriums (something I was doing for the first time!)


My team was present in both the auditoriums and I was coordinating everything via my cell phone! And soon the chat started! The moment everyone in the audience heard Heidi welcome, they just couldn't stop being amazed! But unfortunetly it did not last long as the experimental sound systems which was employed, crashed :-(  So the chat was moved to Text mode... And you know how we students are.. :) The moment something went wrong, no one could let the opportunity to exchange some fun go :P But once the chat caught up flow, everyone was completely into the chat! I was explaing the text line by line to all the students in the audi.. And then came the part of the question and answer. Now who could let the chance of asking question to people like Tim Cramer, Stephen Hahn, David Comay and Glynn Foster! 


All this while I was in the Nirman Vihar auditorium, and then towards the end I switched to TIFAC audi! The moment I walked in, I was welcomed with so many question!! :) It was from every area of virtual worlds and OpenSolaris. IPS was the hot topic again in the discussion! By the time, the last set of students bid me goodnight (who eventually walked with me till my room) the time was 11:30 PM! I distributed OpenSolaris wrist bands to all the participants who stayed after 10 (and unfortunely this number was also so large that I almost exausted almost all the wrist bands I had)


Because the chat was scheduled at 8:00 PM local time, most of the students who attended the chat missed out on their dinner. I must appreciate their curiosity and desire to learn new stuff! Also any thanks to Anand and team would be less for helping me out with so many stuff! We at GLOSS never miss out of taking picutres of the events, but unfortunately this time I could not manage :( 


Everyone in the Sun SL team did a great job... Check out Terri's blog for the complete transcript of the OpenSolaris chat and also Angad's blog for the pictures.

Tuesday Jul 01, 2008

OHAC talk at GLOSS

After almost a month long vacation, when college reopened, we at GLOSS could not wait to do something exciting!! And what could be more exciting than Open High Availability Clusters (OHAC). I attended a talk on OHAC by Tirthankar during my recent visit of Sun India Engineering Center at Bangalore. I was completely taken by the technology and I knew I am going to do something with it, the moment I get a chance. Anyways... the day I landed in college, I sat down to set up a one node cluster on my laptop! Million thanks to Tirthankar again, who spend almost whole of his Sunday with me over the phone helping me out in setting it up. I would be blogging how set up a one node cluster on Solaris SXDE some time very very soon.


Now about the talk! There was a decent audience of more than 40 students who came to attend the talk. I started the talk with playing the Big Bucks Bunny movie, which set up the mood of the audience and also allowed me to introduce them to Network.Com and from there pick up the topic of difference between grids and clusters.



 Then I moved to the slides and I explained the architecture of OHAC and details of its functioning. It was an engrossing session, as explaining the functioning of a cluster and concepts like Disk Fencing can get tricky :) But it was nice to see every one interacting and asking questions to me!




Then was the turn of the Demo.. something which I was very eager to show. For this demo, I had prepared a single node cluster on my laptop. I had a zone running on which we had a cluster resource name movie-rg registered. The cluster agent was basically written to start RealPlayer on cluster and in case of a failure, it would make it failover to a functioning node of the cluster. The experience of setting up the cluster and getting the agent to work was truely amazing! As I said, I would be blogging about it soon, so check back soon. Here are two screenshots which shows how cluster took care of availability


Cluster resource right now online on the zone


 Now when I reboot the zone, the cluster resource becomes online on the physical node



I will soon be doing one more follow up talk on OHAC where I would discuss how to setup clusters and write agents for OHAC! Once again... thanks to Tirthankar and Swathi for helping me out with OHAC!

Monday Jun 09, 2008

5 OpenSource Goodies to get you going!

There can be many a times when you cannot afford to spend those valuable $$$ to prove your concept or express yourself or give you the start you are looking for ;) Then where do you go?? Now that open source has become such a big thing, that I don't think I need to explicitly answer this question!! But then, identifying what application to use and where can get a bit daunting (As daunting as atleast 3 rounds of googling :-P)!! Anyways, here I would like to recommend 5 open source application which can get you rolling with your concept.... Note that, each of these projects are mature enough that they can be used for every mission critical operations and you can trust them to run your whole business.





    • Netbeans is what you should be asking for if you are looking at creating any Rich Client Application quickly! Be it Database driven applications or a stand alone tiny application, Netbeans is the best choice for you! Anytime you wish to exploit the power of Java Technology then Netbeans is your man ;) Not to forget, if you are planning to create a  nifty mobile application which you can use to adore your cell phone then look nowhere else. Many other things like Ruby, C and C++ etc. runs smoothly!




    • Productivity suites can be really expensive. But OpenOffice.org is an amazing Office application which is very feature packed and complete. And the best thing is that it comes sans price tag! Direct PDF convertion, native support to the ODF and MS Office formats and hundreds of other features very much make OpenOffice.org a-must application!




    • Sun xVM (VirtualBox) would allow you to run anything on anything! Run OpenSolaris on Windows, Windows on OpenSolaris, Windows on Linux and Linux on Windows and many such other combinations! VirtualBox OSE would allow you to test your applications on whatever platform you want. With a download less than 25 MB, you are ready to go to install any platform in your system without actually needing to buy any separate hardware for each platform.




    • Now that you have a IDE and Office plus a virtualization application in place, you would need something to run your Website. Drupal is a right choice if you are looking for a contect driven website. Written using PHP and supports both MySQL and PostgreSQL, Drupal can me made as feature rich as possible, using thousands of community contributed module!




    • XAMPP would allow you to install the comple Apache, MySQL and PHP part of the xAMPP platform. Its a simple to use and easy to download!



The beauty of all these applications are that they run on almost all popular platforms! You are free to use which ever operating system you want to run these applications. They help you get off the ground easily. Infact, if you are smart enough, you would take the extra effort to get yourself a copy of OpenSolaris, which would cost you nothing and provide you a reliable, feature full and stable development environment. And if you are considering to do a next facebook or something then check out OpenSolaris Web Stack which would give you a SAMP platform on a platter! :)


 These are some of the applications I like a lot in the OpenSource ecosystem. There are million others and almost any of your needs can be fulfilled in the OpenSource world!


Now tell me, doesn't open source deserve the title of biggest enabler of our century??? :)


Technorati Profile

About

I am Abhishek and I work for Sun/Oracle! In this blog, I share my interest in systems, solaris, linux and other technologies :-)

Search

Archives
« May 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
31
      
Today