Thursday, July 27, 2017

In search of new life …

People had lot of happiness in their life but they don’t know when it came in their life. They only realising after loosing it.
When I read this sentence, my mind forced me to think seriously on this statement. Objective of life is to be happy. If we have lot of happiness around us and if we are aware of it, is really serious thing.
We are searching happiness in very big way. Lot of time, really don’t know whether that will make us happy. Still we are giving our precious years , days and night sand finally after getting it; we found that it was just

basic need of life or does not worth what we paid for it. Where is happiness then ?
To become stable in life ,we need good home , a four wheeler and steady income for meeting our daily needs. We also want to have good education for our childern , admission in good school. We also want steady flow of money for on-going needs. Obviously it is not so easy to achieve all easily. After globalization, world become smaller. We can now daily login to server located at other end of the earth. We can talk anywhere in this world within few seconds. Techonolgy made it possible. Oppertunities are open and hence much wider choice for become happy.
Unfortunately this lighter side of the picture. Dark side is really black. We don’t have time to spend with our loved once. Our eating habit are totally changed. We are no more regular in life. Stress are always with us like shadow. We are exposed to all deceases exists on this world. And list is endless ……

What is solution for this ? Or solution exists or not ?

I believe solution is really simple.

1. Be realastics. Don’t waste your time unrealistic goals.
2. Find happiness in daily life’s small things. This is key to happiness..
3. Make environment around happy.
4. Whatever you are doing , do it happily.
5. Follow your heart. We have lot of time to do everything but unfortunately don’t have time to hear voice of heart. Find some time to listen what is your heart is saying.
6. Identify things that makes you happy. It is not difficult. You know what makes you happy try spend most of things there.
7. Find the place to open your heart. Some time you want to speak something but unfotunatly nobody is hear you. Put some efforts build some relations around you.

This is not complete list but it is really helpful.


Part 1.. to be Continue….

Wednesday, May 6, 2009

The Changing World- Azim Premji

While change and uncertainty have always been a part of life, what has been shocking over the last year has been both the quantum and suddenness of change.

For many people who were cruising along on placid waters, the wind was knocked out of their sails. The entire logic of doing business was turned on its head. Not only business, but also every aspect of human life has been impacted by the change. What lies ahead is even more dynamic and uncertain. I would like to use this opportunity to share with you some of our own guiding principles of staying afloat in a changing world. This is based on our experience in Wipro. I hope you find them useful.

First, be alert for the first signs of change. Change descends on everyone equally; it is just that some realize it faster. Some changes are sudden but many others are gradual. While sudden changes get attention because they are dramatic, it is the gradual changes that are ignored till it is too late. You must have all heard of story of the frog in boiling water. If the temperature of the water is suddenly increased, the frog realizes it and jumps out of the water. But if the temperature is very slowly increased, one degree at a time, the frog does not realize it till it boils to death. You must develop your own early warning system which warns you of changes and calls your attention to it. In case of change being forewarned is being forearmed.

Second, anticipate change even when things are going right. Most people wait for something to go wrong before they think of change. It is like going to the doctor for a check up only when you are seriously sick or thinking of maintaining your vehicle only when it breaks down. The biggest enemy of future success is past success. When you succeed, you feel that you must be doing something right for it to happen. But when the parameters for success change, doing the same things may or may not continue to lead to success. Guard against complacency all the time. Complacency makes you blind to the early signals from the environment that something is going wrong.

Third, always look at the opportunities that change represents. Managing change has a lot to go with our own attitude towards it. It is the proverbial half-full or half empty glass approach. For every problem that change represents, there is an opportunity lurking in disguise somewhere. It is up to you to spot it before someone else does

Fourth, do not allow routines to become chains. For many of us the routine we have got accustomed to obstructs change. Routines represent our own zones of comfort. There is a sense of predictability about them. They have structured our time and even our thought in a certain way. While routines are useful, do not let them enslave you. Deliberately break out of them from time to time

Fifth, realize that fear of the unknown is natural. With change comes a feeling of insecurity. Many people believe that brave people are not afflicted by this malady. The truth is different. Every one feels the fear of unknown. Courage is not the absence of fear but the ability to manage fear without getting paralyzed. Feel the fear, but move on regardless.

Sixth, keep renewing yourself. This prepares you to anticipate change and be ready for it when it comes. Constantly ask yourself what new skills and competencies will be needed. Begin working on them before it becomes necessary and you will have a natural advantage. The greatest benefit of your education lies not only in what you have learnt, but in working how to learn. Formal education is the beginning of the journey of learning. Yet I do meet youngsters who feel that they have already learnt all there is to learn. You have to constantly learn about people and how to interact effectively with them. In the world of tomorrow, only those individuals and organizations will succeed who have mastered the art of rapid and on-going learning.

Seventh, surround yourself with people who are open to change. If you are always in the company of cynics, you will soon find yourself becoming like them. A cynic knows all the reasons why something cannot be done. Instead, spend time with people who have a "can-do" approach. Choose your advisors and mentors correctly. Pessimism is contagious, but then so is enthusiasm. In fact, reasonable optimism can be an amazing force multiplier.

Eighth, play to win. I have said this many times in the past. Playing to win is not the same as cutting corners. When you play to win, you stretch yourself to your maximum and use all your potential. It also helps you to concentrate your energy on what you can influence instead of getting bogged down with the worry of what you cannot change. Do your best and leave the rest.

Ninth, respect yourself. The world will reward you on your successes. Success requires no explanation and failure permits none. But you need to respect yourself enough so that your self-confidence remains intact whether you succeed or fail. If you succeed 90 per cent of the time, you are doing fine. If you are succeeding all the time, you should ask yourself if you are taking enough risks. If you do not take enough risks, you may also be losing out on many opportunities. Think through but take the plunge. If some things do go wrong, learn from them.

I came across this interesting story some time ago: One day a farmer's donkey fell down into a well. The animal cried piteously for hours as the farmer tried to figure out what to do. Finally he decided the animal was old and the well needed to be covered up anyway it just wasn't worth it to retrieve the donkey. He invited all his neighbors to come over and help him. They all grabbed a shovel and begin to shovel dirt into the well. At first, the donkey realized what was happening and cried horribly. Then, to everyone's amazement he quieted down. A few shovel loads later, the farmer finally looked down the well and was astonished at! what he saw. With every shovel of dirt that fell on his back, the donkey was doing some thing amazing. He would shake it off and take a step up. As the farmer's neighbors continued to shovel dirt on top of the animal, he would shake it off and take a step up. Pretty soon, everyone was amazed as the donkey stepped up over the edge of the well and totted off! Life is going to shovel dirt on you, all kinds of dirt. The trick is too not to get bogged down by it. We can get out of the deepest wells by not stopping. And by never giving up! Shake it off and take a step up!

Tenth, in spite of all the change around you, decide upon what you will never change: your core values. Take your time to decide what they are but once you do, do not compromise on them for any reason. Integrity is one such value. These have contributed to our success, including our parents and others from our society. All of us have a responsibility to utilize our potential for making our nation a better place for others, who may not be as well endowed as us, or as fortunate in having the opportunities that we have got. Let us do our bit, because doing one good deed can have multiple benefits not only for us but also for many others. Let me end my talk with a small story I came across some time back, which illustrates this very well.

