OSM Documentation 0.2.0 Search

2. Storage

Everything about the disks is in the Storage app: Overview, Storage (pools and volumes), Disks, Snapshots, USB Drives, Analyzer, iSCSI and Settings.

How OSM stores your data

  • Disks are the hard disks and SSDs in the server.
  • A volume is where your data lives: shared folders, apps' data, virtual machines. Volumes are numbered (Volume 1, Volume 2...) and each has a file system.
  • A RAID protects a volume from a disk failure by keeping the data on more than one disk. OSM builds even a one-disk volume as a RAID array: a Basic volume is a one-disk mirror that becomes a real mirror when you add a second disk. A ZFS volume uses ZFS's own RAID.
  • A storage pool holds one or more volumes on a group of disks. A pool can use Flexible RAID, which puts disks of different sizes to work.
  • The system (OSM itself) has a small partition of its own on each system disk. With two system disks or more, these mirror each other, so a failed system disk does not stop the server.

Choosing a RAID level

LevelDisksUsable roomDisks that may failGood for
Basic1one disknonea start: add a mirror later
JBOD1 or moreall of themnoneroom without protection
RAID 02 or moreall of themnone (one failure loses everything)speed for data you can lose
RAID 12 or moreone diskall but onetwo disks; the simplest protection
RAID 53 or moreall but oneonemost home servers with three to six disks
RAID 64 or moreall but twotwomany or large disks, where a rebuild takes long
RAID 104 or more (even)halfone per mirrored pairspeed and protection, e.g. virtual machines
Flexible RAID1 or more, any sizesalmost all, by size layersnone with one disk, then one; two with four disks or moredisks of different sizes, a pool that grows a disk at a time

JBOD needs a part of Linux (md "linear") that the kernel of this version of OSM does not have: Storage and OSM Setup offer it only on a kernel that has it. For all the room of several disks, use RAID 0, or a Flexible RAID pool.

RAID protects against a failed disk, not against deleting a file, ransomware or a fire: you still need snapshots and backups.

