- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: List of common mistakes
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2010 11:27 AM
10-25-2010 11:27 AM
Is there a list on common mistakes to be avoided while performing system admin tasks on HP-UX ?
Thanks,
Manoj
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2010 11:52 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2010 06:39 PM
10-25-2010 06:39 PM
Re: List of common mistakes
you may be so experienced, still you can make typo. Recheck each command before you run it.
verify thrice , before you use -R
Never do the changes in which you have doubt!!
More important: Never deviate from the process defined by your firm. They will forgive you for manual errors but not for deviating from the process..
Regards,
Sooraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2010 08:00 PM
10-25-2010 08:00 PM
Re: List of common mistakes
>> tar does not ask anything it just replace.
2. never use * with rm commands in any way.
3. don be too fast in doing things take your time.
BR,
Kapil+
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2010 08:23 PM
10-25-2010 08:23 PM
Re: List of common mistakes
Using SAM reduces the complexity of most administration tasks. SAM minimizes or eliminates the need for detailed knowledge of many administration commands, thus saving valuable time. Use SAM whenever possible, especially when first mastering a task. Some tasks cannot be done by SAM, in which case you will need to use the HP-UX commands. Sometimes you will need to use commands manually for troubleshooting and specialized tasks However, SAM is the tool of choice for most administration work.
Even elephants do slip...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2010 11:05 PM
10-25-2010 11:05 PM
Re: List of common mistakes
1. While performing any activity, record everything using "script" command to have details of each and every step/output and/or increase the buffer size of the window depending on the situation. This will help troubleshoot the problem if anything goes wrong in the activity.
2. Sometimes, we as root will be working on a terminal and will use previous command keys (ctrl+k) to immediately execute the last command. But if someone else is also logged in as root, he may be running some other commands. So we would, by mistake run the last command (issued by another user). Bottomline, if you are using "ctrl+k" key for using previous commands, have a look on them before executing.
Regds..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2010 11:22 PM
10-25-2010 11:22 PM
Re: List of common mistakes
Yes, all can avoid common mistakes while doing system admin tasks.
1) We should more attention to work while running any command.
2)While rebooting or shutdown the server check the hostname and IP address to verify ur working on correct system.
3)While flushing the mount points also we should assure that we are on correct system before u do that.
4)While taking clone also u should be careful.
5)While remove directory dont use * unless ur confident to do that.
6)While chmod/chown check ur on correct directory where u want to change otherwise u will land in trouble.
Experience is the BEST Teacher, U should learn from ur mistakes, not to repeat it.
Hope ur query resolved.
Don't forget to assign points
Regards
Vishnu Khandare
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2010 12:12 AM
10-26-2010 12:12 AM
Re: List of common mistakes
UX has no trash can, so what you delete is deleted.
V.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2010 01:36 AM
10-26-2010 01:36 AM
Re: List of common mistakes
Of course I am now writing about systems that have multiple people with kernel-level access.
(even the concept of the need to login as root makes me a little sick. Other OSes have facilities to grant enhanced rights to selected individuals. THAT makes tracing much easier, and responsibilities much clearer).
Proost.
Have one on me.
jpe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2010 01:58 AM
10-26-2010 01:58 AM
Re: List of common mistakes
A few from me here..
(a) Always refer syslog for any error related to system before start looking in to the issue.
(b) Prepare an Action Plan ,Roll back Plan and Identify the Risks involved and Plan to Mitigate the risks before doing any major change.
(c) Always capture the below o/p before reboot the box.
bdf
swapinfo -tam
strings /etc/lvmtab
grep initdefault /etc/inittab
(d) Do changes one at a time during trobleshooting
(e) Update latest patches (double stared ones) ,qualerly and update HW firmwares yearly.
Thanks for initiating a this thread,this is a good experience sharing thread.
With Regards,
Aneesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2010 03:56 AM
10-26-2010 03:56 AM
Re: List of common mistakes
sometimes due the nature of your network a misconfigured /etc/nsswitch.conf can give you many timeouts.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2010 06:58 AM
10-26-2010 06:58 AM
Re: List of common mistakes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2010 09:48 AM
10-26-2010 09:48 AM
Re: List of common mistakes
i'm using cfg2html once a month for all server, and archive the output.
So that i could see any changes.
best regards,
butti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2010 09:59 AM
10-26-2010 09:59 AM
Re: List of common mistakes
If inexperienced read up on the subject. I regularly peruse through the forums and if I see something of use or interest I copy the information into a document or bookmark the page. I spent a lot of time just reading threads here and pdf documents provided by HP as well as using google.
Create a regular user with permission to su to root. Only su when doing tasks that require root access. With SAM and SMH you can give regular users special permissions to use those utilities. (For example look up restricted SAM)
On that note configure and tweak as necessary your sudoers file. Use visudo to edit. Create a root users group and groupadd your user profile to this group.
It's helpful to set your PS1 to know which server you are logged into. We have this set in /etc/profile:
PS1="$LOGNAME"@`hostname`:'$PWD'"> "
export PS1
Before doing any work create a maintenance log. I use excel to list out the tasks I am going to do in descending order with additional columns for start and end time. In other words have a plan of action.
Make sure you have some backup method in place before doing any major system work like patches, volume group work, etc.
Be very careful with the rm command. Be very careful with vgexport command as well.
Schedule your maintenance for off hours. Be aware you are creating additional IO with each patch install, lvextend, etc. If possible test the commands and actions on a non-prod server.
Read the patch requirements. Some patches require a system reboot, others do not. A lot of patches have dependencies.
As suggested above create a script so you can review work that was done. For example everytime I had to extend a lvol, add a disk, etc. I'd create a script in /tmp. (script /tmp/scriptname) It was especially helpful to review. Name your script something useful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2010 03:53 PM
10-26-2010 03:53 PM
Re: List of common mistakes
Which one is dangerous and never be used and why ?
cd /home/sun/moon/mercury/
#/home/sun/moon/mercury/> rm -rf ../*
#/home/sun/moon/mercury/> rm -rf ../*.*
#/home/sun/moon/mercury/> rm -rf *
Thanks,
Manoj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2010 04:59 PM
10-26-2010 04:59 PM
Re: List of common mistakes
#/home/sun/moon/mercury/> rm -rf ../*
Delete all the file and dirs under moon directory.
#/home/sun/moon/mercury/> rm -rf ../*.*
Delete the files and dirs which have a dot symbol and under moon directory.
#/home/sun/moon/mercury/> rm -rf *
Delete all the files and dirs under mercury directory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2010 05:33 PM
10-26-2010 05:33 PM
Re: List of common mistakes
1)Like RK mentioned in second part, same type of problem happens while copy paste the commands using mouse on PUTTY session.
The left button selected words get copied in buffer and at any time if you press the left button it pasted on the screen.So be alert while selecting the words/commands using mouse on PUTTY terminal.
2)Read the man page to avoid confusing options with commands.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2010 11:25 PM
10-26-2010 11:25 PM
Re: List of common mistakes
Always keep a backup of the file u edit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2010 12:16 AM
10-27-2010 12:16 AM
Re: List of common mistakes
> Delete the files and dirs which have a dot symbol and under moon directory.
This answer indicates you didn't understand the danger of this command.
Remember that every directory has two special sub-directory entries: "." and "..".
This command will delete /home/sun/moon/*.*, which includes:
/home/sun/moon/.. = /home/sun/
/home/sun/moon/../.. = /home
/home/sun/moon/../../.. = /
And when "rm -rf" deletes a directory, it will also delete all files and sub-directories in it...
In other words, this command will delete *EVERY FILE AND DIRECTORY ON THE SYSTEM*.
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2010 01:49 AM
10-27-2010 01:49 AM
Re: List of common mistakes
When changing the root password, kindly make sure the passwd is working/changed properly by taking a separate session before logging out the session.
This practice will be keep us tension free on root passwd issues.
Regards,
Nirmal G
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2010 03:16 AM
10-27-2010 03:16 AM
Re: List of common mistakes
This is going to fail because is is going to try deleting the current directory mercury.
>MK: Remember that every directory has two special sub-directory entries: "." and "..".
>This command will delete /home/sun/moon/*.*, which includes:
/home/sun/moon/.. = /home/sun/
/home/sun/moon/../.. = /home
/home/sun/moon/../../.. = /
Huh?
>And when "rm -rf" deletes a directory, it will also delete all files and sub-directories in it.
Yes, in it, but not the recursively to all ancestors.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2010 05:46 AM
10-27-2010 05:46 AM
Re: List of common mistakes
I issued the following command in lab server;
# hostname monster
and forgotten it , somebody call me that GUI manager application sayas no more OR valid license and logon with telnet and found my mistake:
# hostname
monster
I corrected it
# hotname
my problem I created solved
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2010 09:45 AM
10-27-2010 09:45 AM
Re: List of common mistakes
>This is going to fail because is is going to try deleting the current directory mercury.
By Unix conventions, a directory is just a file (although a special type of one).
A file can be deleted while it's still open: if that's done, the file will keep existing (but it will be unreachable using any filename) as long as it's held open. As soon it's closed, it will be deleted for real.
This is true for all files, including directories.
----------
>> #/home/sun/moon/mercury/> rm -rf ../*.*
>> [...will lead to total destruction]
> Huh?
> [...] but not the recursively to all ancestors.
After a bit of thinking, I see you're correct. It will delete ../.. = /home/sun/moon, but not farther than that.
Consider me humbled, and my "rm -rf" paranoia brought back to sensible (but still sensibly paranoid) levels :)
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2010 10:51 AM
10-27-2010 10:51 AM
Re: List of common mistakes
#/home/sun/moon/mercury/> rm -rf ../*
I agree with MK. It delete current dir (mercury) also.
And,
#/home/sun/moon/mercury/> rm -rf ../*.*
Delete the files and dirs which have a dot symbol and under moon directory.(My prev post)
But it can't delete the hidden files in moon dir(which starts with a dot, like ".abc"
Also rm -rf * cannot delete the dot(.) and double dots(..) which are indicating current dir and parent dir.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2010 12:00 PM
10-27-2010 12:00 PM
Re: List of common mistakes
The most common mistake seen here in the forums is first doing anything as root even if you are absolutely not sure what you are doing (e.g. disk replacements in complex LVM structures), then ask how to solve the self-created serious problem.
PEBKAC.
Better first ask, read, confirm, then do.
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!