This is a story of a poor Scottish farmer whose name was Fleming. One day, while trying to make a living for his family, he heard a cry for help coming from a nearby bog. He dropped his tools and ran to the bog. There, mired to his waist in black muck, was a terrified boy, screaming and struggling to free himself. Farmer Fleming saved the boy from what could have been a slow and terrifying death. The next day, a fancy carriage pulled up to the Scotsman's sparse surroundings. An elegantly dressed nobleman stepped out and introduced himself as the father of the boy Farmer Fleming had saved. "I want to repay you, "said the nobleman.” Yes," the farmer replied proudly. "I'll make you a deal. Let me take your son and give him a good education. If he's anything like his father, he'll grow to be a man you can be proud of." And that he did. In time, Farmer Fleming's son graduated from St. Mary's Hospital Medical School in London, and went on to become known throughout the world as the noted Sir Alexander Fleming, the discoverer of Penicillin. Years afterward, the nobleman's son was stricken with pneumonia. What saved him? Penicillin. This is not the end. The nobleman's son also made a great contribution to society. For the nobleman was none other than Lord Randolph Churchill, and his son's name was Winston Churchill. Let us use all our talent, competence and energy for creating peace and happiness for the nation."

Reference:

http://www.managementparadise.com/forums/articles/2371-how-manage-change-speach-azim-premji-chairman-wipro-technologies.html

http://www.greencrosssociety.com/azim_prenji_speech.html

Friday, April 24, 2009

Oracle Export Backup Shell script

#!/bin/sh

# Name : Oracle Export Backup
# Writer : Mahendra Rajgude
# Date : 23 Oct 2007
# Version : 0.1
# Pupose : This script is written to take oracle export backup


# Exporting environmental variable. This will specific to server.

HOSTNAME=`hostname`
ORACLE_SID=ngs
ORAWEB_ADMIN=/u01/app/oracle/admin
ORAWEB_BASE=/u01/app/oracle
ORAWEB_HOME=/u01/app/oracle/products/9.2.0
ORACLE_BASE=/u01/app/oracle
ORACLE_TERM=vt100
ORACLE_HOME=/u01/app/oracle/products/9.2.0
ORACLE_PATH=/u01/app/oracle/products/9.2.0/rdbms/admin:/u01/app/oracle/products/9.2.0/sqlplus/admin:/u01/app/oracle/common/sql
BACKUP_DIR=/oraclebackup

export ORACLE_SID ORAWEB_ADMIN ORAWEB_BASE ORAWEB_HOME ORACLE_BASE ORACLE_TERM ORACLE_HOME ORACLE_PATH BACKUP_DIR HOSTNAME

# Export DATE format to add extention to backup file.

DATE=`date '+%d'`

#echo Logfile{$DATE}

# Remove any previous backup file

rm ${BACKUP_DIR}/${HOSTNAME}_full.dmp.${DATE}.gz

# Actual backup starts here

${ORACLE_HOME}/bin/exp system/manager full=y file=${BACKUP_DIR}/${HOSTNAME}_full.dmp.${DATE} statistics=none log=${BACKUP_DIR}/${HOSTNAME}_full.log.${DATE} buffer=2048000 compress=y consistent=y


# Compression done here to reduce the size of backup


/usr/bin/gzip ${BACKUP_DIR}/${HOSTNAME}_full.dmp.${DATE}

# Removing uncompressed file..

rm ${BACKUP_DIR}/${HOSTNAME}_full.dmp.${DATE}

#####################################################################################################
#####################################################################################################


# Change History

# V 1.0 Dated 23 Oct 2007 checked working fine.

Tuesday, March 17, 2009

How to Stay Young n Happy Always :-)

1. Throw out nonessential numbers. This includes age, weight, and height. Let the doctors worry about them.. That is why you pay them.

2. Keep only cheerful friends. The grouches pull you down. (Keep this in mind if you are one of those grouches!)

3. Keep learning: Learn more about the computer, crafts, gardening, whatever. Never let the brain get idle. 'An idle mind is the devil's workshop.' And the devil's name is Alzheimer's!

4. Enjoy the simple things

5. Laugh often, long and loud. Laugh until you gasp for breath. And if you have a friend who makes you laugh, spend lots and lots of time with him or her!

6. The tears happen: Endure, grieve, and move on. The only person who is with us our entire life, is ourself. LIVE while you are alive.

7 Surround yourself with what you love: Whether it's family, pets, keepsakes, music, plants, hobbies, whatever. Your home is your refuge.

8. Cherish your health: If it is good, preserve it. If it is unstable, improve it. If it is beyond what you can improve, get help.

9. Don't take guilt trips. Take a trip to the mall, even to a foreign country, but NOT to where the guilt is.

10. Tell the people you love that you love them, at every opportunity.

But do share this with someone

Know love, know LIFE...

" "No love, no LIFE...

" Love that heart, that hurts u.. But never hurt ,that heart that loves u..

Never Change your Originality – For the sake of others, because no one can play your role better than you …"So be your self


(Thanks to my TechMahindra friend for this article. )

Monday, February 9, 2009

Things to do on a money free Weekend

Things to do on a money free Weekend... (Taken from tachmate website of TechM)


1. Teach yourself how to change the oil in your car / bike. If you’re due for an oil change, just bring the oil you need home with you and teach yourself how to do it. All you really need is an old pan to catch the wasted oil and a funnel to pour the old oil back into the canisters for later disposal. Just use your car / bike manual as a guide for the procedure and you might just find that not only is it a lot easier than you thought, but it’s a useful skill to have and it’s cheaper than taking your car into Jiffy-Lube (or wherever you take your car for oil changes).

2. Meet your neighbors. Make an effort to introduce yourself to your neighbors if you don’t know them well. Invite any interesting ones over for a cup of coffee and a chat, just to get to know each other better. Your neighbors can not only become friends, but can also be a valuable resource - a friendly pair of eyes on your property when you’re away or a helpful set of hands when you’re trying to complete a challenging task.

3. Have a “cupboard potluck.” Go through your cupboards and find any items that might have slipped to the back over time. Invite some friends to do the same, then get together for a potluck dinner prepared from only these ingredients and whatever else you have on hand. It makes for a “free” meal and a lot of fun for everyone involved.

4. Organize a walking tour. Find out about the interesting historical and cultural sites in your town, then go on a walking tour of it. Pack a lunch in your backpack and have a picnic on the village green or in the park. You can easily turn this into a full day if you live in a compelling area.

5. Take some digital photographs. Take your digital camera out with you and take pictures of anything you find interesting. Take lots of them, then go home later and see if you’ve taken anything beautiful and compelling. Great images can make for the basics of homemade greeting cards (yep, keep going downwards for more on this), nice desktop wallpaper, screensavers, or many other interesting uses.

6. Start a blog on a topic that interests you. You can get a free blog at Wordpress or Blogger. Join the service and start a blog on a topic that interests you. Not only can it be a ton of fun, it also helps you improve your communication skills, reach out to others, and perhaps earn a bit of income as well.

