Archive for General Linux
Veritas volume Manager Recovery
Introduction
Veritas Volume Manager (VxVM) has become the standard Logical Volume Manager (LVM) in many enterprises for its robust feature set, its ability to run on multiple operating systems (e.g., HP-UX, Linux, Solaris, Windows), and the numerous scalability, availability, and recoverability features that come with the base product. The recoverability features help to ensure that data is protected when hardware platforms fail and to ease the process required to restore systems to an operational state.
This article will provide an introduction to two important and often overlooked recovery features: failure notifications and configuration database backups. The article will also provide two disaster-recovery case studies to show how these recovery features can be used to aide in recovering from disasters when they strike. A basic knowledge of Veritas Volume Manager will be assumed. If you are new to Veritas Volume Manager, consult the vxintro(1m) man page for an introduction to terminology and basic usage.
» Continue reading “Veritas volume Manager Recovery”
Veritas Volume Manager (VxVM) has become the standard Logical Volume Manager (LVM) in many enterprises for its robust feature set, its ability to run on multiple operating systems (e.g., HP-UX, Linux, Solaris, Windows), and the numerous scalability, availability, and recoverability features that come with the base product. The recoverability features help to ensure that data is protected when hardware platforms fail and to ease the process required to restore systems to an operational state.
This article will provide an introduction to two important and often overlooked recovery features: failure notifications and configuration database backups. The article will also provide two disaster-recovery case studies to show how these recovery features can be used to aide in recovering from disasters when they strike. A basic knowledge of Veritas Volume Manager will be assumed. If you are new to Veritas Volume Manager, consult the vxintro(1m) man page for an introduction to terminology and basic usage.
» Continue reading “Veritas volume Manager Recovery”
Higher education needs a national computing cloud
Dear Mr. President:
My sincerest congratulations, sir, on your recent inauguration as the 44th President of these United States of America. Your victory is testament not only to the greatness of our democracy but to the transformative power of democracy itself. Along with millions of my fellow human beings worldwide, I watched with pride as you took the oath and became a living example of the impact of a single American citizen.
You said, “The world has changed, and we must change with it.” I couldn’t agree more, Mr. President, and I believe the policies of your administration will be a wellspring of innovation. I know that both you and the vice president strongly support expanding research initiatives at institutions of higher education — the heart of American innovation. For those institutions, the future is here. But, as William Gibson said, “It’s just not evenly distributed yet.”
via Higher education needs a national computing cloud |Cloud Computing | whurley | InfoWorld.
My sincerest congratulations, sir, on your recent inauguration as the 44th President of these United States of America. Your victory is testament not only to the greatness of our democracy but to the transformative power of democracy itself. Along with millions of my fellow human beings worldwide, I watched with pride as you took the oath and became a living example of the impact of a single American citizen.
You said, “The world has changed, and we must change with it.” I couldn’t agree more, Mr. President, and I believe the policies of your administration will be a wellspring of innovation. I know that both you and the vice president strongly support expanding research initiatives at institutions of higher education — the heart of American innovation. For those institutions, the future is here. But, as William Gibson said, “It’s just not evenly distributed yet.”
via Higher education needs a national computing cloud |Cloud Computing | whurley | InfoWorld.
Romanticizing cloud computing will destroy it
InfoWorld’s new cloud computing blog seeks to promote a clear-eyed definition so the sustainable cloud can form
6,480,000. That’s the number of results from a Google search for “cloud computing.”
Searching for “software as a service” returns 4,260,000. “Grid computing,” 2,840,000. “Application service provider,” 969,000. Remember those guys? We’ve been through this before.
[ Get past the hype. Find out what cloud computing really is, and what it isn't, in InfoWorld's definitive guide. ]
George Santayana said, “Those who cannot remember the past are condemned to repeat it.” I hate to break it to you, but cloud computing is not going to cure everything from datacenter sprawl to diminishing budgets.
cloud/klowd/ n. & v. n. 1 a visible mass of condensed water vapor floating in the atmosphere high above the general level of the ground.
cloud computing /klowd kompyŏŏting/ n. 1 the most ill-defined technology in history.
Linux System Tuning - Services
Disabling unneeded services
To ensure that my machines run as efficiently and securely as possible, I disable a number of services after each installation. The end result is a system that accepts ssh connections on TCP port 22, and on one or more service ports that are in use by the applications hosted on the platform. To get to this state, I go through and disable numerous services that come enabled by default. Here is the default list of services that are enabled after a CentOS 4.4 installation:$ chkconfig –l | grep on
atd 0:off 1:off 2:off 3:on 4:on 5:on 6:off messagebus 0:off 1:off 2:off 3:on 4:on 5:on 6:off smartd 0:off 1:off 2:on 3:on 4:on 5:on 6:off portmap 0:off 1:off 2:off 3:on 4:on 5:on 6:off sendmail 0:off 1:off 2:on 3:on 4:on 5:on 6:off netfs 0:off 1:off 2:off 3:on 4:on 5:on 6:off cups 0:off 1:off 2:on 3:on 4:on 5:on 6:off irqbalance 0:off 1:off 2:off 3:on 4:on 5:on 6:off rpcgssd 0:off 1:off 2:off 3:on 4:on 5:on 6:off xfs 0:off 1:off 2:on 3:on 4:on 5:on 6:off isdn 0:off 1:off 2:on 3:on 4:on 5:on 6:off autofs 0:off 1:off 2:off 3:on 4:on 5:on 6:off gpm 0:off 1:off 2:on 3:on 4:on 5:on 6:off apmd 0:off 1:off 2:on 3:on 4:on 5:on 6:off crond 0:off 1:off 2:on 3:on 4:on 5:on 6:off acpid 0:off 1:off 2:off 3:on 4:on 5:on 6:off microcode_ctl 0:off 1:off 2:on 3:on 4:on 5:on 6:off pcmcia 0:off 1:off 2:on 3:on 4:on 5:on 6:off cpuspeed 0:off 1:on 2:on 3:on 4:on 5:on 6:off xinetd 0:off 1:off 2:off 3:on 4:on 5:on 6:off rpcidmapd 0:off 1:off 2:off 3:on 4:on 5:on 6:off readahead_early 0:off 1:off 2:off 3:off 4:off 5:on 6:off readahead 0:off 1:off 2:off 3:off 4:off 5:on 6:off sshd 0:off 1:off 2:on 3:on 4:on 5:on 6:off anacron 0:off 1:off 2:on 3:on 4:on 5:on 6:off network 0:off 1:off 2:on 3:on 4:on 5:on 6:off kudzu 0:off 1:off 2:off 3:on 4:on 5:on 6:off syslog 0:off 1:off 2:on 3:on 4:on 5:on 6:off nfslock 0:off 1:off 2:off 3:on 4:on 5:on 6:off rawdevices 0:off 1:off 2:off 3:on 4:on 5:on 6:off mdmonitor 0:off 1:off 2:on 3:on 4:on 5:on 6:off haldaemon 0:off 1:off 2:off 3:on 4:on 5:on 6:off
Several of these services are required, but several others serve no purpose in my environment, and use CPU and memory resources that would be better allocated to my applications. Since I don’t use RPC services, autofs or NFS, those are the first to get disabled:
$ /sbin/chkconfig –level 0123456 portmap off
$ /sbin/chkconfig –level 0123456 nfslock off
$ /sbin/chkconfig –level 0123456 netfs off
$ /sbin/chkconfig –level 0123456 rpcgssd off
$ /sbin/chkconfig –level 0123456 rpcidmapd off
$ /sbin/chkconfig –level 0123456 autofs off
I also don’t allow individual hosts to receive mail from the outside world, so sendmail gets nixed next:
$ /sbin/chkconfig –level 0123456 sendmail off
On server platforms, who needs printing?:
$ /sbin/chkconfig –level 0123456 cups off
Now we get to the font server, isdn capabilities, console mouse and pcmcia support. I don’t use these services on my servers, so they get disabled as well:
$ /sbin/chkconfig –level 0123456 xfs off
$ /sbin/chkconfig –level 0123456 isdn off
$ /sbin/chkconfig –level 0123456 gpm off
$ /sbin/chkconfig –level 0123456 pcmcia off
Once these services are disabled (and optionally stopped with the service command or a reboot), my netstat output looks nice and clean:
$ netstat –tcp –udp –listening
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 *:ssh *:* LISTEN
This has served me well over the years, since it reduces boot time (less rc scripts to run), and frees up additional resources for my applications (while this isn’t substantial, every page of memory helps!).
Linux System Tuning - Back to Basics
Tuning an overview
When tuning, remember that there is no “Magic” setting, no single set of tuning parameters that cover all situations. Each server will have it’s own bottlenecks. This can be caused by many things, here are a few examples.- Software & Applications
- Hardware (cpu, memory, architecture, bus speed, etc.)
- LOAD end user, application, and system overhead.
- Outside factors (network, san, etc.)
- Each system is unique
- Alter 1 thing at a time
- Use the settings recommended by your software / hardware provider
- Alter one setting at a time. This will give you the opportunity to see if that change makes an impact. Making to many changes may degrade performance.
- Test after each change. Be sure to gather enough performance data so you can determine if the change had a positive or negative impact.
- Did I say test?? I can’t stress this enough.
- Document, Document, Document. Document every change you make. This will save you time and sanity if you need to back out some changes, and allow for the change to be easily duplicated.
- Shutdown unneeded services. Take a look at the output of “chkconfig -l | grep on” I bet you there are a few things we can shutoff.
- Gnome ???? on a web server?? init 3 anyone??
- iptables, SuSe-Firewall, RedHat Firewall, etc. If you don’t have unneeded services running why do you need a firewall to restrict access to them???
- SELinux, AppArmor?? are big performance killers and usally not that important.
Tips & Tricks “du”
du -sh ./ - shows the size of the current directory in human readable format without listing any sub directories
du -sh * > outputfile - shows the size of the files and directories in the current directory in human readable format without listing any sub directories directory and sends the output to a file.
du -sh * | grep something - shows the size of the files and directories in the current directory in human readable format without listing any sub directories directory and only lists files or directories with something in the name
du -sh * > outputfile - shows the size of the files and directories in the current directory in human readable format without listing any sub directories directory and sends the output to a file.
du -sh * | grep something - shows the size of the files and directories in the current directory in human readable format without listing any sub directories directory and only lists files or directories with something in the name
Tips & Tricks “Resintalling grub”
I came across the following procedure for reinstalling grub and thought it would be useful to share, having it handy can save you time you get into a bind.
1. Boot the system from an installation boot medium.
2. Type linux rescue at the installation boot prompt to enter the rescue environment.
3. Type chroot /mnt/sysimage to mount the root partition.
4. Type /sbin/grub-install /dev/hda to reinstall the GRUB boot loader, where /dev/hda is the boot partition.
5. Review the /boot/grub/grub.conf file, as additional entries may be needed for GRUB to control additional operating systems.
6. Reboot the system.
1. Boot the system from an installation boot medium.
2. Type linux rescue at the installation boot prompt to enter the rescue environment.
3. Type chroot /mnt/sysimage to mount the root partition.
4. Type /sbin/grub-install /dev/hda to reinstall the GRUB boot loader, where /dev/hda is the boot partition.
5. Review the /boot/grub/grub.conf file, as additional entries may be needed for GRUB to control additional operating systems.
6. Reboot the system.
Debugging code with strace
“strace is free software governed by a BSD-style license. It was originally written by Paul Kranenburg for SunOS and was inspired by the SunOS trace utility. The SunOS version was ported to Linux by Branko Lankester, who also wrote the Linux kernel support. In 1993, Rick Sladkey merged strace 2.5 for SunOS and the second release of strace for Linux, added many of the features of truss(1) from SVR4, producing an strace that worked on both platforms. Today, strace is maintained by Wichert Akkerman and Roland McGrath. strace is available in Red Hat Enterprise Linux 4 at version 4.5.8, Fedora Core 4 at version 4.5.11, and is also available at version 4.5.12 from SourceForge.net. Version 4.5.12 is discusses in this article.”
redhat.com | Debugging code with strace.
redhat.com | Debugging code with strace.
Linux Networking Commands and Tools
Todays post I will go over commands for networking. I hope you like it.
















