Skip to content

Storage

Dan Mons edited this page Jan 9, 2022 · 3 revisions

Storage

External vs internal

If installed on a Raspberry Pi on a MicroSD card, RetroNAS can simply export a folder directly.

Optionally, external storage can be connected. Most Raspberry Pi devices have spare USB ports that storage can be plugged in to (please see the notes in Supported hardware about USB2 vs USB3 performance). Raspberry Pi 4 devices can have the OS installed on a USB thumbdrive and an SD card used as separate storage, or even network booted.

Advanced users can mount external network storage, and then re-export that via RetroNAS. Useful to use your RetroNAS device as a "storage proxy" between your old/vintage/retro computers and consoles, and your modern NAS or desktop computer, without needing to invest in new storage.

Configuring and using external storage

See the Cockpit page for tools on how to attach external storage, wipe, format and mount it for use with RetroNAS services.

Power

Note that there are strict limits on the amount of power that Raspberry Pi devices can send out of their USB ports. The most modern of the devices, the Raspberry Pi 4B, can only send 1.2A across all 4 of its USB ports combined (2x USB2, 2x USB3, shared with any other devices plugged in such as mice and keyboards).

This can have some dire effects on certain types of storage. Older SSD drives when plugged in via a USB3-to-SATA adaptor with no extra power input can sometimes see device resets if they attempt to draw too much power, causing storage dropouts.

Where possible, if RetroNAS is being used for larger storage options, externally powered storage is recommended. Some devices are supplied with USB cable splitters that allow one USB plug for data and one for power. These can be plugged into external USB power supplies (phone chargers, etc) to reduce strain on your RPi.

Smaller devices like USB thumb drives are often fine. Finding one that is true USB3 is often quite acceptable for both speed and power draw in a Raspberry Pi 4.

For 3.5" spindle based drives, definitely invest in models that offer external power. These require 12V which the Raspberry Pi cannot supply via USB. However with 2 of these plugged in via the RPi 4B's USB3 ports, even as a RAID1/mirrored device (either via MDRAID, LVM or BtrFS), these will work perfectly fine with external power.

Size

Disk size limits are more dependent on either the legacy system connecting to your RetroNAS, or the file systems you choose to use.

Selected file systems have the following limits:

  • FAT16: 4 Gigabytes
  • FAT32: 2 Terabytes / 2,000 Gigabytes
  • NTFS: 8 Petabytes / 8,000 Terabytes / 8 Million Gigabytes
  • ext4: 1 Exabyte / 1,000 Petabytes / 1 Million Terabytes / 1 Billion Gigabytes
  • XFS: 8 Extabytes / 8,000 Petabytes / 8 Million Terabytes / 8 Billion Gigabytes
  • BtrFS: 16 Exabytes / 16,000 Petabytes / 16 Million Terabytes / 16 Billion Gigabytes

Note that you don't have to limit your device size, merely the partition / logical volume size. A larger disk can use partitioning or logical volume management (using Cockpit if you need a graphical method) into either a single smaller partition/volume, or several partitions/volumes should you wish.

You can also mix and match file systems on different partitions or logical volumes. For example, if you want to run EtherDFS which requires a FAT based filesystem, as well as other operating systems via Samba, Netatalk, FTP, etc, and have those on another partition/volume. Use Cockpit to split up your storage, mount a normal ext4 (or other Linux-native) file system as your top level directory, and the /dos directory below that as your FAT based volume exported by EtherDFS (but still able to be accessed by the other protocols from the top level down).

RAID

RetroNAS is built on Linux, and offers several advanced RAID (Redundant Array of Inexpensive/Independent Disks) options. These include:

  • LVM - Logical Volume Manager, including a disk mirroring option
  • MDRAID - Linux's native MD (Multi-Device) software RAID, which offers standard RAID 0/1/5/6/10 options
  • BtrFS - A new advanced file system with more modern file chunking and mirroring options

More documentation will be added for these into the future.

Advanced next-gen filesystems

RetroNAS supports BtrFS, an advanced Linux filesystem that offers very interesting options including

  • Inline compression - transparent (invisible to the host) lzo, zlib and zstd compression (only compressing files where necessary/possible)
  • CoW - Copy on Write, allowing snapshots and zero-byte instant copies of large files
  • Deduplication - Detecting similar chunks of data within files, and removing duplicate copies to save even more space than compression
  • Redundancy - similar to RAID options, however with more modern checking and verification options
  • Multi-device - use any combination of mis-matching devices to combine into a larger or redundant device
  • Block level checksums - mathematical fingerprinting, verification (and optional automatic repair) of every chunk of data read and written
  • Automatic optimisations for spindle or SSD drives

More documentation will be added for BtrFS into the future.

Home

Getting started:

Contributing

Multi-system protocols:

Specific system configurations:

Services:

Tools:

Physical Media:

On-Device Management:

Advanced storage options:

  • BtrFS RAID, Snapshots, Compression, Deduplication
  • FAT Advanced guide to using FAT loopback mounts for EtherDFS
  • TBA
    • SMR Shingled Magnetic Recording hard drives (TBA)
    • NTFS Advanced guide for NTFS formatted disks
    • SMB Loopback Mounting an existing SMB NAS
    • NFS Loopback Mounting an existing NFS NAS
    • MDRAID (TBA)
    • LVM (TBA)
    • iSCSI Configuring iSCSI

Other:

Clone this wiki locally