7. Learn the basics of a new topic. Just go to MIT’s OpenCourseWare, find a topic you’re interested in, download a bunch of mp3s of lectures on the topic, and listen to them while you’re doing household chores. Some great suggested starting points: microeconomics, macroeconomics, basics of philosophy, western philosophy, and introductory physics. Another great option: fire up iTunes, then click on the “iTunes U” option on the left hand side. You’ll find tons of material there to teach you the basics of countless topics.

8. Cook some meals in advance. If you already have a bunch of basic food staples on hand, spend some time cooking some meals in advance to store in the freezer. It’s easy to prepare casseroles, soups, pasta meals, and many other items all at once, then store them in portion-sized containers in the freezer for eating later. Not only is this way cheaper than eating out or buying convenience foods, it’s also healthier and also far more social. Missing some ingredients but have an abundance of others? Team up with friends and make it a social event - share ingredients so that you can all take some casseroles or other dishes home for the freezer.

9. Build a basic net worth calculator for yourself. One great way to ensure that you’re consistently making financial progress is to build your own net worth calculator. Once you have it set up, updating it is easy, and it can provide a great snapshot of your financial situation as well as show off your progress.

10. Make a how-to video for YouTube. Share your knowledge! All you need is a digital camera that captures video and (optionally) some video editing software. Just create a video to demonstrate how to accomplish something interesting and useful. Start off by making a script to follow, then turn on the camera and follow it. When you’re done, upload it to YouTube and let others enjoy it. If it’s useful and entertaining, people will come.

11. Do a “bill reduction.” Spend a few hours trimming your monthly bills. Find ways to reduce your regular bills. Ask for credit card rate reductions. Think about what monthly bills you can completely eliminate, then do the footwork to get rid of them. This might be a boring task now, but if you can trim $50 from your monthly bills for free, your future self will be very happy.

12. Play football / soccer. All you need is a ball, some open space, and some friends. Designate whatever is available as goals, then kick the ball around. Don’t worry about being terrible at the game - as long as everyone’s just having fun, it really doesn’t matter how bad you are.

13. Scan your old pictures. If you have a digital scanner laying around somewhere, bust it out and scan in the piles of old prints you have laying around. If you have a screensaver of pictures, scanning in old prints and adding them to the rotation will make your screensaver all the more amazing. Plus, it becomes easy to just attach them to emails and send them to friends and family.

14. Have a film festival. Invite some friends over and have them each bring one of their favorite DVDs. Then just settle in with some snacks (whatever you have on hand) and burn a lazy afternoon and evening just watching movies together. It’s a ton of fun and it doesn’t cost anything at all.

15. Practice yoga - or try it for the first time. All you need is some floor space and a blanket to do most yoga poses. Try out a basic yoga session to see if you like it. It increases flexibility, improves concentration, and holding some of those positions for long periods can be a powerful workout.

16. Read an entertaining book. Look around your house for a fun book to read, perhaps something loaned to you by a friend or something you received as a gift, and curl up and let yourself be sucked into the story. I’m a sucker for Stephen King novels - I can just pick up any one and quickly be sucked straight into the plot for a fun afternoon’s read.

17. Call a family member or a friend you haven’t spoken to in a while. Not only does it provide you a chance to catch up and firm up a relationship with another person who is important to you, it can also be a very entertaining and enjoyable way to spend an hour or two.

18. Learn a foreign language. Doubt this can be free? There are a lot of ways to learn a foreign language online, from podcasts that teach language skills to YouTube videos and many other free language learning opportunities. Search around for resources for any language that you might want to learn - you’ll find tons of materials to help you.

19. Dig up your family tree. Take a peek at genealogy.com and see what you can find out about your ancestors. Try to assemble a family tree, and see if you can link to any distant cousins or long-lost family members. Doing this can give you a much clearer picture of your heritage and help you get in touch with your family roots.

20. Go on a wandering walk. Just head out your front door and go in whichever direction looks the most interesting. As long as you have some basic navigational skills, you won’t get lost, and you can turn around or backtrack whenever you get bored or hit a dead end. Along the way, who knows what kind of interesting stuff you might find?

21. Help out an elderly or disabled friend or neighbor. There’s always a person or two in your life that could use a helping hand, but often are too proud to ask. One great way to bridge this gap is to just stop in and visit and pay attention - if they need something, you’ll usually find out. Then just volunteer to do it and get started on the task. Quite often, you’ll find that it’s the simple things that really help - reaching something on a high shelf or managing a simple household task. And that little effort can make all the difference. Few things can make you feel more fulfilled than helping someone you care about in their moment of need.

22. Start a book club - or find one to join. If you like reading and know other friends that enjoy it, too, consider starting a book club with them where you all read the same book for a week then meet to talk about it. It can transform reading from a solitary activity into a more socially oriented one, and with a library at your disposal, it can be a free activity as well.

23. Have an “entertainment swap” with a friend. This one’s pretty easy. Just have a friend bring over a pile of their own DVDs, CDs, books, video games, etc. that they own that they think you’d like. When they get there, have a big temporary swap - swap them an item for an item. This not only will refresh your media collection for a while, but can provide a great opportunity for you to talk about your interests with a friend.

24. Do some amateur stargazing. Go outside on a clear evening, preferably away from city lights, and look up at the sky. Use some handy star maps to know what you’re looking at. Spread out some blankets on the ground, lay flat on your back, stare upwards, and realize how magnificent the universe is around you.

25. Go on a hike or a long walk. Go to the local hiking or walking trails and just take off. Let yourself get absorbed into nature and simply enjoy the journey. Go at your own speed - this is for your own personal enjoyment, after all.

26. Take a stab at writing poetry (or other forms of creative writing). The basics of poetry are easier than you might think - just try writing down what’s on your mind. Whatever you’re thinking about, just write it down. That can provide the basics of any poem. Then, just read through the stuff you’ve written down, choose the words that seem beautiful to you, and assemble them until the whole work means something. This can be a deeply enlightening and personal experience, actually, and one that really stirs the creative juices.

27. Go on a bike ride. If you’ve got a bicycle and a helmet in your garage or closet, you already have everything you need for some good exercise and some good fun. Head outside and bike away. Almost every town and every state park around here has an extensive array of bike trails, so you can almost always find somewhere new and interesting to ride, plus it’ll help get you into shape really quick.

Wednesday, November 26, 2008

Best Wishes for First Wedding Anniversary

Marriages are made in Heaven



"Remember that a successful marriage depends on two things: finding the right person and being the right person" quote.

Do we really know the actual definition of a successful marriage? If not than lets look for it and see what conclusion we can draw. We often say that someone somewhere is made for you and the day you come across that person you feel that that he or she is the one you have been waiting for. But later we see that due to lack of understanding and mental compatibility they move apart. So how can we say that they were the perfect match since they didn't gave any effort to understand each other. So it's important you know your partner. There are people who get physically attracted and fall for each other and eventually end up getting married. But later on when they see their wavelength not matching they easily get separated without a second thought. In today's generation we see these incidents more compare to earlier generation. And this is more due to the changing social scenario. With so many things to divert your attention you really don't know what to do.

