DragonOSA RedPower revival

RAID and network storage

Pool drives with software RAID, share a volume over the network, and feed a remote datacenter.

DragonOS handles storage like Linux: drives can be pooled into a software RAID array, and one computer's volume can be shared with others over the network.

Volumes

Everything that stores items or files is a volume: Storage, Autocraft, DragonBASIC and the import ports all read volumes.

Volume Name Mounted on
A single drive hda, hdb... /mnt/hdN
A RAID array the array's name (/dev/mdN) /mnt/NAME
A network share //IP/SHARE /net/NAME

The first local volume is /. List them with storage list, df -h or mount.

Software RAID

raid create datacenter 5 hdb hdc hdd
raid detail datacenter
Level Capacity Runs with
0 the sum of the disks every disk
1 the smallest disk one disk
5 (n − 1) × the smallest disk all but one disk
  • Every member drive carries the array's superblock and its own copy of the array's data, so an array moves with its disks and reassembles from the newest member.
  • A missing member leaves the array degraded. A stale or newly added member rebuilds at 256 KB per tick and does not count until it has finished.
  • An array runs on one computer at a time; others see it as busy. It stops 200 ticks after its last member leaves.
  • Member disks must be empty. The root disk cannot join an array. Array names are 1 to 12 letters, digits, - or _.
Command Does
raid list List arrays
raid detail NAME Members, state and rebuild progress
raid create NAME LEVEL DISK DISK... Make an array
raid add NAME DISK Rebuild a missing member onto an empty disk
raid delete NAME [-f] Delete an array

Share a volume

On the computer that has the drives:

share add store datacenter secret
share list

The volume can be a drive (hda), an array (md0) or an array's name. A share has a name of up to 12 characters and a password of up to 14 (LAN Manager share-level security). It remembers the volume itself, so drive letters may change. share del NAME removes it.

On another computer:

smbmount //10.0.0.5/store store secret
ls /net/store
smbumount store

The mount goes over the real network: cables, switches, VLANs and firewall rules all apply. The computer that shares must be loaded and running DragonOS. Programs, Storage, Autocraft and import routes then use the share like a local drive. smbmount with no arguments lists the mounts and whether their servers answer.

Feed a remote datacenter

storage import PORT VOLUME empties a Storage Import Port into a chosen volume continuously. PORT is the import port's Redbus address, and the volume can be a mounted share. One stack moves every 10 ticks, and only what the volume accepts leaves the port.

storage import 5 store
storage import

storage import alone shows the routes. Use auto instead of a volume for the first volume with room, or off to stop. If the datacenter's chunk unloads, the items wait in the port and arrive when it is back.