Choosing a file system

  • ext4 (OSM's default): simple and fast, with quotas for each account as well as each shared folder. It has no snapshots.
  • Btrfs: snapshots (earlier versions in Files and in Windows, immutable snapshots), replication to a second server, checksums of your data, and backups of the apps' data while they keep running. Quotas are for shared folders, not for each account. Choose it if you want earlier versions of your files.
  • ZFS: install ZFS support first, in Storage > Settings or when you choose ZFS in Create a volume. Your server then builds ZFS for its own kernel (this needs the internet and a few minutes). ZFS is for volumes on disks of their own; storage pools take ext4 or Btrfs. ZFS has its own RAID levels, snapshots and checksums.

Creating storage

  1. Open Storage > Storage.
  2. Create a volume... makes a volume on disks of its own (one RAID array), with a RAID level and a file system. When a storage pool has room, it first asks where the volume goes. Create a storage pool... makes a pool first (one RAID level, or Flexible RAID), then Create a volume in the pool now or later; a pool's volumes have a size, and grow while in use (Grow...). The first volume's size is a whole number of GB, up to the pool's room: OSM checks it before it erases the disks, and the question that asks to erase them names it.
  3. Choose the disks. A disk that holds something (another system's data, or what a deleted volume left behind) says so, and is erased. A disk that cannot be erased (in a ZFS pool in use, holding an open encrypted device, in use) is refused at once, before anything starts, and no disk is erased until every chosen disk is ready to be. Each disk also says whether it was tested, and how its test went: a new disk is worth testing first (OSM suggests it, and never stops you).
  4. Self-healing (for a volume on disks of its own, with RAID 1, 5, 6 or 10 and ext4 or Btrfs): each block of the volume gets a checksum. A block that a disk returns damaged is noticed when it is read, and repaired from the other disks of the RAID. Writes are slower (about half the speed), about 1 % of each disk holds the checksums, and each disk is prepared once, which takes hours on a large disk. The server opens self-healing volumes by itself at every start, and the volume's card shows how many damaged blocks were mended.

New ext4 volumes have quotas turned on. An older ext4 volume made without them has Turn on quotas... on its card. The volume is then unmounted for a moment: Containers and File Protocols stop meanwhile, and virtual machines must be shut down first.

While the disks of a new volume are written for the first time, its state shows the progress in orange (a new storage pool shows Building). You can use it right away. A new RAID 5 or 6 fills its last disk this way: it is building, not degraded, also after a restart of the server meanwhile.

Delete... on a volume erases it for good, after you type its name: its disks become empty, or its room goes back to its storage pool. OSM refuses while it holds the accounts' home folders (move them first: Settings > Users and Groups > Advanced, Keep them on), while it keeps the PC backups and computers are listed in Backup > PCs and servers (one that no longer backs up too: its versions are there; remove the PCs first), mounted or not and with PC backups on or off, while apps keep their data on it, while it holds immutable snapshots (wherever they are on it), and while it holds virtual machines, iSCSI LUNs, Network Boot's disks, backups of virtual machines or the apps' containers: delete or move them first. A volume that is not mounted is first looked at read-only, for the same things. One that cannot be mounted at all (its file system is damaged, or its RAID has failed) can be deleted too: its contents cannot be checked then, so a shared folder of it that keeps immutable snapshots stops the delete until that shared folder is deleted, and the delete dialog says so.

Adding disks

On a Basic volume, Add a mirror disk... makes it a mirror (RAID 1). Add disks... on a volume or a storage pool:

  • a Basic storage pool becomes a mirror (RAID 1);
  • a RAID 1 gets another mirror, or, with two disks, becomes RAID 5;
  • a RAID 5 grows, or becomes RAID 6 (four disks or more);
  • a RAID 6 or a JBOD grows;
  • a storage pool takes new disks: a Flexible RAID pool puts them to work whatever their size.

Replace a disk... on a storage pool puts a new disk (as big or bigger) in another's place, while the pool keeps working: a bigger disk gives a Flexible RAID pool more room.

The volume grows by itself when the RAID has finished spreading the data again (it shows Growing meanwhile), which can take hours on large disks, days for RAID 5 to RAID 6. The server stays in use meanwhile, also after a restart: the RAID goes on where it was. A RAID 5 becoming RAID 6 is not degraded while it does: the new disk fills in. When you give a storage pool's new room to one of its volumes, that volume gets the room the disks added, never the room that was free before. If growing a volume fails, the bell says why, and OSM tries again an hour later.

Add a hot spare... (on RAID 1, 5, 6 and 10 volumes of their own) gives a volume a disk that waits: when a disk of the volume fails, the hot spare takes its place at once and the volume repairs itself onto it. The volume then lists it as one of its disks, no longer as a spare, and the bell says it has no spare left: add a new one. Taking a hot spare out (or pulling it) leaves the volume complete; it removes only the spare's own part of its disk.

A repair, a hot spare and Add disks... offer only disks at least as big as the volume's own, and say when they leave smaller ones out. A disk that holds another server's volume or storage pool says so (of another server).

When a disk fails

The bell (and your email, if set up) tells you which disk failed and where it is connected. A volume whose RAID allows it keeps working, Degraded: your files are all there.

A storage pool whose RAID lost more disks than it can shows Failed: its volumes cannot be used, and a new disk cannot bring it back. Put the missing disks back if you can; else delete the pool and restore its data from a backup.

  1. Open Storage > Disks to see which disk failed and its port.
  2. Replace the disk. On a port with hot-plug (the Port column says so), the new disk is noticed as soon as it is plugged in; otherwise shut the server down to change it. Rescan for new disks (it lists every disk found since you pressed it) looks for a disk the server has not noticed.
  3. In Storage > Storage, choose Repair... on the volume (or on its storage pool), and the new disk. The rebuild runs in the background.

If the failed disk was a system disk, a server with two system disks or more keeps starting from the others. Repair... in the System part gives the new disk what the failed one held: OSM itself, its start-up files and its part of the volumes.

Prefer CMR hard disks to SMR ones for RAID: rebuilding onto an SMR disk can take days.

Disks from another OSM server

Disks taken from another OSM server, attached to copy their files, can hold volumes with the same names as this server's (two volume1s). OSM knows which are its own, and never repairs, grows, deletes or wipes the other server's. When it cannot tell them apart, it refuses and says so: take the other server's disks out, then try again.

The system disks

The System part of Storage > Storage shows OSM's own disks.

  • Mirror the system... puts a second disk next to a single system disk: the server then starts from either one. With one system disk, a failure of that disk stops the server until OSM is installed again.
  • Repair... appears when a system disk failed: it gives the disk you put in its place what the failed one held.
  • Use the free space on the system disks... appears when the system disks are bigger than the system, and gives the system that room while OSM runs. In a virtual machine whose disks were made bigger, OSM takes the room by itself at the next start.
  • An encrypted system shows its state here. You can make a new recovery key, and bind the TPM again after a change of the firmware or of its Secure Boot settings.

Disk health

  • Storage > Disks lists every disk with its port and SMART health. Details shows its temperature and SMART data; Test runs the disk's own quick test (about 2 minutes) or extended test (hours), or Test disk, a full check of a new disk (Testing a new disk).
  • OSM asks each disk of the system and of the volumes for its own health check about once an hour (a hard disk that sleeps is not woken for it: it shows as Asleep until it is awake). A disk that fails it is Failing: an error in the bell, and an e-mail. A disk that is only past the temperature it is made for (an NVMe drive in a warm case, say) is Too hot instead: a warning, which goes by itself once the disk is cool again. Check the fans, the dust and the room.
  • Replace says when to replace each disk: Not yet, Within a year, Soon or Now. OSM reads each disk's health once a day (a hard disk that sleeps is not woken for it) and keeps the readings, so it sees where a disk is going: an SSD's wear and how fast it grows, sectors a hard disk could not read or had to replace (and whether more come each month), its age, a health check it failed. Details lists every reason, and for an SSD the day its rated writes run out at the pace of the last weeks. It is a guess from the disk's own readings, not a promise: a disk can fail with perfect readings, and keep your backups. Growing transfer errors are said apart: they come from the cable or the port, not the disk. A disk that runs hot (a hard disk at 60 °C, an SSD at 70 °C, over most of a week's readings, or an NVMe or SAS disk that says so itself) is told Within a year: it is the cooling to look at, not a failing disk. When a disk's outlook gets worse, you are told (the bell, and e-mail and push for Soon and Now), and again when its bad sectors doubled since; a warm spell that comes back within a month is not told again. OSM reads the system's disks and the volumes' disks: another disk (an empty one, a USB disk) says not read by OSM, and so does a disk that gives no health readings at all. A disk you took out of the server stays in the monthly report of the month it left, marked Removed, then goes.
  • Storage > Settings:
    • Data scrubbing, on the first Sunday of every month or of every three months, reads every RAID array (not RAID 0 or JBOD) and every Btrfs volume, and compares the copies. A server that is off then (at the weekend, say) scrubs at its next chance. A disk that starts to fail is found while the others still have good copies, and a self-healing volume mends the damaged blocks it finds. The results are on this page (Last time, Result) and in the bell. No problem comes only when every disk was read to its end: a scrub you stopped says Stopped by hand, and one cut short by a restart or that did not finish says which volume, and runs again a few hours later. On a Btrfs volume each damaged block counts once, and the bell says how many could not be mended. A ZFS volume has Check the disks now on its card.
    • SMART self-tests on a schedule. A test that fails is an error in the bell; a test cut short (by a restart, say) is not a failure. The tests of SAS disks are read too.
    • Spin-down of idle hard disks. A disk that sleeps is not woken by OSM's own checks (its health, its tests): they wait until it is awake.

Testing a new disk

Test a new disk before it holds your files: a disk that fails early usually does so in its first weeks, and the test finds it while you can still return it. Open Storage > Disks, choose Test on the disk's row, then Test disk. Only a disk that nothing uses can be tested: not a disk of a volume or of a storage pool, not the system's, not a USB drive. The dialog says why when a disk cannot be tested, and about how long the test takes.

The test:

  1. asks the disk to test itself: its quick test, then its extended test, which reads all of it;
  2. reads every block of the disk, so that each place that cannot be read is found;
  3. compares the disk's SMART counters before and after: sectors replaced with spare ones, sectors waiting to be replaced, sectors the disk cannot read, transfer errors.

It only reads: what is on the disk stays as it is. It takes hours, or a few days on a big hard disk. The server works as usual meanwhile, and you can test several disks at once. The disk's row shows how far the test is and about how long it still takes; Stop the disk test... in the same menu stops it (what it found so far stays in its report). When it ends, the bell (and your email, if set up) says how it went:

  • Passed: every step ran and found nothing wrong.
  • Needs attention: the disk works, but something is not right: sectors it had replaced before the test, places that read very slowly, or transfer errors (often its cable or its bay rather than the disk). The report says what.
  • Failed: the disk could not read part of itself, replaced sectors during the test, failed its own test, or says itself that it is failing. Keep no data on it: return it or replace it.

Disk test report in the menu (or the result under the disk's health) shows the verdict and its reasons, each step with what it found and how long it took, the SMART counters before and after, and the disk's earlier tests.

The write test. For an empty hard disk (no partitions, no file system, nothing on it), the test can write every block with a pattern and read it all back, in place of the read. It finds more (a disk that does not keep what it is given, or one that is smaller than it says), but it erases the disk and takes about twice as long. Tick Write test and type the disk's name to confirm. OSM checks again that the disk is still empty right before it writes the first block. SSDs are not offered the write test: writing all of an SSD wears it, and its own health log says more.

While a disk is being tested, OSM does not offer it for a volume, a storage pool, a repair, a hot spare or an SSD cache. A restart of OSM (an update of OSM, or a restart of the server) stops a test that runs: its report says so, and you can start it again.

Snapshots

A snapshot is a read-only picture of a shared folder at one moment. It takes almost no room at first, and keeps what changes after it. Snapshots work for the shared folders OSM made on Btrfs and ZFS volumes, but not for encrypted ones.

  • Storage > Snapshots takes a snapshot by hand (Take one), or on a schedule (Schedule...: every hour or every day), kept by rules (one an hour for so many hours, one a day for so many days, one a week, one a month). Each rule counts back from now: with daily snapshots, Keep one a day for 7 days keeps the last 7 days' ones, whatever the hourly rule says. List shows a folder's snapshots: Browse opens one in Files, and Lock keeps one whatever the rules say.
  • The newest snapshot always stays, whatever the rules say, and a schedule needs at least one rule above 0.
  • A shared folder whose snapshot fails (its volume is full or read-only) gets a notification that says why; the other folders' snapshots go on, and the notification goes once its next snapshot works. A daily snapshot missed while the server was off is taken at its next chance, every day.
  • Everyone with access to the shared folder sees the snapshots as Earlier versions in Files, and Windows shows them as Previous Versions over SMB. Someone you take out of the shared folder reaches none of its snapshots any more. Each snapshot keeps the permissions its files had when it was taken: someone given access later sees the snapshots taken from then on, and someone who lost access to only part of the folder (a subfolder, a file) can still read that part's earlier versions. Delete those snapshots if that matters.
  • Immutable snapshots: in a shared folder's Schedule..., set Immutable for (days, 0: no), up to 3650 (10 years). Every snapshot taken after that, by hand or on schedule, is kept that long. Until then OSM refuses to delete it, for every account, Administrators included, so ransomware that reaches your shared folders cannot remove it. Its volume cannot be deleted before then either. The shared folder itself can still be deleted, and its snapshots stay until their time (on ZFS, the folder's files can be deleted only after that). The protection is in the file system itself (an immutable flag on Btrfs, a hold on ZFS): only root, at the server's command prompt, could lift it, on purpose. Keep two-step sign-in on for every Administrator, since an Administrator can become root.
  • While an immutable snapshot is kept, nothing moves the server's clock ahead of its time: in Settings > Language and Time the clock cannot be set by hand, other time servers cannot be set, and time sync cannot be turned on with time servers of your own (leave Time servers empty: Debian's pool then keeps the time). Keep the time servers on a network you trust: someone between the server and them could still send it a wrong time.

