Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| user:rion [2024/11/30 15:05] – created rion | user:rion [2026/10/05 12:04] (current) – rion | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | Work in progress on updated CRT guide... | + | ====== Storage Manager ====== |
| + | {{toc>}} | ||
| - | ====== | + | > Introduced in **Batocera |
| - | < | + | Batocera' |
| - | [[https:// | + | |
| + | USB drives, external hard drives, SSDs, SD cards, and additional internal drives can all be used. | ||
| + | |||
| + | < | ||
| + | The Storage Manager introduced in Batocera | ||
| + | |||
| + | Advanced network/ | ||
| </ | </ | ||
| + | {{wiki: | ||
| - | <WRAP center round info> | + | |
| - | This guide only applies to Batocera | + | ===== Overview ===== |
| + | |||
| + | | ||
| + | |||
| + | The Storage Manager can: | ||
| + | |||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | |||
| + | From the user's point of view, there is still only one ROM folder: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | Batocera handles | ||
| + | |||
| + | {{wiki:use_external_storage_storage_overview_diagram.png? | ||
| + | |||
| + | A simplified overview: | ||
| + | |||
| + | < | ||
| + | Internal ROMs | ||
| + | │ | ||
| + | Drive 1 /roms | ||
| + | │ | ||
| + | Drive 2 /roms | ||
| + | │ | ||
| + | MergerFS | ||
| + | │ | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | ===== Requirements ===== | ||
| + | |||
| + | For drives detected | ||
| + | |||
| + | < | ||
| + | roms | ||
| + | </ | ||
| + | |||
| + | Supported: | ||
| + | |||
| + | < | ||
| + | Drive | ||
| + | └── roms | ||
| + | ├── nes | ||
| + | ├── snes | ||
| + | └── psx | ||
| + | </ | ||
| + | |||
| + | Not supported: | ||
| + | |||
| + | < | ||
| + | Drive | ||
| + | └── Batocera | ||
| + | └── roms | ||
| + | </ | ||
| + | |||
| + | Not supported: | ||
| + | |||
| + | < | ||
| + | Drive | ||
| + | ├── nes | ||
| + | ├── snes | ||
| + | └── psx | ||
| + | </ | ||
| + | |||
| + | The Storage Manager user interface currently expects | ||
| + | |||
| + | <WRAP info> | ||
| + | This root-level folder requirement applies to automatic Storage Manager detection. Advanced manual MergerFS pools can use other mounted directory paths, including nested local folders and network shares. | ||
| </ | </ | ||
| - | Batocera has the capability | + | ==== Existing disk layout and filesystems ==== |
| + | |||
| + | Automatic Storage Manager detection is not limited | ||
| + | |||
| + | * A partitioned disk, where each partition | ||
| + | * A whole disk containing | ||
| + | |||
| + | In either case, automatic merging still requires | ||
| + | |||
| + | An existing partition | ||
| + | |||
| + | ===== Using Existing Drives ===== | ||
| + | |||
| + | |||
| + | |||
| + | When Batocera detects a mounted drive containing a compatible | ||
| + | |||
| + | {{wiki: | ||
| + | |||
| + | After accepting the prompt, Batocera adds the drive to the storage pool. | ||
| + | |||
| + | {{wiki: | ||
| + | |||
| + | After the merge completes, the ROMs stored on the drive become available alongside your existing collection. | ||
| + | |||
| + | ===== Formatting a New Drive ===== | ||
| + | |||
| + | |||
| + | |||
| + | If a blank drive is detected, Batocera can automatically prepare it for game storage. | ||
| + | |||
| + | {{wiki: | ||
| - | < | + | < |
| - | You can however use an active converter ([[# | + | Formatting |
| </ | </ | ||
| - | Recommended watching: | + | |
| - | * [[https:// | + | |
| - | Recommended reading: | + | Selecting |
| - | | + | |
| - | * [[https:// | + | |
| - | ===== Foreword ===== | + | {{wiki: |
| - | <WRAP center round alert> | + | Batocera will: |
| - | It should go without saying, but unlike digital signals, analogue signals and the devices that receive them tend not to have safety limitations | + | |
| + | * Format the drive | ||
| + | * Create a root-level '' | ||
| + | * Generate the standard ROM directory structure | ||
| + | * Merge the drive into the Storage Manager | ||
| + | * Refresh the game lists | ||
| + | |||
| + | {{wiki: | ||
| + | |||
| + | ==== Filesystem choices and what formatting does ==== | ||
| + | |||
| + | The Storage Manager delegates disk formatting to '' | ||
| + | |||
| + | <code> | ||
| + | ext4 | ||
| + | btrfs | ||
| + | exfat | ||
| + | </ | ||
| + | |||
| + | If no filesystem type is supplied to the backend, '' | ||
| + | |||
| + | <WRAP important> | ||
| + | Formatting operates on the **whole selected disk**, | ||
| </ | </ | ||
| - | This guide would not have been possible without | + | After formatting, Batocera creates |
| - | * jfroco's work to output Batocera on a CRTs. | + | |
| - | * rtissera's knowledge, enthusiasm and willingness to add 15 KHz patches. | + | |
| - | | + | |
| - | | + | |
| - | | + | |
| - | * dmanlcf' | + | |
| - | * Rion and Atari for compiling | + | |
| - | ===== Glossary ===== | + | Existing drives do not need to use one of the three formatting choices above if Batocera can already mount their filesystem. NTFS, for example, has explicit mount handling in the Storage Manager, but NTFS is not offered by '' |
| - | The field of analog signals and CRT-related standards is very complex and occasionally misleading. We won't dive into every aspect in this guide but we will explain some relevant terms here (sorted in alphabetical order) to avoid confusion. Feel free to come back to this section at any time throughout this guide: | + | For an existing NTFS filesystem, Storage Manager currently runs '' |
| - | * **Active converters** Little boxes that convert one signal to another. These use tiny computers with processors and RAM to process the image digitally and send it out the other side as appropriate. Generally undesirable, | + | The backend also independently refuses |
| - | * **BNC cables** These are standard aerial coaxial cords that can carry any analogue signal. For our purposes, they will be carrying an RGB video signal. There were not many consumer TVs that utilized this type of connection, but they were common with professional/ | + | |
| - | * **Component video cables** | + | |
| - | * **Composite signal** An // | + | |
| - | * **Composite video cable** The yellow cable. That's enough, you know what I'm talking about already.{{ hardware: | + | |
| - | * **DisplayPort** The modern digital video connection port, common on modern graphics cards. Compatible with both DP and HDMI signals. This port cannot be used to send a native analogue signals so it is not recommended for use with CRT, but this can be worked around | + | |
| - | * **DVI-I port** This is the 29 pin port in your graphics card, capable of analogue signals. You will typically find this port alongside the VGA port. Newer cards no longer include this port. It is of extreme importance | + | |
| - | * **EDID** Extended Display Identification Data (EDID) is a //digital// metadata signal used by display devices to describe their capabilities to a video source (in this case, your Batocera | + | |
| - | * **Horizontal scan rate** Usually expressed in kilohertz. This is the number of times per second that a horizontal line is drawn on a display, as opposed to vertical refresh rate which is the number of times per second that an entire screen of image data is displayed. | + | |
| - | * **Passive adapter/ | + | |
| - | * **RGB video signal** In this context, refers to the // | + | |
| - | * **SCART** This is the 21 pin port that superseded the standard composite video output. Popular in Europe and Japan, but not many other places. Carries both analog video and audio signals. Natively uses an RGB video signal, but is backwards compatible with YPbPr, composite and S-video signals.{{ hardware: | + | |
| - | * **S-video port** A slightly better version of composite video. This separated the color and luminance signals into two separate wires each, reducing color bleed and artifacts, but in practice the difference wasn't that significant. Common with DVD players, but not much else.{{ hardware: | + | |
| - | * **S-video signal** An // | + | |
| - | * **RF modulator** This is a device that can translate composite, component or RGB analogue signals into a radio frequency. This is required for CRT displays that only have an RF input. VCRs usually had one of these built-in to them, and make for a fine substitute.{{ hardware: | + | |
| - | * **Three-pole A/V composite cable** A more modern analogue signal cable which violates standards by running a video signal through a 3.5mm headphone jack splitting into RCA cables. This is specifically designed to be used in the Raspberry Pi in its composite video modes, and will not be compatible with other devices/ | + | |
| - | * **Transcoder** A device that can convert an RGB signal into an inferior signal like component/ | + | |
| - | * **Vertical refresh rate** The number you're probably more familiar with, typically measured in just hertz. This is the number of full frames drawn per second. Typically this is 60 Hz for all modern displays, but older CRTs were split between 60 Hz and 50 Hz depending on where you lived. | + | |
| - | * **VGA port** This is the 15 pin port ubiquitous with old computer video output and classroom projectors. It is important to note the distinction between a VGA signal and the DSUB connector used to carry that signal, as not all DSUB connectors actually send a VGA signal. Refer to this console-related [[http:// | + | |
| - | * **VGA signal** A unique hybrid // | + | |
| - | * **YPbPr video signal** A lower-bandwidth form of RGB, which has both the green and luminance channels on one wire. Used by component video cables, but can also be sent through a SCART connection. | + | |
| - | ===== Prerequisites | + | ===== Using Multiple Drives |
| - | To achieve a native analogue signal on your setup, the following elements are needed: | + | Multiple drives can be used simultaneously. |
| - | * A network connection (wired is preferred, | + | Example: |
| - | | + | |
| - | * A graphics card or integrated graphics with RGB analogue output | + | < |
| - | * **AMD**/**ATI** graphics cards with **VGA** or **DVI-I** ports (preferred, **Radeon HD 3000** series and up to **Radeon R5**/**R7**/**R9 300**), these cards are: | + | / |
| - | * **Radeon RX** up to the **300** series (excluding the **R9 390**) (**R9 380X** | + | / |
| - | * **Workstation** up to the **FirePro W5000** | + | </ |
| - | * **Nvidia** graphics cards with **VGA** or **DVI-I** ports (major flaws and limited to Super Resolutions, | + | |
| - | * **GTX** up to the **900** series | + | Batocera combines them into a single virtual library: |
| - | Cards older than the **GTX 600** series may not be supported by the official Nvidia drivers, though performance with 5th gen systems and below is adequate with the nouveau drivers. | + | |
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | Games can be distributed across multiple drives while still appearing | ||
| + | |||
| + | ===== Internal Drives ===== | ||
| + | |||
| + | The Storage Manager is not limited to removable USB devices. | ||
| + | |||
| + | Additional internal drives can also be used. | ||
| + | |||
| + | For example: | ||
| + | |||
| + | < | ||
| + | /media/roms1/roms | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | As long as the drive is mounted by Batocera | ||
| + | |||
| + | This includes: | ||
| + | |||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | | ||
| + | |||
| + | < | ||
| + | The drive name does not matter. What matters | ||
| </ | </ | ||
| - | * **Titan** cards up to the **Titan X** (but excluding **Titan X Pascal**) (**Titan X** is the most powerful card supporting analogue) | ||
| - | * **Quadro** cards up to the **Quadro K5200** | ||
| - | * **Nvidia** graphics card with **DisplayPort** (no native analog signal, requires disabling low-level driver limitations which are potentially dangerous, requires additional ratnest of cables): | ||
| - | * If opting to go this route, an active converter or the CableDeconn DP to VGA adapter will be required. In general, this is not recommended as it is not a native analogue signal. | ||
| - | * A transcoder will still be required. | ||
| - | * **AMD** APUs with **VGA** or **DVI-I** ports on the motherboard (hit or miss, highly dependent on hardware limitations, | ||
| - | * **Intel** integrated graphics with **VGA** or **DVI-I** ports on the motherboard (has some flaws and limitations, | ||
| - | * If using a TV/PVM/BVM with **SCART**/ | ||
| - | * If using a computer monitor with **VGA** input, simply a **VGA** cable | ||
| - | * If using a TV with **component**/ | ||
| - | * If using a TV that only has **RF** input, you will need a **composite** to **RF** modulator in addition to the transcoder | ||
| - | * A way to [[: | ||
| - | * A way to edit files over the network (for Windows, WinScp and Notepad++ work fine) | ||
| - | <WRAP center round tip> | + | ==== Automatic detection and safety filtering ==== |
| - | It is highly recommended using an external editor like [[http:// | + | |
| + | The Storage Manager backend watches the common Linux block-device families used by Batocera, including '' | ||
| + | |||
| + | Among other checks, the current implementation: | ||
| + | |||
| + | * Skips the disk backing '' | ||
| + | * Skips EFI System, Microsoft Reserved and Windows Recovery partition GUIDs | ||
| + | * Skips partitions marked hidden or no-automount | ||
| + | * Filters many Android/Qualcomm firmware and system partition labels | ||
| + | * Does not offer the automatic blank-disk format prompt | ||
| + | * Ignores swap partitions | ||
| + | * Skips local disks already claimed by UUID-based '' | ||
| + | |||
| + | These checks | ||
| + | |||
| + | <WRAP info> | ||
| + | Some of the protection checks intentionally | ||
| </ | </ | ||
| - | If any of that was confusing here' | + | ==== Ignoring |
| - | {{ hardware: | + | The Storage Manager backend supports an '' |
| - | ===== Component Transcoders ===== | + | If an ignored drive contains a root-level '' |
| - | Some appropriate VGA-to-component adapters: | + | The ignore entry is based on a persistent **whole-disk** identifier when one is available, rather than only on a temporary ''/ |
| - | RGB VGA to YPbPr Component transcoder/converter by linuxbot3000 | + | The current backend provides an '' |
| - | * [[https:// | + | ==== Mount-point naming ==== |
| - | * [[http:// | + | |
| - | {{hardware: | + | |
| - | GreenAntz RGB to component transcoder | + | For automatically mounted partitions, Storage Manager builds a mount point under ''/ |
| - | {{hardware: | + | <WRAP tip> |
| - | * [[http://forum.arcadecontrols.com/index.php/ | + | Use unique filesystem labels for ROM drives. The Storage Manager configuration stores branch paths such as '' |
| - | * [[https:// | + | </WRAP> |
| - | Retrotink RGB2COMP (Scart to Component) | + | ===== Safe Drive Removal ===== |
| - | {{hardware: | + | |
| - | * [[https:// | + | |
| - | RGBS VGA SCART to YPBPR Component Transcoder | + | Drives can be safely removed from: |
| - | + | ||
| - | {{hardware:rgbs_vga_scart_to_ypbpr_component_transcoder_1.jpg? | + | |
| - | {{hardware: | + | |
| - | * [[https:// | + | |
| - | <WRAP center round info> | + | * **Main Menu** |
| - | Color coding is a little different on this | + | * **System Settings** |
| - | * Green -> Pb | + | * **Eject an Extra Disk** |
| - | * Red -> Y | + | |
| - | * Blue -> Pr | + | {{wiki: |
| + | |||
| + | After selecting the drive, Batocera asks for confirmation before removing it from the storage pool. | ||
| + | |||
| + | {{wiki: | ||
| + | |||
| + | Batocera automatically updates the storage pool and refreshes the game lists. | ||
| + | |||
| + | {{wiki: | ||
| + | |||
| + | Games stored only on the removed drive will disappear from the library until that drive is connected and merged again. | ||
| + | |||
| + | The **Eject an Extra Disk** list is generated from branches saved in '' | ||
| + | |||
| + | <WRAP important> | ||
| + | Prefer the Storage Manager eject action over physically unplugging a drive while Batocera is running. The backend has cleanup logic for an unexpected removal, but active writes cannot be made safe after the device has already disappeared. | ||
| </ | </ | ||
| - | RGBS / SCART to YCBCR / YPBPR / S-Video converter adapter | + | ==== Missing at boot, safe eject, and live unplug are different ==== |
| - | {{hardware: | + | The Storage Manager keeps configured branches in '' |
| - | Convert VGA to Scart cable to YCBCR & S-Video | + | |
| - | * [[https:// | + | |
| - | Can also be found by searching AliExpress for "SCART RGBS to YUV YCBCR Video Converter" | + | |
| - | ===== Composite/S-Video Transcoders ===== | + | By contrast, using **Eject an Extra Disk** removes that branch from '' |
| - | If you need composite/ | + | This distinction is useful for systems where a configured drive is sometimes powered off before Batocera boots. Leaving it configured but absent at boot is different from explicitly ejecting it. |
| - | * [[https:// | + | |
| - | {{hardware: | + | |
| - | RGB to Composite & S-Video Ver2.0 | + | ===== What Gets Merged? ===== |
| - | {{hardware:rgb-2yc_1.jpg? | + | The graphical Storage Manager merges only the ROM library: |
| - | * [[https://www.axunworks.com/product-p341706.html]] | + | < |
| + | /userdata/roms | ||
| + | </code> | ||
| - | ===== DisplayPort to VGA DAC ===== | + | Folders such as: |
| - | If you only have a DP connection, use the CableDeconn DP to VGA adapter before sending the signal to the transcoder of your choice: | + | < |
| - | * [[http://www.cabledeconn.com/CABLEDECONN-Multi-Function-Displayport-Dp-to-HDMIDVIVGA-Male-to-Female-3-in-1-Adapter-Converter-Cable---M0401_show83.html|Link to official website]] | + | /userdata/bios |
| - | * [[https://www.amazon.com/CableDeconn-Multi-Function-Displayport-Adapter-Converter/dp/B0192Y9XSE|Link to Amazon' | + | /userdata/ |
| - | {{: | + | /userdata/screenshots |
| + | /userdata/themes | ||
| + | /userdata/ | ||
| + | </ | ||
| - | <WRAP center round info> | + | remain on internal storage. |
| - | If you are in a situation where you must use an active adapter, the CableDeconn DP to VGA adapter is one of the best options. It uses a repurposed Realtek RTD 2168 audio chip for its conversion, which doesn't rely on an oscillating crystal (no out-of-sync timing | + | |
| + | The graphical Storage Manager does not merge BIOS files, save files, screenshots, | ||
| + | |||
| + | Advanced manual MergerFS pools are separate from the graphical Storage Manager and can technically target other directories, | ||
| + | |||
| + | ===== Internal ROM Preservation ===== | ||
| + | |||
| + | When the first additional ROM drive is merged, Batocera preserves the existing internal ROM collection. | ||
| + | |||
| + | Internally, existing ROMs stored in: | ||
| + | |||
| + | <code> | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | are moved into: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | This allows internal ROMs to remain visible alongside ROMs stored on merged drives. | ||
| + | |||
| + | If all merged drives | ||
| + | |||
| + | During restoration, the current implementation uses '' | ||
| + | |||
| + | ===== Limitations ===== | ||
| + | |||
| + | Automatic detection by the graphical Storage Manager currently requires this layout: | ||
| + | |||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | |||
| + | Nested ROM folders are not detected automatically. | ||
| + | |||
| + | Example: | ||
| + | |||
| + | < | ||
| + | < | ||
| + | </ | ||
| + | |||
| + | is not automatically merged. | ||
| + | |||
| + | This limitation does not apply to advanced manual MergerFS branches, where an explicit nested path can be configured. | ||
| + | |||
| + | The graphical Storage Manager merges only the ROM library. Other userdata folders remain independent unless they are configured separately using advanced manual storage methods. | ||
| + | |||
| + | <WRAP tip> | ||
| + | For most users adding locally attached USB drives, SSDs, hard drives or SD cards, the Storage Manager sections above are all that is needed. | ||
| + | |||
| + | The remaining sections are for advanced setups, manual storage configuration, | ||
| </ | </ | ||
| - | ===== USB-C to VGA DAC ===== | + | ===== Other Storage Methods (Advanced) |
| - | If you only have a USB-C connection, use the StartTech.com USB type C to VGA, 3m, CDP2VGA3MBNL (Note: this 3m cable has the RTD2166 chip. Shorter versions of the same brand use a different chip that may not be compatible) before sending the signal to the transcoder of your choice: | + | Batocera |
| - | * [[https:// | + | |
| - | * [[https:// | + | |
| - | {{: | + | |
| - | < | + | ^ Method ^ Best used for ^ What it does ^ |
| - | If you are in a situation where you must use an active adapter and only have a USB type C connection | + | | **Storage Manager** | Multiple locally attached ROM drives | Builds a MergerFS union at ''/ |
| + | | **sharedevice=DEV / ANYEXTERNAL** | Moving all userdata to one selected device, or to the first suitable external device | Mounts another device as the active userdata storage | | ||
| + | | **sharedevice=DEVICES** | Mounting selected local partitions or subdirectories over specific userdata folders | Bind-mounts selected local storage over individual targets such as ROMS, SAVES or BIOS | | ||
| + | | **sharedevice=NETWORK** | Replacing all or selected userdata folders with SMB/NFS shares | Mounts network storage directly on the requested userdata paths | | ||
| + | | **Manual S12mergerfs pool** | Combining local folders and network/NAS folders in one union | Builds an advanced MergerFS pool from explicitly configured branches | | ||
| + | |||
| + | < | ||
| + | If the goal is simply to add a second, third or fourth locally attached ROM drive, | ||
| </ | </ | ||
| - | ===== Connecting | + | ===== Network/NAS Storage (Advanced) ===== |
| + | |||
| + | <WRAP important> | ||
| + | This section is **not required for normal Storage Manager use**. If all ROM drives are attached locally, use the graphical Storage Manager described above. | ||
| + | </ | ||
| + | |||
| + | The graphical Storage Manager currently focuses on locally attached storage devices. Batocera also includes a separate boot-time MergerFS service that can build manual pools from local storage, removable media and already-mounted network shares. | ||
| + | |||
| + | This makes it possible | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | <WRAP important> | ||
| + | Manual MergerFS pools are an advanced configuration and are not managed by the Storage Manager user interface. If you create a manual pool for ''/ | ||
| + | </ | ||
| + | |||
| + | ==== Manual MergerFS Syntax | ||
| + | |||
| + | Manual pools are configured in: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | The basic syntax is: | ||
| + | |||
| + | < | ||
| + | mergerfs=< | ||
| + | </ | ||
| + | |||
| + | For example: | ||
| + | |||
| + | < | ||
| + | mergerfs=/ | ||
| + | </ | ||
| + | |||
| + | The path before the '' | ||
| + | |||
| + | Unlike automatic Storage Manager detection, manual branches do not need to use a root-level '' | ||
| + | |||
| + | The manual service accepts more than one pool. Keys beginning with '' | ||
| + | |||
| + | < | ||
| + | mergerfs=/ | ||
| + | mergerfs_bios=/ | ||
| + | </ | ||
| + | |||
| + | <WRAP important> | ||
| + | The manual parser uses '' | ||
| + | </ | ||
| + | |||
| + | The graphical Storage Manager key is '' | ||
| + | |||
| + | ==== Mounting a NAS Before the Pool Is Created ==== | ||
| + | |||
| + | The manual MergerFS service supports '' | ||
| + | |||
| + | Example using an SMB/CIFS guest share: | ||
| + | |||
| + | < | ||
| + | sharewait=30 | ||
| + | premerge1=mkdir -p /media/NAS && mount.cifs // | ||
| + | mergerfs=/ | ||
| + | </ | ||
| + | |||
| + | In this example: | ||
| + | |||
| + | * '' | ||
| + | * '' | ||
| + | * ''/ | ||
| + | * '' | ||
| + | |||
| + | <WRAP info> | ||
| + | The example above uses a guest SMB share for simplicity. Password-protected SMB shares and NFS mounts can also be mounted with normal Linux mount options before being included as a MergerFS branch. See the Batocera NAS documentation for the existing SMB/NFS syntax and network-storage guidance. | ||
| + | </ | ||
| + | |||
| + | Multiple '' | ||
| + | |||
| + | If '' | ||
| + | |||
| + | <WRAP important> | ||
| + | If a '' | ||
| + | |||
| + | This matters especially when the local mount-point directory already exists. If the network mount failed but a branch path still exists locally, MergerFS can see the local directory rather than the NAS. Marking a network branch '' | ||
| + | </ | ||
| + | |||
| + | <WRAP warning> | ||
| + | '' | ||
| + | </ | ||
| + | |||
| + | '' | ||
| + | |||
| + | ==== Branch Access Modes ==== | ||
| + | |||
| + | The manual MergerFS service accepts branch suffixes such as: | ||
| + | |||
| + | < | ||
| + | =RO | ||
| + | =RW | ||
| + | =NC | ||
| + | </ | ||
| + | |||
| + | * '' | ||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | For example: | ||
| + | |||
| + | < | ||
| + | mergerfs=/ | ||
| + | </ | ||
| + | |||
| + | allows ROMs on both branches to appear under ''/ | ||
| + | |||
| + | ==== Manual Pool File Placement ==== | ||
| + | |||
| + | The boot-time manual MergerFS service currently uses: | ||
| + | |||
| + | < | ||
| + | category.create=mfs | ||
| + | moveonenospc=true | ||
| + | minfreespace=4G | ||
| + | </ | ||
| + | |||
| + | '' | ||
| + | |||
| + | The complete option set currently passed by '' | ||
| + | |||
| + | < | ||
| + | cache.files=off | ||
| + | dropcacheonclose=false | ||
| + | category.create=mfs | ||
| + | allow_other | ||
| + | use_ino | ||
| + | moveonenospc=true | ||
| + | minfreespace=4G | ||
| + | xattr=passthrough | ||
| + | </ | ||
| + | |||
| + | When a manual pool is created, Batocera also creates a hidden local base directory derived from the pool path. For a pool at: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | the hidden base is: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | Existing files from the original pool directory are moved into this hidden base before the MergerFS mount is created. The base is then added to the pool with '' | ||
| + | |||
| + | The script also **attempts** to remount the hidden base read-only before starting MergerFS, but that command explicitly ignores failure. Do not rely on the underlying hidden base being read-only. The dependable MergerFS-side rule in the command line is '' | ||
| + | |||
| + | The service derives this hidden base path from the final component of the pool path. There is an implementation quirk worth knowing about: the manual pool **key** parser permits digits 0 through 9, but the current hidden-base derivation expression only accepts letters, '' | ||
| + | |||
| + | <WRAP important> | ||
| + | The manual '' | ||
| + | </ | ||
| + | |||
| + | <WRAP warning> | ||
| + | There is also a source-level limitation in the current '' | ||
| + | </ | ||
| + | |||
| + | ==== Relationship to sharedevice=NETWORK and sharedevice=DEVICES ==== | ||
| + | |||
| + | The existing '' | ||
| + | |||
| + | * '' | ||
| + | * '' | ||
| + | * The normal share service recognizes targets including '' | ||
| + | * '' | ||
| + | * '' | ||
| + | |||
| + | '' | ||
| + | |||
| + | The Storage Manager also deliberately skips local disks that are already referenced by UUID through manual '' | ||
| + | |||
| + | The normal '' | ||
| + | |||
| + | ==== Boot ordering and delayed Storage Manager detection ==== | ||
| + | |||
| + | Storage devices can appear very early during boot, before ''/ | ||
| + | |||
| + | At the end of '' | ||
| + | |||
| + | * Replays Storage Manager device events that were delayed until the share layer became ready | ||
| + | * Checks for ''/ | ||
| + | * Creates ''/ | ||
| + | |||
| + | This explains why an already-configured ROM drive detected during early boot can be queued first and only joined to the live pool after the base ''/ | ||
| + | |||
| + | ===== Advanced Technical Details ===== | ||
| + | |||
| + | ==== Graphical Storage Manager Pool ==== | ||
| + | |||
| + | Batocera' | ||
| + | |||
| + | The merged library is presented at: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | Internally, Batocera maintains a storage pool containing: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | plus any merged ROM folders. | ||
| + | |||
| + | Example: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | These locations are combined into: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | ==== Graphical Storage Manager File Placement Policy ==== | ||
| + | |||
| + | The graphical Storage Manager currently uses these base MergerFS options: | ||
| + | |||
| + | < | ||
| + | cache.files=partial | ||
| + | dropcacheonclose=true | ||
| + | category.create=eplfs | ||
| + | allow_other | ||
| + | inodecalc=path-hash | ||
| + | moveonenospc=true | ||
| + | minfreespace=4G | ||
| + | </ | ||
| + | |||
| + | When the '' | ||
| + | |||
| + | **eplfs** means: | ||
| + | |||
| + | < | ||
| + | Existing Path, Least Free Space | ||
| + | </ | ||
| + | |||
| + | When writing a new file: | ||
| + | |||
| + | * MergerFS looks for branches where the target folder already exists | ||
| + | * Among those branches, the branch with the least free space is preferred | ||
| + | * Branches with less than 4 GB free are ignored | ||
| + | * If a drive becomes full during a write operation, the file can automatically move to another branch | ||
| + | |||
| + | Example: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | A new ROM copied into: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | would be stored on: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | because it has the least free space while still meeting the minimum free space requirement. | ||
| + | |||
| + | The internal '' | ||
| + | |||
| + | Because '' | ||
| + | |||
| + | <WRAP important> | ||
| + | The MergerFS implementation and file placement policy may change between Batocera releases. The '' | ||
| + | </ | ||
| + | |||
| + | ==== Important MergerFS behavior ==== | ||
| + | |||
| + | MergerFS combines directory trees. It does not stripe or split one ROM file across multiple drives. The free space shown for a pool can therefore be larger than the space available for any one file on an eligible branch. Path-preserving policies, branch modes and '' | ||
| + | |||
| + | '' | ||
| + | |||
| + | Avoid keeping duplicate files at the exact same relative path on multiple branches. MergerFS deduplicates directory entries, and its default search/ | ||
| + | |||
| + | It is possible to access the underlying branch directories directly, for example under ''/ | ||
| + | |||
| + | ===== Troubleshooting and Diagnostics ===== | ||
| + | |||
| + | The main **graphical Storage Manager backend** log is: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | The manual '' | ||
| + | |||
| + | Useful read-only checks from SSH include: | ||
| + | |||
| + | < | ||
| + | batocera-settings-get -f / | ||
| + | batocera-storage-manager list_ejectable | ||
| + | batocera-storage-manager list_disks | ||
| + | batocera-storage-manager list_fstypes | ||
| + | findmnt / | ||
| + | mount | grep mergerfs | ||
| + | </ | ||
| + | |||
| + | Storage Manager communicates with EmulationStation through its local HTTP API for merge/ | ||
| + | |||
| + | For the older '' | ||
| + | |||
| + | < | ||
| + | / | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | If a manual NAS-backed '' | ||
| + | |||
| + | ===== Frequently Asked Questions ===== | ||
| + | |||
| + | ==== Can I use internal drives? ==== | ||
| + | |||
| + | Yes. Any drive mounted by Batocera containing a root-level '' | ||
| + | |||
| + | Example: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | ==== Which filesystems can Storage Manager format? ==== | ||
| + | |||
| + | The implementation documented here exposes: | ||
| + | |||
| + | < | ||
| + | ext4 | ||
| + | btrfs | ||
| + | exfat | ||
| + | </ | ||
| + | |||
| + | Existing drives may use other filesystems if Batocera can mount them. NTFS is explicitly handled for existing drives, but it is not one of the Storage Manager format targets. | ||
| + | |||
| + | ==== Why does a small blank drive not produce a format prompt? ==== | ||
| + | |||
| + | The current safety logic suppresses the automatic blank-disk format prompt for disks of 4 GiB or smaller. This is intended to avoid accidentally offering small firmware/ | ||
| + | |||
| + | ==== Can I stop Storage Manager from trying to use a particular drive? ==== | ||
| + | |||
| + | Yes. The backend supports an '' | ||
| + | |||
| + | ==== How do I remove a drive from the ignore list? ==== | ||
| + | |||
| + | The current backend has an '' | ||
| + | |||
| + | ==== What if a configured drive is missing when Batocera boots? ==== | ||
| + | |||
| + | A missing configured branch is skipped from the live pool during refresh, but its saved '' | ||
| + | |||
| + | ==== Can I use a network drive or NAS in the same ROM pool? ==== | ||
| + | |||
| + | Yes, but not through the graphical Storage Manager interface. | ||
| + | |||
| + | Advanced users can mount a network share with a '' | ||
| + | |||
| + | For example: | ||
| + | |||
| + | < | ||
| + | premerge1=mkdir -p /media/NAS && mount.cifs // | ||
| + | mergerfs=/ | ||
| + | </ | ||
| + | |||
| + | See [[# | ||
| + | |||
| + | ==== What happens if I unplug a merged drive? ==== | ||
| + | |||
| + | Batocera updates the storage pool and refreshes the game lists. | ||
| + | |||
| + | Games stored only on the disconnected drive will temporarily disappear until the drive is connected again. | ||
| + | |||
| + | ==== Are BIOS files merged? ==== | ||
| + | |||
| + | Not by the graphical Storage Manager. It only manages the ROM pool at: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | BIOS files normally remain stored in: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | Advanced users can separately mount or union BIOS storage with '' | ||
| + | |||
| + | ==== Are saves merged? ==== | ||
| + | |||
| + | Not by the graphical Storage Manager. Save files remain in the normal userdata location, for example: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | Advanced '' | ||
| + | |||
| + | ==== Can I store ROMs in a different folder? ==== | ||
| + | |||
| + | For automatic detection through the graphical Storage Manager, no. It currently expects a root-level folder named: | ||
| + | |||
| + | < | ||
| + | roms | ||
| + | </ | ||
| + | |||
| + | For an advanced manual MergerFS pool, yes. The branch can point to an explicitly configured nested directory, for example: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | ==== Does the drive name matter? ==== | ||
| + | |||
| + | No. | ||
| + | |||
| + | For example, both of these are valid if they contain a root-level '' | ||
| + | |||
| + | < | ||
| + | / | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | ===== References ===== | ||
| + | |||
| + | * Batocera TV - '' | ||
| + | * Storage Manager demonstration: | ||
| + | * https:// | ||
| + | |||
| + | * Batocera Storage Manager source code: | ||
| + | * https:// | ||
| + | |||
| + | * Batocera manual MergerFS boot service: | ||
| + | * https:// | ||
| + | * Source snapshot used for the original NAS/ | ||
| + | * https:// | ||
| + | |||
| + | * Batocera share service (NETWORK / DEVICES): | ||
| + | * https:// | ||
| + | |||
| + | * Batocera disk formatter: | ||
| + | * https:// | ||
| - | The first step is to safely connect your Batocera computer to the CRT display itself. If using a VGA connection with a EDID CRT monitor, it is as simple as connecting the display, turning it on and then turning the Batocera machine on. Keep reading this section for all other displays. If your CRT monitor does not send an EDID (the standard was introduced in 1994, so monitors manufactured before then **do not have EDID**), then you should still follow the following instructions just to be safe. | + | |
| + | | ||
| - | <WRAP center round important> | + | * Batocera NAS documentation: |
| - | During the boot process and resizing of the partition it will boot up in a non-supported resolution. Keep the CRT TV off for the moment or on another AV channel so it doesn' | + | * https://wiki.batocera.org/ |
| - | Also keep in mind that during the BIOS boot process the same rule applies. Have the CRT TV off or on another input when first booting up.</WRAP> | + | * Batocera external storage documentation: |
| + | * https:// | ||
| - | **To solve this we have 4 options:** | + | |
| - | * Do the aforementioned, | + | * https://batocera.org/changelog |
| - | * Have a look at gambaman' | + | |
| - | * Use buttersoft' | + | |
| - | * Flash you AMD/ATI card with [[http:// | + | |
| - | Once everything is safe, you can turn on your Batocera machine. If you'd like to edit files using the Batocera machine itself, you can hook up a secondary digital display in the meantime. If you have multiple ports and use another port, then you'll not be able to do this once you disable the other port outputs in the upcoming section. If you have a modern digital display that can handle older standard signals over older standards cables without blowing up (such as a LCD monitor with both HDMI and VGA ports), you can use that in place of your CRT until everything is configured correctly for it. | ||
- user/rion.1732979125.txt.gz
- Last modified: 23 months ago
- by rion