Monthly Archives: December 2008
udev, HAL, DBUS
| 19-Dec-2008 | Posted by Sonia Hamilton under Networking |
A good post from Glen Turner on SLUG about udev, HAL, DBUS (in the context of GSM modems):
- you insert the device
- UDEV tells HAL that it has been inserted
- HAL looks up a XML-based "information" file. These are where the
rubber hits the road. The system files are in
/usr/share/hal/fdi/
and any files you may write go into
/etc/hal/fdi/
- HAL determines from the USB vendor/model codes it was handed
that you've got a GSM modem. The policy files contain related
details like which USB Serial port to use for PPP, what dialing
algorithm to use, etc.
- HAL pumps these details to NetworkManager, probably via DBUS
- NetworkManager daemon chats with the NetworkManager applet to
grab other data, such as PIN numbers
- NetworkManager kicks off PPP using the combined information
from HAL and the NM applet.
Oracle – how to purge old RMAN backups
| 18-Dec-2008 | Posted by Sonia Hamilton under Oracle |
Oracle runs on Linux, therefore I must be an Oracle expert (so goes management thinking). Here’s how to correctly purge old RMAN backups when storage runs out of space (thanks Nakrob):
Do not use rm to remove files. You must do it via RMAN. $ export NLS_DATE_FORMAT='DD-MM-YY HH24:MI' $ rman target / NOCATALOG RMAN > crosscheck backupset; This command will verify whether backup file is still on media. If it is unavailable, RMAN will mark it as UNAVAILABLE or EXPIRED. RAMN > delete expired backupset; or RMAN > delete expired backup; Note : If you manually rename or zip RMAN backup files, you must manually remove it from disk since RMAN does not recognize them. RMAN > report obsolete; The command lists all backups rendered obsolete based on rentention policy. Current Retention Policy is 'Recovery WINDOW OF 30 DAYS'. RMAN > delete obsolete; RMAN > list backup summary; It will show all backupset info kept in RMAN repository. If you want to see what RMAN keeps in each backupset, run 'list backupset N' where N is Backupset ID. RMAN > delete backupset N; or RMAN > delete backupset; (to delete all backups) Once fair amount of space is reclaimed, do full backup. Not sure how much full back space is needed but not less than 20G. RMAN > backup database; RMAN > list backup; Full backup may have more than one backupset. Look for last backupsets. It will list backup db files. RMAN > delete obsolete; Rerun this command to delete unwanted existing backupsets (if have) after completed full backup.
autossh – automatically restart SSH tunnels
| 10-Dec-2008 | Posted by Sonia Hamilton under Ssh |
A tool I’d forgotten about – autossh. Also an article here. Thanks Dean.
Some links on getting autossh going:
- Cygwin to Linux: Matt’s stuff
sfdisk, RAID
| 04-Dec-2008 | Posted by Sonia Hamilton under |
A useful tool I came across last night (thanks Rodrigo) – sfdisk – “Partition table manipulator for Linux”. Good for copying partition tables when replacing a failed hard disk in a (md Linux Software Raid) RAID. For example, to copy the partition table from sdb to sda:
sfdisk –d /dev/sdb | sed –e s/sdb/sda/ | sfdisk /dev/sda
Of course you’d also be doing the usual mdadm –fail, –remove, physically swap disk, –add, cat /proc/mdstat, –detail, and installing grub on the new hard drive:
grub> device (hd0) /dev/sdb grub> root (hd0,0) grub> setup (hd0) grub> quit
(Unmercifully plagiarised from Rodrigo’s notes).
Disk MTBF – Mean Time Between Failures
| 03-Dec-2008 | Posted by Sonia Hamilton under storage |
A good article on disk MTBF (Mean Time Between Failures), that clarified my understanding (thanks Jarek).
The key paragraph:
“To be interpreted properly, the MTBF figure is intended to be used in conjunction with the useful service life of the drive, the typical amount of time before the drive enters the period where failures due to component wear-out increase. MTBF only applies to the aggregate analysis of large numbers of drives; it says nothing about a particular unit. If the MTBF of a model is 500,000 hours and the service life is five years, this means that a drive of that type is supposed to last for five years, and that of a large group of drives operating within this timeframe, on average they will accumulate 500,000 of total run time (amongst all the drives) before the first failure of any drive. Or, you can think of it this way: if you used one of these drives and replaced it every five years with another identical one, in theory it should last 57 years before failing, on average (though I somehow doubt we’ll be using 10 to 100 GB spinning-platter hard disk drives in the year 2057. :^) )”
The link on service life explains:
“The service life of a modern hard disk is usually about three to five years. … Interestingly, the claimed service life is often longer than the warranty period for the drive. For example, the service life might be five years but the warranty period only three years. Think about what this means. ;^) Basically, it says that the manufacturer thinks the drive should last five years, but they aren’t going to bet on it lasting more than three! I personally think the warranty period is a better indication of a drive’s true useful life–to a point–because the warranty period is where the manufacturer “puts their money where their mouth is”.
Recent Comments