Bundle - TetraSource/OC-programs GitHub Wiki

Bundle

About

Bundle is a rc script that virtually merges multiple filesystem components into a bigger one. You can use it whenever a RAID full of tier 3 HDDs isn't enough for your needs.

Usage

First, install the script at the directory for rc scripts (/etc/rc.d/bundle.lua with OpenOS). Then open it and configure the constants in accordance with their description. Then you should add some filesystems by the command

rc bundle add [address]

whereby [address] is the address of the desired filesystem. Note that doing so wipes the added filesystem! Bundle never incorporates filesystems automatically, though. Now it's time to activate Bundle by the command

rc bundle enable

and reboot the computer. You can check whether it worked with the df command. It should be listed now. Note, however, that all filesystems used by Bundle are there, too. Don't use them anyway. Besides, the label of the filesystem provided by Bundle and the first one added are always equal since that's the way how bundle stores it.

You can view the added filesystems by the command

rc bundle list

Added filesystem can also be removed by

rc bundle remove [forcefully]

which removes the last added filesystem. If the removal causes the lose of data, this fails except you set [forcefully] to true.

Usage notes

  • Don't install the OS of the computer on a filesystem provided by Bundle as Bundle requires some functions of OpenOS.
  • Bundle uses a virtual copy of the file structure. On the one hand this makes "hardware" operations faster, on the other hand it might lead to errors when running out of memory.
  • Bundle works with Lua 5.2 as well as Lua 5.3.

Known bugs

  • Seek operations that set the current position to a value that is bigger than the size of the file cause the file the become bigger than its actual physical size. This is also the case on filesystem components of Open Computers but with bundle it might cause internal errors.