Marriage is not just coming together of two individuals. There is much more to it. To sustain a marriage it is important that there is effort from both sides than only a marriage can carry on. A successful marriage is like a good recipe whose main ingredients are love, commitment, understanding, concern and togetherness. If you can include these aspects in your married life you can find happiness in your marriage. Andre Maurois once aptly said, "A happy marriage is a long conversation which always seems too short." which is so true. When we talk about mental compatibility between husband and wife we have seen that not only incase of arrange marriage this problem exist where both of them were unknown to each other before marriage but even after many years of courtship in love marriages this problem exist because when we meet before marriage we are at our best to impress the other person. And we start accepting each other the way we like to see each other. But gradually after marriage when we slip into our natural self that time we have to accept each other as we are. And in most of the cases the real self is not what we wanted to see and then begins the contradiction with the person whom we have loved and with whom I have to spend my life. So it's important that when you love a person love him or her the way he or she is and not the way you want him or her to be. Then only you can be happy. A happy married life calls for constant commitment and concern for each other. There are few small and minute aspects, which we tend to forget in our married life, as we get busy with the daily chores. So at times it is important to indulge in those minute details of a married life, which will constantly remind each other of the love and concern being present. We can conclude by the quote of Barnett Brickner, which says it, all that "Success in marriage does not come merely through finding the right mate, but through being the right mate."

First wedding anniversary is very important. It is one of evaluation point for life. Before marriage, we were sleeping under parents wings. After marriage, even though their blessings are there, our real life journey starts. We need to do lot of compromises against our wish. But still finding real happiness among it , is the real art. By Indian tradition, a woman has more responsibility in a family so it is applicable to you. I am sure; you will fulfill all the expectations of your family.



Have a Bright and Happy Day!

Happy anniversary to you both;
Have a bright and happy day.
Your marriage sets an example;
It shines in every way.

Time passes, and your bond is strong;
It lasts through sun and storm;
You’ll always have your love
To keep each other warm.



By Joanna Fuchs

Tuesday, October 14, 2008

Who is poor ? ( Good short story )

One day, the father of a very wealthy family took his son on a trip to the country with the express purpose of showing him how poor people live.

They spent a couple of days and nights on the farm of what would be considered a very poor family.

On their return from their trip, the father asked his son, 'How was the
trip?'

'It was great, Dad.'

'Did you see how poor people live?' the father asked.

'Oh yeah,' said the son.
'So, tell me, what did you learn from the trip?' asked the father

The son answered:
I saw that we have one dog and they had four.

We have a pool that reaches to the middle of our garden and they have a creek that has no end.

We have imported lanterns in our garden and they have the stars at night.

Our patio reaches to the front yard and they have the whole horizon.

We have a small piece of land to live on and they have fields that go beyond our sight.

We have servants who serve us, but they serve others.

We buy our food, but they grow theirs.

We have walls around our property to protect us, they have friends to protect them.'

The boy's father was speechless.

Then his son added, 'Thanks Dad for showing me how poor we are.'

Isn't perspective a wonderful thing?

Makes you wonder what would happen if we all gave thanks for everything we have, instead of worrying about what we don't have.

Appreciate every single thing you have, especially your friends!

'Life is too short and friends are too few.'


(I got this story on the mail . Published here for to get benefit to other. )

Wednesday, October 8, 2008

How to do root mirroring with SVM ?

This document explains how to do root mirroring using SVM.


Setup : root disk is dev/rdsk/c0t0d0
To be mirrored on dev/rdsk/c011d0

Create sama partition on both drive


1. prtvtoc /dev/rdsk/c0t0d0s2 > oldparttable

2. fmthard –s oldparttable /dev/rdsk/c0t11d0s2

Format all partion to be mirrored on. In this case

newfs /dev/rdsk/c0t11d0s0
newfs /dev/rdsk/c0t11d0s1
newfs /dev/rdsk/c0t11d0s3
newfs /dev/rdsk/c0t11d0s4
newfs /dev/rdsk/c0t11d0s5
newfs /dev/rdsk/c0t11d0s6
newfs /dev/rdsk/c0t11d0s7

Create replica databse.

metadb -a -c 3 -f c0t0d0s7 c0t11d0s7

Check meta database

bash-3.00# metadb
flags first blk block count
a u 16 8192 /dev/dsk/c0t0d0s7
a u 8208 8192 /dev/dsk/c0t0d0s7
a u 16400 8192 /dev/dsk/c0t0d0s7
a u 16 8192 /dev/dsk/c0t11d0s7
a u 8208 8192 /dev/dsk/c0t11d0s7
a u 16400 8192 /dev/dsk/c0t11d0s7


Create one way partition:


metainit -f d11 1 1 c0t0d0s0
metattach d10 -m d11
metainit d10 -m d11
metaroot d10

more /etc/vfstab

Create same for /var partition

metainit -f d21 1 1 c0t0d0s4
metainit d22 1 1 c0t11d0s4
metattach d20 -m d21

Check status

metastat -p

cp vfstab vfstab.bak
vi vfstab

more /etc/system

Check boot path

eeprom


boot-device=/pci@1f,4000/scsi@3/disk@0,0:a /pci@1f,4000/scsi@3/disk@b,0:a disk net


Note down boot slice path as follows:

bash-3.00# ls -al /dev/dsk/c0t0d0s0

lrwxrwxrwx 1 root root 41 Sep 15 00:26 /dev/dsk/c0t0d0s0 -> ../../devices/pci@1f,4000/scsi@3/sd@0,0:a

bash-3.00# ls -al /dev/dsk/c0t11d0s0

lrwxrwxrwx 1 root root 41 Sep 15 00:26 /dev/dsk/c0t11d0s0 -> ../../devices/pci@1f,4000/scsi@3/sd@b,0:a

Record the string that follows the /devices directory

i.e /pci@1f,4000/scsi@3/sd@b,0:a

ok> nvalias backup_root /pci@1f,4000/scsi@3/disk@b,0

ok> setenv boot-device disk backup-root net


/pci@1f,4000/scsi@3/sd@b,0:a


nvunalias backup_root /pci@1f,4000/scsi@3/sd@b,0:a ===> This is not working even though it is per SUn DOcument. ....

ok devalias
backup_root /pci@1f,4000/scsi@3/sd@b,0:a
disk5 /pci@1f,4000/scsi@3/disk@c,0
disk4 /pci@1f,4000/scsi@3/disk@b,0
disk3 /pci@1f,4000/scsi@3/disk@a,0
disk2 /pci@1f,4000/scsi@3/disk@9,0
disk1 /pci@1f,4000/scsi@3/disk@8,0
disk0 /pci@1f,4000/scsi@3/disk@0,0
disk /pci@1f,4000/scsi@3/disk@0,0
scsi /pci@1f,4000/scsi@3
cdrom /pci@1f,4000/scsi@3/disk@6,0:f
tape /pci@1f,4000/scsi@3/tape@4,0
pcia /pci@1f,2000
pcib /pci@1f,4000
pci0 /pci@1f,4000
flash /pci@1f,4000/ebus@1/flashprom@10,0
nvram /pci@1f,4000/ebus@1/eeprom@14,0
parallel /pci@1f,4000/ebus@1/ecpp@14,3043bc
net /pci@1f,4000/network@1,1
ebus /pci@1f,4000/ebus@1
i2c /pci@1f,4000/ebus@1/SUNW,envctrltwo
floppy /pci@1f,4000/ebus@1/fdthree
tty /pci@1f,4000/ebus@1/se@14,400000


