Any way to simulate a disk read or write error?

From: Eric Taylor (et1_at_rocketship1.com)
Date: 07/16/04

  • Next message: Norm Dresner: "Re: Any way to simulate a disk read or write error?"
    Date: Fri, 16 Jul 2004 00:11:28 GMT
    
    

    I need to do some robustness checking on programs that read
    and write very large files. Is there any way to have a linux disk
    device return an error on request? Some /proc entry maybe?

    Either by specifying a file or an area on the disk itself, just
    so long as I could map it into a file I am going to be reading.

    I tried filling up the disk to check the write code, but even
    that didn't always work. Sometimes the system would
    just keep going even though there shouldn't have been any
    disk space left. And this only checks one kind of error.

    20 years back, in an O.S. far far away, we had some virtual
    disk drivers with this feature. It was much easier than taking
    a screwdriver to the hard drive. Naturally, the O.S. provider
    didn't like this, because it could cause the file system to croak.
    But if we were careful, we were able to validate our error recovery code.

    thanks
    eric


  • Next message: Norm Dresner: "Re: Any way to simulate a disk read or write error?"

    Relevant Pages

    • disktab for VPC Disk
      ... I'm trying to optimize the disk access of NEXTSTEP on Virtual PC 5.0.4. ... Maximum size of NeXT file system is 2GB. ... programs in the initial 8 sectors of the device. ... The number of cylinders per cylinder group in a file system. ...
      (microsoft.public.mac.virtualpc)
    • Re: partition naming - newbie
      ... hardware address that is assigned to each disk, tape, or CD-ROM. ... Using the prtconf command ... In addition to managing these directories, the devfsadm command also ... Berkeley fast file system. ...
      (comp.unix.solaris)
    • Re: Windows bug?
      ... >> "The file system structure on the disk is corrupt and unusable. ... >> Windows has made corrections to the file system. ... >> 9070410 allocation units available on disk. ...
      (microsoft.public.windows.file_system)
    • SUMMARY N2: RE: Veritas Volume Manager and Solaris 8 disk space problem
      ... DESC: Commercial File System ... Disk layout version 4 won't support filesistem sizes bigger than 1Tb. ... VERITAS File System disk layout version 6 supports the creation of file ... Sector Count Sector ...
      (SunManagers)
    • Re: [patch] ext2/3: document conditions when reliable operation is possible
      ... when the power fails, the disk either writes a particular disk block, ... Now consider a file system which does logical journalling. ... down pending DMA transfers to prevent this failure mode from causing ...
      (Linux-Kernel)