Posts Tagged ‘linux’
Switching between using Firefox in Windows and Ubuntu I am used to being able to hit the BACKSPACE key to go back one page. This is the default behaviour in Windows but not in Ubuntu.
To change the behaviour in Ubuntu:
Type about:config as your URL
Filter to browser.backspace_action and then change that value.
0 – sets it to the windows default (back 1 page)
1 – sets it to scroll up (shift+backspace = scroll down)
2 – disable backspace key
Incidentally in Ubuntu you can always do the following without changing anything:
- ALT+ Left Arrow = go back 1 page
- ALT+ Right Arrow = go fwd 1 page
Some commands that come in handy for software RAID arrays.
To find out what your RAID array is doing issue:
cat /proc/mdstat
To find out the status of a particular device:
mdadm –detail /dev/mdx
To remove a drive from the array:
mdadm -r /dev/md0 /dev/sdc1
(this will remove partition sdc1 from the md0 array)
To add a drive back in to an array:
mdadm /dev/md0 -a /dev/sdc1
(this will add partition sdc1 in to the md0 array)
To watch an array as it rebuilds itself:
watch -n1 cat /proc/mdstat
The different levels of RAID are:
- RAID-0
A “striped” mode. Ideally the devices are the same size. There is no redundancy but you do gain performance (from parallel reads or writes). If you lose a drive you will lose data.
- RAID-1
A mirrored RAID set. All data is written to all drives at once. You can lose a drive and not lose data. Write performance will be a little worse because you must wait until all data on all drives is finished. It is possible to saturate the PCI bus while writing and this causes the biggest bottleneck (hardware RAID suffers less from this). Read performance can be better than a single drive. It is also possible to have a spare dive kick in immediately in the event of a drive failure. RAID size is limited by the smallest disk available.
- RAID-4
Requires 3 or more drives. It is essentially a RAID-0 array with an additional drive being used to store parity informaton so that a failed drive can be reconstructed. The parity drive becomes the performance bottleneck. In addition if the parity drive fails then redundancy is also lost.
- RAID-5
Requires 3 or more drives. This is a very useful option as it combines the performance advantages of a RAID-0 array with the redundancy of RAID-1. In this case parity information is distributed across all drives. RAID-5 arrays can lose one drive but not two. Actual performance gains will depend on usage scenarios with heavilly fragmented data fairing not very well.
Setting up a RAID array on Linux is fairly easy and is definitely effective. I have even set this up on servers that have hardware RAID equipment because the hardware drivers were either flaky or not available.
Be aware that software RAID will steal some CPU cycles. I feel that most modern hardware has more than enough power to spare but, if you need every ounce of performance then hardware RAID is definitely the way to go. I can say that I haven’t noticed much of a performance hit with RAID running and the benefit has always been worth it but, as they say, your mileage may vary.
This is most easilly accomplished with a recent kernel (at least 2.4 but that covers almost all recent distros). The RAID tools are also usually installed as is mdadm.
Okay its seems that the Virtualmin downgrade has settled down now.
I’m still working out exactly how much functionality I have lost by going to the free GPL version but this is what I did:
- I downloaded the repo rpm and installed it with:
rpm -Uvh –oldpackage virtualmin-release-latest.rpm
- I then ran a
yum clean all
This will clean up the repo settings left over from the downgrade and reset to the gpl version.
I then went into the webmin control panel:
WEBMIN>SYSTEM>Scheduled Cron Jobs
and disabled the following cron jobs (these are apparently not valid in the gpl version of Virtualmin):
- sendratings.pl
- maillog.pl
- fcgiclear.pl
That last one is a clean up program for fastcgi but , I haven’t found out what the other 2 jobs do.
I just know that they give me errors in my logs if left enabled.
I have since discovered that it might be possible to change the username and password to “GPL” and the re-run the install script. I have not tested this and don’t know what that would do to the existing servers, mailpacks , etc.
Okay so it turns out the upgrade (downgrade..sidegrade???) to Virtualmin didn’t work as well as I had hoped.
I did the steps outlined previously but some problems cropped up.
- Some hourly cron jobs started to act up (most notably one which cleans up Fastcgi scripts …fcgiclean.pl)
- The Virtualmin Control Panel announced a new update which , when applied, actually reverted back to the Pro version and then proceeded to warn me that the license was out of date …again…sigh
I will troll the support forums and see if I can fix this.
Also unfortunately Virtualmin seems to be updating their website so their support documentation is full of stale links…double sigh.
I will keep posting here.
I recently had to downgrade our Virtualmin package from PRO to GPL because our license expired and we didn’t seem to need the features of the PRO version any more.
Time will tell if this turns out to be a foolish move but this is what I did.
Basically you just install the GPL version over top of the PRO version, how you downgrade depends on your OS. For an RPM-based Distro like Centos 5, you’ll have to use the “–old-package” option to RPM to install the GPL version. Because upgrading is the far more common scenario, PRO has a higher Epoch than GPL, which means it always looks like a newer version to rpm/yum, even if it actually isn’t.
The GPL repository will have the same URL as the Professional one, except it
has “/gpl/” in the path.
Steps I took:
ONE
First install the GPL version over the PRO version;
Download from
http://software.virtualmin.com/gpl/centos/5/i386/
e.g. wbm-virtual-server-3.73.gpl-1.noarch.rpm
rpm -Uvh –oldpackage wbm-virtual-server-”VERS#”.noarch.rpm
Obviously, with GPL, you won’t need a serial number to download it.
TWO
Then upgrade the repo with:
rpm -Uvh –oldpackage http://software.virtualmin.com/gpl/
centos/5/i386/virtualmin-release-latest.noarch.rpm
THREE
Then do a
yum update
…and finally REBOOT if a new kernel was installed.
The TAR command is one of those built-in utilities that makes Linux (and of course UNIX) so great. It allows you to make an archive of a directory (or a series of files).
You would use it like so…
- cd to root folder
- tar -cvzf name.tgz dir
This makes a tar archive of dir.
- tar -xvf name.tgz
This will extract the archive name.tgz wherever you are.
or
tar -xvf file.tar.gz -C /some/dir/
This will change to /some/dir/ and extract file.tar.gz there.