ok> boot disk4


And this works for me. Hope you will make this working.

Monday, October 6, 2008

Mastani


Mastani was one of the most beautiful women in the history of India. It is said that Mastani was the daughter of the heroic king Maharaha Chhatrasal of Bundelkhand , through his Muslim mistress. Rana Chhatrasal was an exceptional prince in Indian history who took inspiration from Chhatrapati Shivaji of establishing independent kingdoms. Through 1727 and 1728, Mohammad Khan Bangash the Mughal, with an army of Afghans invaded Chattrasal’s kingdom, took Jaitpur and imprisoned him and his family within the Mughal camp. The eighty year old Chattrasal sent a distress message to Bajirao , who was on a military campaign in the vicinity, about his plight, in a poetic languange drawing a parallel with Gajendra Moksha Akhyan, a from Hindu mythology. Bajirao was the Peshwa of the Maratha kingdom. Bajirao and his mighty Maratha army helped Chhatrasal and his Bundela Rajput forces to retake Jaitpur. The old Bundela king re-entered his capital in full state, amidst the welcoming cheers of the citizens and the boom of the victorious Maratha cannons. In gratitude and as a token of his deep affection for Bajirao, whom he treated like a son-in-law, Chattrasal gave his young and beautiful daughter Mastani along with a third of his kingdom, including Jhansi, Sagar and Kalpi to Bajirao in May 1729. Chhatrasal's sons treated Bajirao as a blood-brother and later fought alongside him in many of his future campaigns. Bajirao was all of 31 years old. Mastani was the love of the young Peshwa's life and stayed devotedly by his side until his death. She resided with him at his Shaniwar Wada at Pune and rode stirrup to stirrup with him on his numerous military campaigns. Historical texts mention "People would gather on the road to see their brave king Bajirao and his beautiful mistress, Mastani." Mastani probably inspired the Peshwa Bajirao to succeed brilliantly, putting up one of the greatest contributions in building the Maratha Empire in North India and gaining total control over Mughals. She was his inspiration in battle, she bore him a valiant son and when Bajirao died, she fearlessly chose to perish in the flames of his funeral pyre. Their son, named Shamsher Bahadur , fought bravely in the Third Battle of Panipat in 1761 against Ahmed Shah Abdali , and died of serious wounds in Bharatpur after the Maratha forces lost the battle. The daughter of a Rajput father, Mastani was a skilled horse-rider, and accompanied Bajirao on all his campaigns. This often meant riding hundreds of miles over rugged country, living in camps under canvas and sharing his rough fare. She was said to be as good as any soldier in horsemanship, spear throwing and swordplay. She also had a talent for dancing and singing and Bajirao was infatuated with her. On one occasion the Peshwa went so far as to forget protocol and took her with him to Satara , when he went to pay his respects to his Shahu . This apparently drew an indignant reprimand from the Maratha monarch. The Brahmins of Pune, who had a strong influence on the Hindu rulers, could never accept Mastani as Bajirao's wife. She became the center point in Pune politics when Bajirao openly declared Mastani as his wife and their son a Brahmin. The couple faced severe resistance from Bajirao's mother, Radhabai, his wife Kashibai, his beloved brother Chimnaji Appa and the entire Brahmin community. The brahmins refused to carry out the sacred Upanayanam of Shamsher Bahadur. Later Bajirao had to take Mastani out of Shaniwar Wada. He built a separate residence for her at Kothrud, which was quite away from Kasbe Pune in those days. Separation was unfortunately inevitable. Bajirao never really recovered from this setback, and finally died of a flash fever in an army camp at Khargon, near Indore close to the banks of the Narmada , pining for Mastani. Bajirao's wife Kashibai, his brother Chimnaji and his son Balaji, came to Khargon and with them came Mastani. Bajirao's mortal remains were consigned to flames on 28th April 1740, at Raverkhed on the Narmada. At the cremation ceremony, Mastani suddenly broke through the crowd and walked into the flames. Before the stunned family could react or prevent her, the beautiful Mastani was gone. Had Bajirao's family supported the great warrior and the orthodox Brahmins accepted Mastani as a wife of Bajirao, Indian history may have gone differently. The stories of Bajirao-Mastani are amongst the few love stories in the world, between bravery and beauty.

Mastani was staying at Pabal , 70 km from Pune and had samadhi there.

Wednesday, September 24, 2008

Use of /etc/mail/aliases

We will see how to use /etc/mail/aliases efefctively ?

First find domainname of the server.

# domainname
xyz.com

Now in this case domainname of the server is xyz.com.

1. Forwarding mail to mail account rather than user. Add following lines in /etc/mail/aliases

user1: user.surname@domainname.com

Now you can send mail to user1@xyz.com and mail will distributed to user.surname@domainname.com

2. If no users are in To: field then ignore it. Add following lines in /etc/mail/aliases

undisclosed-recipients: /dev/null

3. Add following lines in /etc/mail/aliases for support

support: support@domainname.com

4. Forwarding mails to group of people

4.1 Create group called wishlist and add in /etc/mail/aliases

wishlist: :include:/admin/etc/wishlist.mail

4.2 Create file whose content looks like

# more /admin/etc/wishlist.mail

user1@domainname.com
user2@domainname.com
user3@domainname.com

Now you can send mail to wishlist@xyz.com and mail will distributed to user1@domainname.com, user2@domainname.com ,user3@domainname.com

Now you can send mails and you will receive it on new mail id. If you use effectviely your administration and support will much easier.

Script for Oracle export backup

Lot of time we need to have export backup of Oracle. Follwoing script will help to take export backup. You need to just change variable of your environment.I assumed that username password id system/manager

----------------------------------------------------------------------------------
#!/bin/sh

# Name : Oracle Export Backup
# Writer : Mahendra Rajgude
# Date : 23 Oct 2007
# Version : 0.1
# Pupose : This script is written to take oracle export backup


# Exporting environmental variable. This will specific to server.

HOSTNAME=`hostname`
ORACLE_SID=ngs
ORAWEB_ADMIN=/u01/app/oracle/admin
ORAWEB_BASE=/u01/app/oracle
ORAWEB_HOME=/u01/app/oracle/products/9.2.0
ORACLE_BASE=/u01/app/oracle
ORACLE_TERM=vt100
ORACLE_HOME=/u01/app/oracle/products/9.2.0
ORACLE_PATH=/u01/app/oracle/products/9.2.0/rdbms/admin:/u01/app/oracle/products/9.2.0/sqlplus/admin:/u01/app/oracle/common/sql
BACKUP_DIR=/oraclebackup

