´ÙÀ½ ÀÌÀü Â÷·Ê

5. ¼³Ä¡¹®Á¦ÀÇ ÇØ°á

  1. Q: 2.0.x ´ëÀÇ Ä¿³ÎÀ» À§ÇÑ ÇöÀç ¾Ë·ÁÁø °¡Àå ¾ÈÁ¤µÈ RAID´Â ÆÐÄ¡´Â ¹«¾ùÀΰ¡¿ä?
    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: RAID ÆÐÄ¡°¡ Àü Àß ÀνºÅçµÇÁö ¾Ê³×¿ä. ¹«¾ùÀÌ ¹®Á¦Àϱî¿ä?
    A: /usr/include/linux ¸¦ /usr/src/linux/include/linuxÀ¸·Î ½Éº¼¸¯ ¸µÅ©¸¦ °É¾î¶ó. raid5.c µîÀÇ »õÆÄÀÏÀ» Á¦´ë·Î µÈ À§Ä¡·Î º¹»çÇ϶ó. ¶§¶§·Î ÆÐÄ¡ ¸í·É¾î´Â »õ·Î¿î ÆÄÀÏÀ» ¸¸µéÁö ¸øÇÑ´Ù. ÆÐÄ¡½Ã -f ¿É¼ÇÀ» »ç¿ëÇغ¸¶ó.

    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: raidtools 0.42¸¦ ÄÄÆÄÀÏ Áß include <pthread.h> ¿¡¼­, ÄÄÆÄÀÏÀÌ ¸Ü¾ú´Ù. ±×°Ô ³» ½Ã½ºÅÛ¿¡´Â ¾ø´Âµ¥, ¾î¶»°Ô ÀÌ°ÍÀ» °íÃÄ¾ß Çϴ°¡?
    A: raidtools-0.42´Â ftp://ftp.inria.fr/INRIA/Projects/cristal/Xavier.Leroy ¾òÀ» ¼ö ÀÖ´Â linuxthreads-0.6À» ÇÊ¿ä·Î ÇÑ´Ù. ¶ÇÇÑ, glibc v2.0µµ »ç¿ëÇÑ´Ù.

    raidtools-0.42 requires linuxthreads-0.6 from: ftp://ftp.inria.fr/INRIA/Projects/cristal/Xavier.Leroy Alternately, use glibc v2.0.

  4. Q: ÀÌ·± ¸Þ½ÃÁö°¡ ³ª¿É´Ï´Ù. mdrun -a /dev/md0: Invalid argument
    A: ù¹ø° »ç¿ëÇϱâ Àü¿¡ mkraid¸¦ »ç¿ëÇÏ¿© RAID¸¦ ÃʱâÈ­ ÇÏ¿©¾ß ÇÑ´Ù.

    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: ÀÌ·± ¸Þ½ÃÁö°¡ ³ª¿É´Ï´Ù. mdrun -a /dev/md0: Invalid argument ¼³Á¤Àº.
    A: lsmod (¶Ç´Â cat /proc/modules)·Î raid ¸ðµâÀÌ ·ÎµåµÇ¾ú´ÂÁö È®ÀÎÇضó. ·ÎµåµÇ¾îÀÖÁö ¾Ê´Ù¸é,modprobe raid1 ¶Ç´Â modprobe raid5 ·Î È®½ÇÈ÷ ·Îµå½ÃÄѶó. ¶Ç´Â autoloader¸¦ »ç¿ëÇÑ´Ù¸é, /etc/conf.modules ¿¡ ¾Æ·¡¿Í °°Àº ÁÙÀ» Ãß°¡½ÃÄѶó.
        alias md-personality-3 raid1
        alias md-personality-4 raid5
                
    

    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: mdadd -a ÀÇ ½ÇÇàÁß /dev/md0: No such file or directory ¿Í °°Àº ¸Þ½ÃÁö°¡ ³ª¿Ô½À´Ï´Ù. Á¤¸» ¾îµð¿¡µµ /dev/md0 °¡ ¾ø½À´Ï´Ù. ÀÌ°ÍÀ» ¾î¶»°Ô ÇØ¾ß ÇÒ±î¿ä?
    A: raid-tools´Â ·çÆ®°¡ make install ÇßÀ» ¶§, ÀÌ ÀåÄ¡µéÀ» ¸¸µç´Ù. ¶ÇÇÑ, ¾Æ·¡¿Í °°ÀÌ ÇÒ ¼öµµ ÀÖ´Ù.
        cd /dev 
        ./MAKEDEV md
                
    

    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: /dev/md0¿¡ RAID¸¦ ¸¸µç ÈÄ mount ½Ãµµ½Ã¿¡ ¾Æ·¡¿Í °°Àº ¿¡·¯°¡ ³³´Ï´Ù. ¹«¾ùÀÌ ¹®Á¦ÀԴϱî? mount: wrong fs type, bad option, bad superblock on /dev/md0, or too many mounted file systems.
    A: ¸¶¿îÆ® ÇϱâÀü¿¡ ÆÄÀϽýºÅÛÀ» ¸¸µé¾î¾ß ÇÑ´Ù. mke2fs¸¦ »ç¿ëÇ϶ó.

    You need to create a file system on /dev/md0 before you can mount it. Use mke2fs.

  8. Q: Truxton Fulton ÀÛ¼º: Á¦ 2.0.30 ½Ã½ºÅÛ¿¡¼­ mkraid·Î RAID-1À» À§ÇØ °¢°¢ÀÇ ÆÄƼ¼ÇÀ» Áö¿ì´Â Áß. ÄÜ¼Ö»ó¿¡ "Cannot allocate free page" ÀÌ·± ¿¡·¯°¡ ³ª°í, system log¿¡ "Unable to handle kernel paging request at virtual address ..." ÀÌ·± ¿¡·¯°¡ ³³´Ï´Ù.

    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: ±×°ÍÀº 2.0.30 kernelÀÇ ¾Ë·ÁÁø ¹ö±×ÀÌ´Ù. 2.0.31·Î ¼öÁ¤Çϰųª 2.0.29·Î µ¹¾Æ°¡¶ó.

    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: mdadd µÈ ÀåÄ¡¸¦ mdrun ÇÏ·Á°í Çϸé, ¾Æ·¡¿Í °°Àº ¸Þ½ÃÁö°¡ ³ª¿É´Ï´Ù. ''invalid raid superblock magic''.
    A: mkraid¸¦ ½ÇÇàÇ϶ó.

    Make sure that you've run the mkraid part of the install procedure.

  10. Q: Á¦°¡ /dev/md0À» »ç¿ëÇÏ´Â µ¿¾È, Ä¿³ÎÀº ¾Æ·¡¿Í °°Àº ¿¡·¯µéÀ» ½ñ¾Æ³À´Ï´Ù. md0: device not running, giving up ! , I/O error... Àü, °¡»ó device¿¡ Á¦ device¸¦ ¼º°øÀûÀ¸·Î Ãß°¡½ÃÄ×¾ú½À´Ï´Ù.

    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: »ç¿ëÇϱâ À§Çؼ­ device´Â ½ÇÇàµÇ¾î¾ß ÇÑ´Ù. mdrun -px /dev/md0¸¦ »ç¿ëÇ϶ó. x´Â RAID levelÀÌ´Ù.

    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: µÎ°³ÀÇ device¸¦ ¼±Çü ¿¬°áÇؼ­ md device¸¦ ¸¸µé¾ú½À´Ï´Ù. cat /proc/mdstat ·Î´Â ÃÑÅ©±â°¡ ³ª¿ÀÁö¸¸, df ¸í·ÉÀ¸·Î´Â ù¹ø° µð½ºÅ©ÀÇ Å©±â¹Û¿¡ ¾È³ª¿É´Ï´Ù.

    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: óÀ½ »ç¿ëÇϱâ Àü¿¡ ¹Ýµå½Ã mkfs¸¦ ½ÇÇà¾ß ÇÑ´Ù.

    You must mkfs your new md-dev before using it the first time, so that the filesystem will cover the whole device.

  12. Q: mdcreate·Î /etc/mdtab¸¦ ¼³Á¤ÇÏ°í ,mdadd, mdrun,fsck µîÀ» »ç¿ëÇØ, µÎ°³ÀÇ /dev/mdX ÆÄƼ¼ÇÀ» ¸¸µé¾ú½À´Ï´Ù. reboot Çϱâ Àü±îÁö ¸ðµç °ÍÀÌ ±¦Âú¾Æ º¸¿´Áö¸¸, reboot ÇÒ¶§, µÎ ÆÄƼ¼Ç¿¡¼­ ¾Æ·¡¿Í °°Àº fsck °¡ ³µÀ¾´Ï´Ù. fsck.ext2: Attempt to read block from filesystem resulted in short read while trying too open /dev/md0 ¿Ö ±×·¸°í ¾î¶»°Ô °íÃÄ¾ß Çϳª¿ä?

    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: ºÎÆà ÀÛ¾÷½Ã RAID ÆÄƼ¼ÇµéÀº fsckÀÌÀü¿¡ ¹Ýµå½Ã ½ÃÀ۵Ǿî¾ß ÇÑ´Ù. fsck ´Â /etc/rc.d/rc.S ¶Ç´Â /etc/rc.d/rc.sysinit ¿¡¼­ ºÒ·ÁÁú °ÍÀÌ´Ù. ÀÌ ÆÄÀϵéÀÇ fsck -A Àü¿¡ mdadd -ar¸¦ Ãß°¡Çضó.

    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: 4GB º¸´Ù Å« ÆÄƼ¼ÇµéÀ» Æ÷ÇÔÇÏ´Â RAID¸¦ ½ÇÇà½ÃÅ°·Á µµÀüÇÒ ¶§ ¾Æ·¡¿Í °°Àº ¸Þ½ÃÁö°¡ ³ª¿Ô½À´Ï´Ù. invalid raid superblock magic
    A: ÀÌ ¹ö±×´Â ÇöÀç °íÃÄÁ³´Ù.(97³â 9¿ù) ÃÖ±ÙÀÇ raid¹öÁ®À» »ç¿ëÇضó.

    This bug is now fixed. (September 97) Make sure you have the latest raid code.

  14. Q: 2GBº¸´Ù Å« ÆÄƼ¼ÇÀ¸·Î mke2fs¸¦ ½ÃµµÇϴµ¥ ¾Æ·¡¿Í °°Àº ¿À·ù°¡ ³³´Ï´Ù. Warning: could not write 8 blocks in inode table starting at 2097175
    A: ÀÌ°ÍÀº mke2fsÀÇ ¹®Á¦ °°´Ù. Àӽ÷Π¼Ò½º¿¡¼­ e2fsprogs-1.10/lib/ext2fs/llseek.c ÆÄÀÏÀÇ Ã¹ #ifdef HAVE_LLSEEK Àü¿¡ #undef HAVE_LLSEEK ¸¦ Ãß°¡ÇÑÈÄ mke2fs¸¦ ÀçÄÄÆÄÀÏÇؼ­ »ç¿ëÇ϶ó.

    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 °¡ /etc/mdtab ¸¦ ÀÐÁö ¸øÇÕ´Ï´Ù.
    A: /etc/mdtab ¾ÈÀÇ RAID-0 / linear RAID ¼³Á¤Àº ¾²ÀÌÁö ¾Ê°í ÀÖ°í, Á»´õ ÈÄ¿¡¾ß Áö¿ø µÉ°ÍÀÌ´Ù. /etc/raid1.conf µîÀÇ ¼³Á¤ÆÄÀϵéÀ» »ç¿ëÇ϶ó.

    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: (raid1.o) °°Àº ¸ðµâµéÀÌ ÀÚµ¿À¸·Î ·ÎµåµÇÁö ¾Ê½À´Ï´Ù. mdrun Àü¿¡ ¼öµ¿À¸·Î modprobe¸¦ ½ÇÇà½ÃÄÑ¾ß Çϴµ¥, ¾î¶»°Ô ÀÌ°ÍÀ» °íÃÄ¾ß ÇÒ±î¿ä?
    A: /etc/conf.modules¿¡ ¾Æ·¡¿Í °°Àº ÁÙÀ» Ãß°¡Çضó.
        alias md-personality-3 raid1
        alias md-personality-4 raid5
                
    

    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: µå¶óÀ̺ê 13°³¸¦ mdadd ÇÑ ÈÄ, mdrun -p5 /dev/md0 ½Ãµµ ÇßÁö¸¸, ¾Æ·¡¿Í °°Àº ¿À·ù°¡ ³ª¿Ô½À´Ï´Ù. /dev/md0: Invalid argument
    A: software RAIDÀÇ ±âº»¼³Á¤ 8°³ÀÌ´Ù. linux/md.h ÀÇ #define MAX_REAL=8 ¸¦ Å©°Ô ¹Ù²ÛÈÄ, Ä¿³ÎÀ» ÀçÄÄÆÄÀÏ Ç϶ó.

    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: ÃÖ½Å½Ä SPARCstation 5 ¿¡¼­ md ÀÛ¾÷À» ÇÒ¼ö ¾ø½À´Ï´Ù. µð½ºÅ© ¶óº§¿¡ ¹«½¼ ¹®Á¦°¡ ÀÖ´Â °ÍÀ̶ó°í »ý°¢µË´Ï´Ù¸¸..

    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 ÀÇ µð½ºÅ© ¶óº§Àº ÆÄƼ¼ÇÀÇ Ã¹ 1K ¿¡ ÀÖ´Ù. RAID-1¿¡¼­´Â ext2fs ÆÄƼ¼ÇÀÌ ¸ðµç ¶óº§À» ¹«½Ã ÇÒ °ÍÀ̱⠶§¹®¿¡ ¹®Á¦°¡ ¾øÁö¸¸, ´Ù¸¥ ·¹º§µé¿¡ °üÇؼ­´Â ¾ÆÁ÷ ÇØ°áµÇÁö ¾Ê¾Ò´Ù.

    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.


´ÙÀ½ ÀÌÀü Â÷·Ê