Linuxdoc Linux Questions
Click here to ask our community of linux experts!
Custom Search
Next Previous Contents

5. Troubleshooting Install Problems

  1. Q: What is the current best known-stable patch for RAID in the 2.0.x series kernels?
    A: As of 18 Sept 1997, it is "2.0.30 + pre-9 2.0.31 + Werner Fink's swapping patch + the alpha RAID patch". As of November 1997, it is 2.0.31 + ... !?
  2. Q: The RAID patches will not install cleanly for me. What's wrong?
    A: Make sure that /usr/include/linux is a symbolic link to /usr/src/linux/include/linux. Make sure that the new files raid5.c, etc. have been copied to their correct locations. Sometimes the patch command will not create new files. Try the -f flag on patch.
  3. Q: While compiling raidtools 0.42, compilation stops trying to include <pthread.h> but it doesn't exist in my system. How do I fix this?
    A: raidtools-0.42 requires linuxthreads-0.6 from: ftp://ftp.inria.fr/INRIA/Projects/cristal/Xavier.Leroy Alternately, use glibc v2.0.
  4. Q: I get the message: mdrun -a /dev/md0: Invalid argument
    A: Use mkraid to initialize the RAID set prior to the first use. mkraid ensures that the RAID array is initially in a consistent state by erasing the RAID partitions. In addition, mkraid will create the RAID superblocks.
  5. Q: I get the message: mdrun -a /dev/md0: Invalid argument The setup was:
    • raid build as a kernel module
    • normal install procedure followed ... mdcreate, mdadd, etc.
    • cat /proc/mdstat shows
          Personalities :
          read_ahead not set
          md0 : inactive sda1 sdb1 6313482 blocks
          md1 : inactive
          md2 : inactive
          md3 : inactive
                      
      
    • mdrun -a generates the error message /dev/md0: Invalid argument
    A: Try lsmod (or, alternately, cat /proc/modules) to see if the raid modules are loaded. If they are not, you can load them explicitly with the modprobe raid1 or modprobe raid5 command. Alternately, if you are using the autoloader, and expected kerneld to load them and it didn't this is probably because your loader is missing the info to load the modules. Edit /etc/conf.modules and add the following lines:
        alias md-personality-3 raid1
        alias md-personality-4 raid5
                
    
  6. Q: While doing mdadd -a I get the error: /dev/md0: No such file or directory. Indeed, there seems to be no /dev/md0 anywhere. Now what do I do?
    A: The raid-tools package will create these devices when you run make install as root. Alternately, you can do the following:
        cd /dev 
        ./MAKEDEV md
                
    
  7. Q: After creating a raid array on /dev/md0, I try to mount it and get the following error: mount: wrong fs type, bad option, bad superblock on /dev/md0, or too many mounted file systems. What's wrong?
    A: You need to create a file system on /dev/md0 before you can mount it. Use mke2fs.
  8. Q: Truxton Fulton wrote:
    On my Linux 2.0.30 system, while doing a mkraid for a RAID-1 device, during the clearing of the two individual partitions, I got "Cannot allocate free page" errors appearing on the console, and "Unable to handle kernel paging request at virtual address ..." errors in the system log. At this time, the system became quite unusable, but it appears to recover after a while. The operation appears to have completed with no other errors, and I am successfully using my RAID-1 device. The errors are disconcerting though. Any ideas?
    A: This was a well-known bug in the 2.0.30 kernels. It is fixed in the 2.0.31 kernel; alternately, fall back to 2.0.29.
  9. Q: I'm not able to mdrun a RAID-1, RAID-4 or RAID-5 device. If I try to mdrun a mdadd'ed device I get the message ''invalid raid superblock magic''.
    A: Make sure that you've run the mkraid part of the install procedure.
  10. Q: When I access /dev/md0, the kernel spits out a lot of errors like md0: device not running, giving up ! and I/O error.... I've successfully added my devices to the virtual device.
    A: To be usable, the device must be running. Use mdrun -px /dev/md0 where x is l for linear, 0 for RAID-0 or 1 for RAID-1, etc.
  11. Q: I've created a linear md-dev with 2 devices. cat /proc/mdstat shows the total size of the device, but df only shows the size of the first physical device.
    A: You must mkfs your new md-dev before using it the first time, so that the filesystem will cover the whole device.
  12. Q: I've set up /etc/mdtab using mdcreate, I've mdadd'ed, mdrun and fsck'ed my two /dev/mdX partitions. Everything looks okay before a reboot. As soon as I reboot, I get an fsck error on both partitions: fsck.ext2: Attempt to read block from filesystem resulted in short read while trying too open /dev/md0. Why?! How do I fix it?!
    A: During the boot process, the RAID partitions must be started before they can be fsck'ed. This must be done in one of the boot scripts. For some distributions, fsck is called from /etc/rc.d/rc.S, for others, it is called from /etc/rc.d/rc.sysinit. Change this file to mdadd -ar *before* fsck -A is executed. Better yet, it is suggested that ckraid be run if mdadd returns with an error. How do do this is discussed in greater detail in question 14 of the section ''Error Recovery''.
  13. Q: I get the message invalid raid superblock magic while trying to run an array which consists of partitions which are bigger than 4GB.
    A: This bug is now fixed. (September 97) Make sure you have the latest raid code.
  14. Q: I get the message Warning: could not write 8 blocks in inode table starting at 2097175 while trying to run mke2fs on a partition which is larger than 2GB.
    A: This seems to be a problem with mke2fs (November 97). A temporary work-around is to get the mke2fs code, and add #undef HAVE_LLSEEK to e2fsprogs-1.10/lib/ext2fs/llseek.c just before the first #ifdef HAVE_LLSEEK and recompile mke2fs.
  15. Q: ckraid currently isn't able to read /etc/mdtab
    A: The RAID0/linear configuration file format used in /etc/mdtab is obsolete, although it will be supported for a while more. The current, up-to-date config files are currently named /etc/raid1.conf, etc.
  16. Q: The personality modules (raid1.o) are not loaded automatically; they have to be manually modprobe'd before mdrun. How can this be fixed?
    A: To autoload the modules, we can add the following to /etc/conf.modules:
        alias md-personality-3 raid1
        alias md-personality-4 raid5
                
    
  17. Q: I've mdadd'ed 13 devices, and now I'm trying to mdrun -p5 /dev/md0 and get the message: /dev/md0: Invalid argument
    A: The default configuration for software RAID is 8 real devices. Edit linux/md.h, change #define MAX_REAL=8 to a larger number, and rebuild the kernel.
  18. Q: I can't make md work with partitions on our latest SPARCstation 5. I suspect that this has something to do with disk-labels.
    A: Sun disk-labels sit in the first 1K of a partition. For RAID-1, the Sun disk-label is not an issue since ext2fs will skip the label on every mirror. For other raid levels (0, linear and 4/5), this appears to be a problem; it has not yet (Dec 97) been addressed.

Next Previous Contents