export ORACLE_SID ORAWEB_ADMIN ORAWEB_BASE ORAWEB_HOME ORACLE_BASE ORACLE_TERM ORACLE_HOME ORACLE_PATH BACKUP_DIR HOSTNAME

# Export DATE format to add extention to backup file.

DATE=`date '+%d'`

#echo Logfile{$DATE}

# Remove any previous backup file

rm ${BACKUP_DIR}/${HOSTNAME}_full.dmp.${DATE}.gz

# Actual backup starts here

${ORACLE_HOME}/bin/exp system/manager full=y file=${BACKUP_DIR}/${HOSTNAME}_full.dmp.${DATE} statistics=none log=${BACKUP_DIR}/${HOSTNAME}_full.log.${DATE} buffer=2048000 compress=y consistent=y


# Compression done here to reduce the size of backup


/usr/bin/gzip ${BACKUP_DIR}/${HOSTNAME}_full.dmp.${DATE}

# Removing uncompressed file..

rm ${BACKUP_DIR}/${HOSTNAME}_full.dmp.${DATE}

#####################################################################################

# Change History

# V 1.0 Dated 23 Oct 2007 checked working fine.

Monday, September 22, 2008

Good quotes about Heart



















If GOD wants to speak to you, he will speak to through your heart. Heart then tries to tell you. You should listen to your heart if wants GOD's message for you. Mahendra Rajgude



A memory is a photograph taken by the heart
to make a special moment last forever....Unknown.

Let your heart guide you. It whispers,
so listen closely....Land Before Time.

You may hold my hand for a while,
but you hold my heart forever....Unknown.

As the ocean is never full of water,
so is the heart never full of love....Unknown.

What the heart gives away is never gone...
It is kept in the hearts of others....Robin St. John.

Love is blind only to the eyes.
The heart sees everything clearly....Unknown.

A person's actions depict the heart,
not the words they say....Brian Lee.

To get a woman's heart a man must first use his own....Unknown.

Sometimes we make love with our eyes. Sometimes we
love with our hands...Sometimes with our bodies.
Always we make love with our hearts....Unknown.

It is not the size of a man but the size of
his heart that matters....Evander Holyfield.

Follow your heart, but be quiet for a while
first. Ask questions, then feel the answer.
Learn to trust your heart....Unknown.

Precious gifts of friendship...knowing the heart of
another, sharing one's heart with another....Unknown
.

Never close your lips to those whom
you have opened your heart....Unknown.

It is only with the heart that one
can see rightly; what is essential is
invisible to the eye....Antoine De Saint-Exupery.

For it was not into my ear you whispered
but into my heart, it was not my lips
you kissed, but my soul....Judy Garland.

The best and most beautiful things in this
world cannot be seen or even heard, but must
be felt with the heart....Helen Keller.


A friend is one to whom one can pour out all the
contents of one's heart, chaff and grain together,
knowing that the gentlest of hands will take and
sift it, keeping what is worth keeping, and, with the
breath of kindness, blow the rest away....Arabian Proverb.

If you find it in your heart to care for somebody
else, you will have succeeded....Maya Angelou.

t is the heart that makes a man rich.
He is rich according to what he is,
not according to what he has....Henry Ward Beecher.

Great is the human who has not lost his childlike heart....Mencius.

Find the seed at the bottom of your heart
and bring forth a flower....Shigenori Kameoka.

Everyone should carefully observe which way
his heart draws him, and then choose that
way with all his strength....Hasidic Saying.

The heart already knows
What the mind can only dream of.
Trust your heart....Unknown.

You can admire a woman for her beauty, but you
can only respect a woman for her heart....Unknown.


Friendship is like a rainbow between two hearts....Unknown.

Follow your mind and be smart,
follow your heart and be happy....Unknown.

Wednesday, September 17, 2008

How to set password-less ssh login ?

















( The image above is from Rohit Sharma's stock photography website http://opticverse.com. Thanks to Rohit for allowing me to publish.)

It is important to note that, since the SSH protocol is a highly secure one, it does not accept just the traditonal .rhosts on the users login for accepting a remote connection without password verification.

The implementation of SSH1 and SS2 are slightly diferent, and from OpenSSH to SSH2 vary too. Since most of the Linux machines are running OpenSSH2, we will describe here how to make the "trick" for avoiding a password everytime when running openssh2 on both client and server.
For detailed information about the class of key verification and encription that ssh uses, see the ssh and related man pages or online documentation at http://www.openssh.com/manual.html

The basic idea is, however, that in the cryptosystem that ssh uses (RSA or/and DSA) the encription and decription are done using diferent keys
Basically, what the user (client) needs is to generate a public/private key pair. The server will know the public key, but only the client will know the private key.
When the client connects to the server, it tells its own public key. If this key is allowed (if it is between the know public keys list on the server), the server will send a randomic number to the client. This encripted number can only be decripted if the appropiate decription key is used, and this decription key is the client's private one. The client then uses then its own private key and decript the number. If this is done correctly, the server will grant the acces with no more questions. As you can see the system is safe, because the client never tells anybody about its private key; and this key cannot be inferred using the public one.

What must be done, then , is to generate a public/private key pair, and copy the public part into the appropiate place on the server side.
For doing this, on the user's home directory, on the client machine, type

local> ssh-keygen -t dsa -f .ssh/id_dsa

-t tells the type of encription
-f tells where to store the public/private key pairs. In this case, the .ssh directory on home is being used

A password will be asked; leave this part blank, just pressing
Now, go the .ssh directory, and you will find two new files: id_dsa and id_dsa.pub. The last one is the public part. Now, copy the public key to the server machine

local> cd .ssh
local> scp id_dsa.pub user@remote:~/.ssh/id_dsa.pub

Of course, this time you will need to enter the password.
Now, login into the server machine and go to the .ssh directory on the server side

local> ssh user@remote
remote> cd .ssh

Now, add the client's public key to the know public keys on the server

remote> cat id_dsa.pub >> authorized_keys2
remote> chmod 640 authorized_keys2
remote> rm id_dsa.pub
remote> exit

and that's all.

Next time you log into the remote server, no password will be asked.

Note that this sytem will work while none of the machines change its IP address and for the specific user, so it is still safe.

-------------------------------------------------------------------------------------

sala:~$ ssh-keygen -t dsa -f .ssh/id_dsa
Generating public/private dsa key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in .ssh/id_dsa.
Your public key has been saved in .ssh/id_dsa.pub.
The key fingerprint is:
26:10:4b:b5:ae:c0:89:5f:d5:d1:ce:e9:5c:49:a3:63 rajgudm@sala
sala:~$ cd .ssh
sala:~/.ssh$ ls
id_dsa id_dsa.pub known_hosts


nandi:~/.ssh$ cat id_dsa.pub >> authorized_keys2
nandi:~/.ssh$ chmod 640 authorized_keys2
nandi:~/.ssh$ rm id_dsa.pub
nandi:~/.ssh$ exit
logout
Connection to nandi closed.
sala:~/.ssh$ hostname
sala

And just check if it is working ... It should work ...

sala:~/.ssh$ ssh nandi

Otherwise now find the reason for not working. Nothing fully readymade in this world. :)

Sunday, September 14, 2008

