Tuesday, March 9, 2010

Idea: Relatively Reliable Ram Drive Server

Idea:Relatively Reliable Ram Disk Server (specs updated 2012-Q2)

Two commodity servers

Parts (for each)
  • MB with 8 or 16 DIMM slots
  • Two 10G ethernet cards for storage
  • Four smallish enterprise drives:
    • Two drives in a mirrored pair for OS
    • Two drives for backing store
  • 32GB DIMMs of ECC Registered RAM
Parts for file server node
  • Bonded pair of 1G or 10G cards
    • Make a large RAM disk on each (leave 2GB for OS)
    • On one machine:
      • Share the RAM disk with the other machine via one crossover network (one of the 10G cards on each machine) via iSCSI
      • Share pair of backing drives via iSCSI
    • On other machine (file server)
      • Using md, on each, mirror the iSCSI RAM disk to the local RAM disk.
      • Make a filesystem on mirrored RAM disk
      • Share RAM filesystem via NFS and SAMBA.
      • Combine iSCSI drives and local drives into RAID 0+1 backing store. 
      • Make journaled filesytem on backing store disk.
      • Mount backing store
    • Put each server on a sizable independent UPS with a serial/USB monitor to smooth out uptime (5h-10h)
    • Configure serial trigger from UPS such that if the AC cuts on either of them the file server will stop sharing and then run an rsnapshot backup to the backing store.
    • Run rsnapshot to flush the RAM filesystems every 30 minutes.
    • Configure RAM disk startup and shutdown
      • On shutdown have file server to rsnapshot RAM disk to backing store before coming down.
      • On start up check uptime on other server to see if it went down as well.
        • If so, have file server rsnapshot to RAM disk before starting file sharing services.
        • If not, have file server recover RAM disk from mirror.
    Note: If you have the file server on a 10G network with three 10G cards, you could share the RAM disk itself as an iSCSI target and use dd to back it off to the backing store.

    • You can use these RAM LUNs in combination with flachcache or bcache to speed up access to existing physical LUNs.  Not necessarily safe ;-), but if you need cheap speed, these will work.