Other OrcaWare Tools

This is a list of the other tools hosted on this site.

  • copy_badblocks.pl

    Have you ever had a disk with one or more bad blocks on it and you want to make a copy of a file, using cp or dd, partition or even the entire disk, only to have the copy fail on a single bad block?

    This tool is a smart copy program that doesn't stop copying when it runs into a read error. It only stops reading when the end of file is reached.

    To back up my laptop which had a number of bad blocks, instead of using dd which failed 10 Gbytes into the disk, I ran this command instead:

    copy_badblocks.pl /dev/hda - | ssh blair@10.10.10.10 "cat > laptop-backup"
    
  • find_badblocks.pl

    This script is used to find bad blocks on all the locally attached disks on a Linux system. It determines the default block size used in each partition and uses this when it runs badblocks with the -b command line option so that blocks identified by badblocks can correctly be mapped to filesystem blocks and hence inodes.

    On my RedHat systems, I simply copy this file into /etc/cron.weekly for it to run on a weekly basis.

    This script takes a -p command line option which specifies the number of times to scan the partitions for bad blocks, similar to badblocks' -p command line option. However, while badblocks will skip any previously identified bad blocks on the current scan, find_badblocks.pl runs badblocks the specified number of times, so all blocks will be scanned the same number of times. This allows the user to gauge how bad the bad blocks are if there are N scans and the same badblock is found M (<N) times. If the filesystem is an ext2 or ext3 filesystem, then bad blocks stored in the filesystem's bad block inode will still be skipped.