How to recover root password of Sun Server ?

















Step−by−Step Procedure



If the system is not halted, then halt the system by pressing Stop−A. This will bring you to the OK prompt.

Place the installation CD−ROM in the CD−ROM drive. Boot the system to single user mode using the CD−ROM drive.

Type : boot cdrom −s ======> If you are booting from -ROM
Type : boot net -s ======> If you are booting from Network Jump Start Server.

( For u need to server configure. That procedure is not included here)


It may take awhile, but you will automatically be logged in as root in single user mode running the OS from the CD−ROM.

1. If you had to force halt the system, by pressing Stop−A for instance, then the partitions on the hard disk will not be marked as being shutdown cleanly. If this happens, run fsck on the root partition. It is used to check and repair the file system. In this case it won't ask for the root password as it is in single
user mode. Type: fsck −y /dev/dsk/c0t3d0s0

2. Now c0t3d0s0 is just the root partition in this example. Verify your boot disk.

4. Remove root's password using your editor and edit /a/etc/shadow. Find root's entry in the file and make the second field null. Colons are the field delimeters. So your entry, after changes, should look something like:

root::10565::::::

Various fields will be used if certain parameters have been set for the OS.

5. Boot to single user mode using the hard disk.

Type: reboot −− −s

Note: That is, reboot space hyphen hyphen space hyphen s.

6.You can log in as root without a password and set root's password using the passwd command.

7. Exit single user mode and let the system continue booting to multi−user mode.

Wednesday, September 10, 2008

How extend soft partition?

Objective :

1. To extend soft partition by keeping data intact.
2. To extend meta partition by keeping data intact

Audience :
Audience of the document should be well aware of Solaris commands. They should have proper knowledge of SVM concept and commands. I am assuming that the users are aware of impact of the commands and for safer side , I recommends to take backup before starting exercise.

Setup :

1. Slice used to meta database c0t0d0s7 and size is 100 Mb
2. c0t0d0s7 is 2.7 GB
3. c0t9d0s0 10 Gb

Steps :

1. Create database

bash-3.00# metadb -f -a -c 3 c0t0d0s7
bash-3.00# metadb
flags first blk block count
a u 16 8192 /dev/dsk/c0t0d0s7
a u 8208 8192 /dev/dsk/c0t0d0s7
a u 16400 8192 /dev/dsk/c0t0d0s7

2. Create meta device d10

bash-3.00# metainit d10 1 1 c0t0d0s4

d10: Concat/Stripe is setup
bash-3.00# metastat
d10: Concat/Stripe
Size: 3986352 blocks (1.9 GB)
Stripe 0:
Device Start Block Dbase Reloc
c0t0d0s4 0 No Yes

Device Relocation Information:
Device Reloc Device ID
c0t0d0 Yes id1,sd@SFUJITSU_MAG3182L_SUN18G_01585615____

3. Create new soft partition

bash-3.00# metainit d31 -p d10 1g
d31: Soft Partition is setup
bash-3.00# metastat
d31: Soft Partition
Device: d10
State: Okay
Size: 2097152 blocks (1.0 GB)
Extent Start Block Block count
0 32 2097152