SSD cache

Add an SSD cache... on a volume of a storage pool puts SSDs in front of it: a Read-only cache (one SSD, or two mirrored), or a Read-write cache (two SSDs, mirrored, because a read-write cache holds data not yet written to the pool's disks). SSD cache... then shows how often the cache serves reads and writes, and Remove the cache... takes it off while the volume stays in use. A volume with a cache does not grow: remove the cache first, and add it again afterwards. Volumes of their own have no SSD cache.

USB drives

USB drives are mounted when they are plugged in, unless you turn off Mount USB drives when they are plugged in. Everyone who may sign in finds them in Files, under USB Drives. In Storage > USB Drives you can:

  • Eject a drive before you unplug it;
  • Format... it (exFAT for any computer, ext4 for Linux, FAT32 for old devices). The name is 11 characters at most on exFAT and FAT32 (FAT32 takes no dot) and 16 on ext4: a longer one is refused before anything is erased. A drive too big for the older MBR partition table (most drives over 2 TB) gets a GPT one, which Windows, macOS and Linux read; smaller drives keep MBR, which TVs and cameras read too. On MBR, an exFAT or FAT32 partition gets the type Windows looks for, so Windows gives it a drive letter. While a drive is formatted, it is not mounted. On an ext4 drive, everyone who may sign in can make folders and files at its top; each keeps the permissions of the account that made it;
  • copy a folder of it into a shared folder whenever it is plugged in (Auto-copy...: new files only, nothing deleted on either side), or at once (Copy now). The copy is made as the Administrator who set it up, also after that account is renamed, and also when another Administrator changes the rule: it stays its maker's, and keeps its folder even when your own shared folders do not list it (it says not available then). If its maker is no longer an Administrator, is locked or is deleted, it copies nothing (a notification says why) until an Administrator sets it up again. A new account given a deleted one's name never inherits its copies. A copy into an encrypted shared folder that is locked is refused. A copy that fails (the shared folder is full, the drive was pulled out) is told by the bell and e-mail, and the notification goes when a later copy works.

An NTFS drive that was pulled out without Eject (or whose Windows is hibernated) is opened read-only, and a notification says so: nothing on it is changed. Check it on a Windows computer (chkdsk), eject it there, and plug it in again. A drive that cannot be mounted at all gets one notification with the reason, and is tried again when you plug it in again or press Mount. On NTFS, as on FAT and exFAT, everyone who may sign in can change what anyone made there. A drive pulled out without Eject is let go of at once, with a notification, so the next drive plugged in is mounted and copied as usual.

On a High Availability pair, auto-copy and photo rules run only on the server that is active: a drive plugged into the second server is not copied, and that server's screen (and the main server's page about it) says why.

