wiki:TipAndDoc/storage/RAID

Version 4 (modified by mitty, 16 years ago) (diff)

--

about Software RAID

boot loader

lilo

  • ファイルシステムにXFSを使う等で、OSインストール時にliloを選択した場合はデフォルトで全てのミラーdiskのMBRにliloがインストールされる模様
    • RAID5でどうなるかは不明

mdadm

Ubuntu

  • /etc/initramfs-tools/conf.d/mdadm
    # BOOT_DEGRADED:
    # Do you want to boot your system if a RAID providing your root filesystem
    # becomes degraded?
    #
    # Running a system with a degraded RAID could result in permanent data loss
    # if it suffers another hardware fault.
    #
    # However, you might answer "yes" if this system is a server, expected to
    # tolerate hardware faults and boot unattended.
    
    BOOT_DEGRADED=false
    
  • /etc/mdadm/mdadm.conf
    # instruct the monitoring daemon where to send mail alerts
    MAILADDR root
    
  • /etc/default/mdadm
    # AUTOCHECK:
    #   should mdadm run periodic redundancy checks over your arrays? See
    #   /etc/cron.d/mdadm.
    AUTOCHECK=true
    
    # START_DAEMON:
    #   should mdadm start the MD monitoring daemon during boot?
    START_DAEMON=true
    
    • /etc/cron.d/mdadm
      # By default, run at 01:06 on every Sunday, but do nothing unless the day of
      # the month is less than or equal to 7. Thus, only run on the first Sunday of
      # each month. crontab(5) sucks, unfortunately, in this regard; therefore this
      # hack (see #380425).
      6 1 * * 0 root [ -x /usr/share/mdadm/checkarray ] && [ $(date +\%d) -le 7 ] && /usr/share/mdadm/checkarray --cron --all --quiet
      

dpkg-reconfigure mdadm

  • [ ... ] がデフォルト値
  • sudo dpkg-reconfigure mdadm
    1. /etc/default/mdadm AUTOCHECK
       ┌───────────────────────────┤ Configuring mdadm ├
       │                                                                           │
       │ If your kernel supports it (>> 2.6.14), mdadm can periodically check the  │
       │ redundancy of your MD arrays (RAIDs). This may be a resource-intensive    │
       │ process, depending on your setup, but it could help prevent rare cases    │
       │ of data loss. Note that this is a read-only check unless errors are       │
       │ found; if errors are found, mdadm will try to correct them, which may     │
       │ result in write access to the media.                                      │
       │                                                                           │
       │ The default, if turned on, is to run the checks on the first Sunday of    │
       │ every month at 01:06 o'clock.                                             │
       │                                                                           │
       │ Should mdadm run monthly redundancy checks of the MD arrays?              │
       │                                                                           │
       │                   [<Yes>]                      <No>                       │
       │                                                                           │
       └──────────────────────────────────────
      
    2. /etc/default/mdadm START_DAEMON
        ┌──────────────────────────┤ Configuring mdadm ├
      ─│                                                                         │
        │ The MD (RAID) monitor daemon sends email notifications in response to   │
        │ important MD events (such as a disk failure). You probably want to      │
        │ enable it.                                                              │
        │                                                                         │
        │ Do you want to start the MD monitoring daemon?                          │
        │                                                                         │
        │                   [<Yes>]                      <No>                     │
        │                                                                         │
        └──────────────────────────────────────
      
    3. /etc/mdadm/mdadm.conf MAILADDR
         ┌─────────────────────────┤ Configuring mdadm ├─
      ─ │ Please enter the email address of the user who should get the email   │
         │ notification for important MD events.                                 │
         │                                                                       │
         │ Recipient for email notifications:                                    │
         │                                                                       │
         │ root_________________________________________________________________ │
         │                                                                       │
         │                                <Ok>                                   │
         │                                                                       │
         └─────────────────────────────────────
      
    4. /etc/initramfs-tools/conf.d/mdadm BOOT_DEGRADED
       ┌───────────────────────────┤ Configuring mdadm ├
       │                                                                           │
       │ If your root filesystem is on a RAID, and a disk is missing at boot, it   │
       │ can either boot with the degraded array, or hold the system at a          │
       │ recovery shell.                                                           │
       │                                                                           │
       │ Running a system with a degraded RAID could result in permanent data      │
       │ loss if it suffers another hardware fault.                                │
       │                                                                           │
       │ If you do not have access to the server console to use the recovery       │
       │ shell, you might answer "yes" to enable the system to boot unattended.    │
       │                                                                           │
       │ Do you want to boot your system if your RAID becomes degraded?            │
       │                                                                           │
       │                    <Yes>                      [<No>]                      │
       │                                                                           │
       └──────────────────────────────────────
      
    • apply settings...
       * Stopping MD monitoring service mdadm --monitor                        [ OK ]
      Generating array device nodes... done.
       Removing any system startup links for /etc/init.d/mdadm-raid ...
      update-initramfs: Generating /boot/initrd.img-2.6.24-24-server
      Warning: LBA32 addressing assumed
      Added Linux *
      Added LinuxOLD
      The Master boot record of  /dev/sda  has been updated.
      Warning: /dev/sdb is not on the first disk
      The Master boot record of  /dev/sdb  has been updated.
      2 warnings were issued.
       * Starting MD monitoring service mdadm --monitor                        [ OK ]
      

Attachments (1)

Download all attachments as: .zip