d10: Concat/Stripe
Size: 3986352 blocks (1.9 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c0t0d0s4 0 No Okay Yes

Device Relocation Information:
Device Reloc Device ID
c0t0d0 Yes id1,sd@SFUJITSU_MAG3182L_SUN18G_01585615____

4. Format the newly created soft partition and mount it

# newfs /dev/md/dsk/d31

newfs: construct a new file system /dev/md/rdsk/d31: (y/n)? yes
Warning: 4400 sector(s) in last cylinder unallocated
/dev/md/rdsk/d31: 2097152 sectors in 446 cylinders of 19 tracks, 248 secto
rs
1024.0MB in 28 cyl groups (16 c/g, 36.81MB/g, 17664 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 75680, 151328, 226976, 302624, 378272, 453920, 529568, 605216, 680864,
1361696, 1437344, 1512992, 1588640, 1664288, 1739936, 1815584, 1891232,
1966880, 2042528

bash-3.00# mkdir /test1
bash-3.00# mount /dev/md/dsk/d32 /test1

bash-3.00# df –h /test
Filesystem size used avail capacity Mounted on
/dev/md/dsk/d31 963M 1.0M 904M 1% /test

5. Addition of more space in d10

bash-3.00# metattach d10 c0t9d0s0
d10: component is attached

bash-3.00# metastat
d32: Soft Partition
Device: d10
State: Okay
Size: 1024000 blocks (500 MB)
Extent Start Block Block count
0 2097216 1024000

d10: Concat/Stripe
Size: 39533680 blocks (18 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c0t0d0s4 0 No Okay Yes
Stripe 1:
Device Start Block Dbase State Reloc Hot Spare
c0t9d0s0 5080 No Okay Yes

d31: Soft Partition
Device: d10
State: Okay
Size: 2097152 blocks (1.0 GB)
Extent Start Block Block count
0 32 2097152

Device Relocation Information:
Device Reloc Device ID
c0t0d0 Yes id1,sd@SFUJITSU_MAG3182L_SUN18G_01585615____
c0t9d0 Yes id1,sd@x002037fffebcf385


6. Copy some data make partition full so that we can test it late for extension.

bash-3.00# df -h /test
Filesystem size used avail capacity Mounted on
/dev/md/dsk/d31 963M 960M 0K 100% /test


7. Add 2 Gb space in partition d31

bash-3.00# metattach d31 2g
d31: Soft Partition has been grown

bash-3.00# df -h /test
Filesystem size used avail capacity Mounted on
/dev/md/dsk/d31 963M 960M 0K 100% /test

( Please note partition size is still not grown.)

8. Now final step that will make partition grow without destroying data.

bash-3.00# growfs -M /test /dev/md/rdsk/d31
Warning: 3776 sector(s) in last cylinder unallocated
/dev/md/rdsk/d31: 6291456 sectors in 1336 cylinders of 19 tracks, 248 sectors
3072.0MB in 84 cyl groups (16 c/g, 36.81MB/g, 17664 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 75680, 151328, 226976, 302624, 378272, 453920, 529568, 605216, 680864,
5581600, 5657248, 5732896, 5808544, 5884192, 5959840, 6035488, 6111136,
6186784, 6262432

bash-3.00# df -h
Filesystem size used avail capacity Mounted on

/dev/md/dsk/d31 2.8G 962M 1.8G 34% /test

That’s it.

Wednesday, September 3, 2008

Animal Sketches

On one fine Saturday while in UK around Aug 2008 , I was very bored. I took pen ,paper and started drawing animal faces. In the first attempt , I think I made it. It is definately not best but surely not bad also.



Life and relationship


“Life is all about hit & misses".


The same is true for relationships. Some time it works out, Sometimes not.
It hurts & hurts terribly when expectations are belied, when emotions are trampled & you feel ignored & cheated.
The only way to make a relationship work is determination to ensure it works. However Fear of getting hurt can put you off the relationship.
I need a relationship in which I don’t have to keep explaining myself. I'm searching for that relationship in which I can enjoy freedom of trust.
I need a relationship in which I won’t be held up against myself. I have my strengths & I have my weaknesses.
The search is for that one relationship in which my lesser side wont be provoked & instigated constantly.
I want someone who will always relate to my better side.
I want a relationship in which my positives will always be brought to the fore.
I need a relationship in which my today is not viewed with the mistakes I made yesterday.
I need a relationship where tomorrow’s misery isn’t already confirmed, for the mistake i've made today.
As a human I'm bound to err occasionally. I want someone who won’t maintain a database of my mistakes.
The search is for that one relationship where yesterday's fight doesn't intrude into today's intimacy, where yesterday's argument doesn't halt today's communication.
I need a relationship in which it isn't me who has to take initiative all the time. I need a relationship where I can afford to be transparent.
I need a relationship in which I don’t have to alter my likes & dislikes in order to gain & retain the relationship. I need a relationship in which my self image is not scratched.I need a relationship in which I'm not asked to be anyone other that who I am.. what I am. I need a relationship in which I feel completely myself.
I need that one relationship in which I feel as though I am once again in my mother's womb. A relationship in which my heart always feels... just born.

If you already have one such relationship.. please go down on your knees in gratitude, for there cannot be greater gift from life. Such a relationship is life's greatest gift.

(This article is not written by me. I like it so I posted here. Thanks to genius who written this.)

Monday, August 25, 2008

Regret ( Heart touching short story)

I entered a small room of ten by ten in the middle of the slum. An old man was sitting there. The moment he saw me, his eyes sparkled and a smile spread across his face. He stood up and taking my hand in his, said “Please welcome, my child ...“. He started asking eagerly about how I am doing and all about me.



After I became a computer engineer, I went to meet him after quite a long time. He was very old by now. Few years ago, he had taken early retirement and thought about enjoying life. Unfortunately, he got sick and spent most of his money on medical expenses. As his son was not earning anything, he was forced to spend his remaining life in a slum.



He had spent his life very lavishly while he was young. After seeing him, I bowed and touched his feet for blessings. He was so happy while blessing me.



My mind went back fifteen years when I was in first year of college. At that time, my college decided to start graduation in Electronics announcing a fee of 1500/- rupees. As my father was very poor; he could not afford even this fee. I was very sad and as a final resort; had approached the same old man for help. Even he was in a financial crisis at that time; but he helped me because of which I got admission to Electronics. Years passed, I got nice marks and life moved further and finally got good job as a computer engineer.



He was utmost happy to see me. His expressions were enough to tell what was going inside his heart. He was proud of his investment of Rs 1500. After initial chatting, I got some clue that he is in a financial problem. I tried to offer him some money but he was not ready to accept. After lot of efforts, he accepted the small amount. He said that he doesn’t need money and he will manage somehow.



After half an hour, I bade him fare well. He suggested that I come again to meet him. I was so happy that I could help the person who had helped me.



A month passed. One day, a relative of the old man called on my mobile and informed me about the bad news. The old man had committed suicide by throwing himself in front of running train because he didn’t have money to purchase medicine.



I was speechless. My help to the old man was not enough. His money had turned my life but my money could not

Friday, August 22, 2008

Simple start with ZFS

Here is very simple steps to start with zfs


1. Create ZFS filesystem wih single disk.

bash-3.00# zpool create tank c0t9d0s0
invalid vdev specification
use '-f' to override the following errors:
/dev/dsk/c0t9d0s0 contains a ufs filesystem.
/dev/dsk/c0t9d0s0 overlaps with /dev/dsk/c0t9d0s3

If you face above error just add -f option as following.

bash-3.00# zpool create -f tank c0t9d0s0

2. How see zfs details?

Following command shows details of pool fs we just created.

bash-3.00# zpool list
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
tank 16.9G 83.5K 16.9G 0% ONLINE

3. Now we need to create partitions in it. Let's create 5 Gb parttion.

bash-3.00# zfs set quota=5G tank/vol1
bash-3.00# zfs list
NAME USED AVAIL REFER MOUNTPOINT
tank 104K 16.6G 25.5K /tank
tank/vol1 24.5K 5.00G 24.5K /tank/vol1

4. How can extend it ?

Very simple. See fire following command.

bash-3.00# zfs set quota=10G tank/vol1

5. Again do zfs list see what is happended.

bash-3.00# zfs list
NAME USED AVAIL REFER MOUNTPOINT
tank 104K 16.6G 25.5K /tank
tank/vol1 24.5K 10.0G 24.5K /tank/vol1


bash-3.00# df -h
Filesystem size used avail capacity Mounted on

tank 17G 25K 17G 1% /tank
tank/vol1 13G 24K 13G 1% /tank/vol1

bash-3.00#

6. How to see statistics ?

bash-3.00# zpool iostat tank

capacity operations bandwidth
pool used avail read write read write
---------- ----- ----- ----- ----- ----- -----
tank 108K 16.9G 0 0 0 10

7. How to mount zfs partition at your desired mountpoint?

#
# zfs set mountpoint=/export/zfs tank/vol1

Effect will be shown as following if df -h command

tank/vol1 10G 24K 10G 1% /export/zfs


8. Finding zfs status


bash-3.00# zpool status
pool: tank
state: ONLINE
scrub: none requested
config:

NAME STATE READ WRITE CKSUM
tank ONLINE 0 0 0
c0t9d0s0 ONLINE 0 0 0

errors: No known data errors

=====================================================================================

For further study visit here:

1. http://www.solarisinternals.com/wiki/index.php/ZFS_Best_Practices_Guide
2. http://docs.sun.com/app/docs/doc/819-5461

Friday, August 8, 2008

How to restrict sudo -s or su ?

It is very difficult to restrict sudo -s or su -. After struggling a lot , I found way to restrict it.

I am assuming that you have sudo implementation knowledge.


The Impact of sudo on Unix System Security
1) `sudo` improves on `su` in several ways:
2) `sudo` allows you to give privileged access to only some commands, instead of all commands.
3) `sudo` allows you to log all commands (and their arguments) executed as the privileged user.
4) `sudo` does not require the administrator to share the root password.
5) `sudo` allows you to limit the users who can use it by editing the sudoers file.
6) `sudo` times out after 5 minutes (by default).

Tips:

1. How to restrict sudo -s
If username is user1 then add following configuration in sudoers file

user1 ALL=(root) NOPASSWD:/usr/sbin/a*,(root)NOPASSWD:/usr/sbin/[c-r]*,(root) NOPASSWD:/usr/sbin/[t-z]*,(root) NOPASSWD:/usr/bin/a*,(root) NOPASSWD:/usr/bin/[c-r]*,(root) NOPASSWD:/usr/bin/[tuwxyz]*,(root) NOPASSWD:/bin/a*,(root) NOPASSWD:/bin/[c-r]*,(root) NOPASSWD:/bin/[tuvwxyz]*

Above file

1) Restrict any command in /usr/sbin , /bin and /bin/bin who alphabet starts from b,v,s ( i.e bash,vi,sudo and su etc )
2) It will not ask for password

2) How to log the usage ?

Add following line to sudoers files.

Defaults logfile=/var/adm/sudolog