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:15] – 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: | ||
| + | |||
| + | |||
| + | ===== Overview ===== | ||
| + | |||
| + | | ||
| + | |||
| + | The Storage Manager can: | ||
| + | |||
| + | * Detect compatible storage devices automatically | ||
| + | * Merge existing ROM drives | ||
| + | * Format and prepare new drives | ||
| + | * Use multiple drives simultaneously | ||
| + | * Present all ROMs as a single library under ''/ | ||
| + | * Safely eject drives | ||
| + | * Automatically refresh game lists | ||
| + | |||
| + | From the user's point of view, there is still only one ROM folder: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | Batocera handles the storage pool in the background. | ||
| + | |||
| + | {{wiki: | ||
| + | |||
| + | A simplified overview: | ||
| + | |||
| + | < | ||
| + | Internal ROMs | ||
| + | │ | ||
| + | Drive 1 /roms | ||
| + | │ | ||
| + | Drive 2 /roms | ||
| + | │ | ||
| + | MergerFS | ||
| + | │ | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | ===== Requirements ===== | ||
| + | |||
| + | For drives detected and managed automatically by the Storage Manager user interface, the drive must contain a root-level folder named: | ||
| + | |||
| + | < | ||
| + | roms | ||
| + | </ | ||
| + | |||
| + | Supported: | ||
| + | |||
| + | < | ||
| + | Drive | ||
| + | └── roms | ||
| + | ├── nes | ||
| + | ├── snes | ||
| + | └── psx | ||
| + | </ | ||
| + | |||
| + | Not supported: | ||
| + | |||
| + | < | ||
| + | Drive | ||
| + | └── Batocera | ||
| + | └── roms | ||
| + | </ | ||
| + | |||
| + | Not supported: | ||
| + | |||
| + | < | ||
| + | Drive | ||
| + | ├── nes | ||
| + | ├── snes | ||
| + | └── psx | ||
| + | </ | ||
| - | Batocera has the capability | + | The Storage Manager user interface currently expects |
| - | < | + | < |
| - | You can however | + | 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 |
| </ | </ | ||
| - | Recommended watching: | + | ==== Existing disk layout |
| - | * [[https:// | + | |
| - | Recommended reading: | + | Automatic Storage Manager detection is not limited |
| - | * [[https:// | + | |
| - | * [[https:// | + | |
| - | ===== Foreword ===== | + | * A partitioned disk, where each partition is detected and mounted separately |
| + | * A whole disk containing a filesystem directly, with no partition table, which can be mounted as a raw filesystem | ||
| - | <WRAP center round alert> | + | In either case, automatic merging still requires a '' |
| - | It should go without saying, but unlike digital signals, analogue signals and the devices | + | |
| + | An existing partition | ||
| + | |||
| + | ===== Using Existing Drives ===== | ||
| + | |||
| + | |||
| + | |||
| + | When Batocera detects a mounted drive containing a compatible root-level '' | ||
| + | |||
| + | {{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 | ||
| + | |||
| + | ===== Formatting a New Drive ===== | ||
| + | |||
| + | |||
| + | |||
| + | If a blank drive is detected, Batocera can automatically prepare it for game storage. | ||
| + | |||
| + | {{wiki: | ||
| + | |||
| + | <WRAP important> | ||
| + | Formatting a drive will permanently erase all existing data stored on that drive. Make sure any important files have been backed up before proceeding. | ||
| </ | </ | ||
| - | This guide would not have been possible without the following people to name a few: | + | |
| - | * jfroco' | + | |
| - | * rtissera' | + | |
| - | * Calamity for his knowledge, drivers, tools, GroovyMame, Switchres, etc. | + | |
| - | * Substring' | + | |
| - | * D0023R Doozer' | + | |
| - | * dmanlcf' | + | |
| - | * Rion and Atari for compiling this guide. | + | |
| - | ===== Glossary ===== | + | Selecting **Format & Merge** will format the drive and add it to the Storage Manager. |
| - | 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: | + | {{wiki: |
| - | * **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, | + | Batocera will: |
| - | * **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** The three red blue green cable connection. Not to be confused with the similarly spelled composite cable, as it uses three cables instead of one. Not to be confused with RGB signal, as this uses a YPbPr signal. Them being colored red blue and green is purely coincidental and not related to RGB at all.{{ hardware: | + | |
| - | * **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 if you have the right equipment as explained further on in the guide. | + | |
| - | * **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 to not confuse this with the identical-looking DVI-**D** port, which is only capable of digital signals. The DVI-I port has additional pins above and below the flat tongue, whereas DVI-D doesn' | + | |
| - | * **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 computer). Modern digital displays all have this, and Batocera uses that to automatically switch to a compatible resolution. Certain VGA-compatible CRT monitors also use this, but not all of them. This standard was introduced in 1994, so monitors manufactured before then do **not** have EDID. | + | |
| - | * **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 ===== | + | * Format the drive |
| + | * Create a root-level '' | ||
| + | * Generate the standard ROM directory structure | ||
| + | * Merge the drive into the Storage Manager | ||
| + | * Refresh the game lists | ||
| - | To achieve a native analogue signal on your setup, the following elements are needed: | + | {{wiki:use_external_storage_formatting_drive.png? |
| - | * A network connection (wired is preferred, as it needs no configuration) | + | ==== Filesystem choices and what formatting does ==== |
| - | * For x86_64: | + | |
| - | * A graphics card or integrated graphics with RGB analogue output | + | The Storage Manager delegates disk formatting to '' |
| - | * **AMD**/ | + | |
| - | * **Radeon RX** up to the **300** series (excluding the **R9 390**) (**R9 380X** is the newest and most powerful AMD card supporting analogue) | + | < |
| - | * **Workstation** up to the **FirePro W5000** | + | ext4 |
| - | * **Nvidia** graphics cards with **VGA** or **DVI-I** ports (major flaws and limited to Super Resolutions, | + | btrfs |
| - | * **GTX** up to the **900** series cards (**980** | + | exfat |
| - | Cards older than the **GTX 600** series may not be supported by the official Nvidia drivers, though performance with 5th gen systems | + | </ |
| + | |||
| + | If no filesystem type is supplied | ||
| + | |||
| + | < | ||
| + | Formatting operates on the **whole selected disk**, not only on an existing partition. Batocera erases the beginning of the disk, creates a new GPT partition table, creates one partition using the disk, formats it, and labels | ||
| </ | </ | ||
| - | * **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> | + | After formatting, Batocera creates the root-level '' |
| - | It is highly recommended using an external editor like [[http:// | + | |
| + | 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 '' | ||
| + | |||
| + | For an existing NTFS filesystem, Storage Manager currently runs '' | ||
| + | |||
| + | The backend also independently refuses a format request if the selected device resolves to Batocera' | ||
| + | |||
| + | ===== Using Multiple Drives ===== | ||
| + | |||
| + | Multiple drives can be used simultaneously. | ||
| + | |||
| + | Example: | ||
| + | |||
| + | < | ||
| + | /media/roms1/roms | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | Batocera combines them into a single virtual library: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | Games can be distributed across multiple drives while still appearing | ||
| + | |||
| + | ===== Internal Drives ===== | ||
| + | |||
| + | The Storage Manager is not limited | ||
| + | |||
| + | Additional internal drives can also be used. | ||
| + | |||
| + | For example: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | As long as the drive is mounted by Batocera | ||
| + | |||
| + | This includes: | ||
| + | |||
| + | * SATA hard drives | ||
| + | * SATA SSDs | ||
| + | * NVMe SSDs | ||
| + | * USB storage devices | ||
| + | * SD cards | ||
| + | |||
| + | <WRAP info> | ||
| + | The drive name does not matter. What matters is that the mounted drive contains a root-level '' | ||
| </ | </ | ||
| - | If any of that was confusing here's a professional-grade flowchart explaining what is required for each type of display (on PC): | + | ==== Automatic detection and safety filtering ==== |
| - | {{ hardware: | + | The Storage Manager backend watches the common Linux block-device families used by Batocera, including '' |
| - | ===== Component Transcoders ===== | + | Among other checks, the current implementation: |
| - | Some appropriate VGA-to-component adapters: | + | * Skips the disk backing ''/ |
| + | * Skips EFI System, Microsoft Reserved and Windows Recovery partition GUIDs | ||
| + | * Skips partitions marked hidden or no-automount | ||
| + | * Filters many Android/ | ||
| + | * Does not offer the automatic blank-disk format prompt for disks of 4 GiB or smaller | ||
| + | * Ignores swap partitions | ||
| + | * Skips local disks already claimed by UUID-based '' | ||
| - | RGB VGA to YPbPr Component transcoder/ | + | These checks are safeguards, not a substitute for verifying the disk shown by a format prompt. Always confirm the device and capacity before formatting. |
| - | * [[https:// | + | <WRAP info> |
| - | * [[http:// | + | Some of the protection checks intentionally use broad filesystem-label and partition-label matches. External media using names associated with system partitions, for example '' |
| - | {{hardware: | + | </ |
| - | GreenAntz RGB to component transcoder | + | ==== Ignoring a drive ==== |
| - | {{hardware: | + | The Storage Manager backend supports an '' |
| - | * [[http://forum.arcadecontrols.com/index.php/ | + | |
| - | * [[https:// | + | |
| - | Retrotink RGB2COMP (Scart | + | If an ignored drive contains a root-level '' |
| - | {{hardware: | + | The ignore entry is based on a persistent |
| - | | + | |
| - | RGBS VGA SCART to YPBPR Component Transcoder | + | The current backend provides an '' |
| - | + | ||
| - | {{hardware: | + | |
| - | {{hardware: | + | |
| - | * [[https://www.aliexpress.com/ | + | |
| - | <WRAP center round info> | + | ==== Mount-point naming ==== |
| - | Color coding | + | |
| - | * Green -> Pb | + | For automatically mounted partitions, Storage Manager builds a mount point under ''/ |
| - | * Red -> Y | + | |
| - | * Blue -> Pr | + | <WRAP tip> |
| + | Use unique filesystem labels for ROM drives. The Storage Manager configuration stores branch paths such as ''/ | ||
| </ | </ | ||
| - | RGBS / SCART to YCBCR / YPBPR / S-Video converter adapter | + | ===== Safe Drive Removal ===== |
| - | {{hardware: | + | |
| - | 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/ | + | Drives can be safely removed from: |
| - | If you need composite/ | + | * **Main Menu** |
| - | * [[https:// | + | * **System Settings** |
| - | {{hardware: | + | * **Eject an Extra Disk** |
| - | RGB to Composite & S-Video Ver2.0 | + | {{wiki: |
| - | {{hardware: | + | After selecting the drive, Batocera asks for confirmation before removing it from the storage pool. |
| - | * [[https://www.axunworks.com/ | + | {{wiki:use_external_storage_safe_eject_confirmation.png? |
| - | ===== DisplayPort to VGA DAC ===== | + | Batocera automatically updates the storage pool and refreshes the game lists. |
| - | If you only have a DP connection, use the CableDeconn DP to VGA adapter before sending the signal to the transcoder of your choice: | + | {{wiki:use_external_storage_drive_ejected.png?nolink& |
| - | * [[http:// | + | |
| - | * [[https:// | + | |
| - | {{: | + | |
| - | <WRAP center round info> | + | Games stored only on the removed drive will disappear from the library until that drive is connected and merged again. |
| - | If you are in a situation where you must use an active adapter, the CableDeconn DP to VGA adapter | + | |
| + | The **Eject | ||
| + | |||
| + | <WRAP important> | ||
| + | Prefer the Storage Manager eject action over physically unplugging a drive while Batocera is running. The backend | ||
| </ | </ | ||
| - | ===== USB-C to VGA DAC ===== | + | ==== Missing at boot, safe eject, and live unplug are different |
| - | 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 Storage Manager keeps configured branches in '' |
| - | * [[https:// | + | |
| - | * [[https:// | + | |
| - | {{: | + | |
| - | <WRAP center round info> | + | By contrast, using **Eject an Extra Disk** removes that branch from '' |
| - | If you are in a situation where you must use an active adapter | + | |
| + | 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. | ||
| + | |||
| + | ===== What Gets Merged? ===== | ||
| + | |||
| + | The graphical Storage Manager merges only the ROM library: | ||
| + | |||
| + | <code> | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | Folders such as: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | remain on internal storage. | ||
| + | |||
| + | The graphical Storage Manager does not merge BIOS files, save files, screenshots, | ||
| + | |||
| + | Advanced manual MergerFS pools are separate from the graphical Storage Manager | ||
| + | |||
| + | ===== Internal ROM Preservation ===== | ||
| + | |||
| + | When the first additional ROM drive is merged, Batocera preserves | ||
| + | |||
| + | Internally, existing ROMs stored in: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | are moved into: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | This allows internal ROMs to remain visible alongside ROMs stored | ||
| + | |||
| + | If all merged drives are later removed, Batocera restores the internal ROM library back to the normal ''/ | ||
| + | |||
| + | During restoration, | ||
| + | |||
| + | ===== 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, | ||
| </ | </ | ||
| - | ===== Connecting | + | ===== Other Storage Methods (Advanced) ===== |
| + | |||
| + | Batocera has several storage mechanisms that solve different problems. They should not be treated as interchangeable. | ||
| + | |||
| + | ^ Method ^ Best used for ^ What it does ^ | ||
| + | | **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 | | ||
| + | |||
| + | <WRAP tip> | ||
| + | If the goal is simply | ||
| + | </ | ||
| + | |||
| + | ===== 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 to present ROMs from a NAS together with ROMs stored on local drives under the same virtual directory, such as: | ||
| + | |||
| + | < | ||
| + | / | ||
| + | </ | ||
| + | |||
| + | <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.1732979711.txt.gz
- Last modified: 23 months ago
- by rion