A USB drive can also be a backup target. Storage never puts one in a volume, a storage pool or the system disks, not even to repair them: a drive that can be unplugged is no place for a RAID.

What happens by itself when a drive is plugged in (an auto-copy, a photo rule, a backup) needs Mount USB drives when they are plugged in on.

Photos and videos from a camera card

A photo rule copies the photos and videos of any camera card or stick you plug in into a shared folder, sorted by the day they were taken:

  1. In Storage > USB Drives, under Photos and videos, click New photo rule....
  2. Folder on the drive: DCIM, the folder every camera and phone keeps its pictures in, or another folder.
  3. Into: a shared folder, and a folder in it if you like (make that folder in Files first).
  4. Tick Eject the drive when everything is copied to pull the card out as soon as the copy is done.
  5. Click Save.

From then on, each time a card or stick with that folder is plugged in, its photos and videos (JPEG, HEIC, PNG, raw files, MP4, MOV and the other usual kinds) are copied into a folder for each day, such as 2026/2026-10-31: the day the photo was taken, read from the photo itself when it says so (JPEG and most raw files), otherwise the day the file was last changed. A notification says how many were copied, how many were there already and how many failed.

  • Nothing on the card is changed or deleted. Once the photos are copied, delete them on the card yourself, or format the card in the camera.
  • Nothing in the folder is replaced. A photo copied before (the same name, size and time) is skipped; another photo with the same name, from another camera say, is copied as IMG_0001 (2).JPG.
  • OSM remembers, for each rule and card, what it copied: a photo you delete from the folder does not come back when the same card is plugged in again, and only the new photos on the card are copied. A card formatted again counts as a new card. A rule given another folder (on the card or in the shared folder) copies the card's photos into it again, as a new rule does.
  • The copy is made as the Administrator who saved the rule: it goes only where they may write. If that account is no longer an Administrator, or is locked, the rule copies nothing until another Administrator saves it again.
  • A drive with an Auto-copy of its own keeps to it: the photo rules leave it alone.
  • Run now copies at once from every drive plugged in that has the folder. A rule whose Copy by itself when such a drive is plugged in is off copies only then.
  • The drive is ejected only when everything was copied, and never while a backup is using it.

