wiki:TipAndDoc/HA/NFS

Version 2 (modified by mitty, 14 years ago) (diff)

--

HA-NFS

  • Highly Available NFS with DRBD and Pacemaker
  • Ubuntu 10.04 Lucid 2.6.32-30-generic-pae
    • mdadm 2.6.7.1-1ubuntu15
    • lvm2 2.02.54-1ubuntu4.1
    • drbd8-utils 2:8.3.7-1ubuntu2.1
    • nfs-kernel-server 1:1.2.0-4ubuntu4.1
    • pacemaker 1.0.8+hg15494-2ubuntu2
  • Tested with VMware Workstation 7.1.3

DRBD on LVM with RAID1

  • Primary
    • /dev/sd[bc]1 -> /dev/md0 (RAID1)
    • /dev/md0 -> /dev/vgnfs/drbd (LVM)
  • Secondary
    • /dev/sdb1 -> /dev/vgnfs/drbd (LVM)
  • 全体図
                                 drbd/Primary (ubuntu-haa)
               --------------------------------------------------------------
               |                   -------------------------                |
               |               sda | system[ / ]  |  swap  |                |
               |                   -------------------------                |
               |                                                            |
      NIC(192.168.234.101)      sdb                     sdc                 |
       ||      |   ||      --------------          --------------           |
       ||      ----||------|            |----------|            |------------
       ||          ||      |   Linux    |          |   Linux    |
       ||          ||      |   raid     |          |   raid     |
       ||          ||      | autodetect<=== RAID1 ==>autodetect |
       ||          ||      |------------|    |     |------------|
       ||          ||      --------------    |     --------------
       ||          ||                        |
       ||          ||             ----------LVM----------
       ||          ||             |                 |   |
       ||          ======================drbd       |*1 |  *1: snapshot
       ||                         |                 |   |
       ||                         -----------------------
       ||
       ||
       ||
       ||
       ||
       ||         drbd/Secondar (ubuntu-hab)
       ||      -----------------------------------
       ||      |      -------------------------  |
       ||      |  sda | system[ / ]  |  swap  |  |
       ||      |      -------------------------  |
       ||      |                                 |
      NIC(192.168.234.102)      sdb              |
               |   ||      |------------|        |
               ----||------|            |---------
                   ||      |    LVM     |
                   ||      |            |----|
                   ||      |------------|    |
                   ||      --------------    |
                   ||                        |
                   ||             ----------LVM----------
                   ||             |                 |   |
                   ======================drbd       |*1 |  *1: snapshot
                                  |                 |   |
                                  -----------------------