Backups onto a USB drive

A backup task can go to a folder on a USB drive, and run each time that drive is plugged in (and when the server starts with it plugged in): tick Also each time its USB drive is plugged in when you make the task, or in its What, when and how long.... Storage > USB Drives lists these tasks under Backups onto a USB drive, each with a When plugged in switch and Back up now. The task knows its drive by the drive's file system, so it finds the drive whatever number it is mounted as (/volumeUSB1, /volumeUSB2...), and never backs up onto another drive in its place.

The Analyzer

Storage > Analyzer shows what fills a volume or a shared folder: the biggest folders and files, the kinds of files, the oldest ones, and duplicates. A file with several names (hard links) counts once, and is no duplicate of itself. A name written in an old character set (from an old Windows PC or a zip file) shows with a � in place of the letters it cannot show, and has no Show button: open its folder in Files instead.

Its Map draws the folders as boxes, the biggest folders as the biggest boxes, with each folder's own folders showing faintly inside it. Click a folder (or Tab to it and press Enter) to open it on the map, and the path above the map (or Backspace) to go back; Open in Files opens the folder you are looking at. Striped boxes are a folder's own files, and its folders too small to show (a folder with more than 150 folders shows the biggest 149, the others as one box). The map goes five folders deep; a report made before this version has no map: analyze again.

iSCSI

iSCSI Storage gives disks over the network to Windows, VMware, Proxmox and Linux: Install it on the iSCSI page the first time. It cannot be uninstalled while a target is set up: removing it would take every target away from the computers using it (a Network Boot PC would lose its system disk). Remove the targets first. Create a LUN makes a disk (a file on a volume, thin: it takes room only as it is written; on an ext4 volume 16383 GB at most, as a file there cannot be larger). Create a target makes LUNs reachable: for the computers you name (by their initiator names), for those that know its CHAP name and password, or both. Only one computer at a time should write to a LUN, unless it holds a cluster file system. LUNs called nb- and a name are the disks of Network Boot's computers, each in a target of its own: they are changed there (Network Boot).

In use by shows the computers connected to each target now. Deleting a LUN or a target, or taking a LUN out of a target, while computers use it asks you first: their disk vanishes under them, and what they are writing is lost.

On a High Availability pair the targets follow the main server, by the same names: connect the computers to the pair's address, and keep the LUNs on a mirrored volume (High Availability).