LGM-OS
documentation

Caché, disco de repuesto, réplica a otro NAS y discos en red.

Disks, spares and replicas

What you can do with the disks beyond creating a volume: speed it up, keep one spare waiting, send a live copy to another NAS and lend a disk over the network.

If what you want is…Go to
A failed disk to be replaced by itselfHot spare
Repeated reads to go fasterRead cache (SSD)
The whole volume on another machineReplica to another NAS
To give a disk to Windows, Proxmox or VMwareNetwork disks (iSCSI)

Hot spare

Storage → the volume's card → "Hot spare". ZFS only.

A volume with redundancy survives one disk dying, but it is left unprotected until someone swaps it. If that happens on a Friday night, the whole weekend sits one disk away from losing everything.

The spare is a disk that is plugged in, empty and waiting. When another one fails, ZFS puts it in its place by itself and the volume is protected again without anybody having to be standing there.

  • When you add the first one, the panel turns on autoreplace, which is what makes the spare worth anything: without that property, ZFS leaves it sitting there and the volume degraded until somebody opens the panel.
  • It adds no space. It is empty on purpose.
  • When you add it, whatever it had inside is lost: it becomes ZFS's.
  • When it steps in, the NAS tells you. That is the best and the worst news at once: a disk has died, but your data is already protected again. Swap the failed one to have a spare again.
  • A spare that has already stepped in cannot be removed: that would not remove a spare, it would remove half of the volume's redundancy. Swap the failed disk first and the spare frees itself.

On Btrfs it does not exist: there a failing disk is replaced by hand from that same screen.


Read cache (SSD)

Storage → the volume's card → "Read cache". ZFS only.

An SSD in front of large disks speeds up repeated reads. It stores no data: what is inside is a copy of what is already on the disks, so if the SSD dies nothing is lost —it just gets read from the slow disk again.

There is no "add write log" (SLOG) on purpose: it only speeds up synchronous writes —a home NAS writes over SMB, which is not synchronous— and an unmirrored one that dies takes the pending writes with it. A button almost nobody needs and that can cost data is not a feature.


Replica to another NAS

Storage → Replicas.

A backup gives you back your files. A replica gives you back the volume: the whole file system travels with all its snapshot history, so if this machine burns down, the one in the other house mounts the volume and carries on.

  • Genuinely incremental: the first time everything travels and from then on only what has changed.
  • On a schedule or by hand.
  • Test the destination before saving. The typical failure —the SSH key not authorised on the other machine— cannot be discovered at three in the morning.
  • The key is the same one as the backups use: whoever already authorised it has nothing to do.

What is needed on the other side

  • A machine with ZFS (or Btrfs, depending on what you use here) and ssh.
  • The public key of this NAS in ~/.ssh/authorized_keys of the user you give. The panel shows it so you can copy it.
  • A destination that already exists: on ZFS, the parent dataset (tank2 to replicate into tank2/copy); on Btrfs, the folder.

What is worth knowing

  • The first replica takes hours —everything travels— and has no time limit on purpose. The following ones take minutes.
  • The destination is a copy: anything that diverged there is discarded on every send.
  • If somebody deletes the replica on the other machine, the NAS notices and sends the whole volume again instead of failing forever.

Network disks (iSCSI)

Storage → Network disks.

A disk on the NAS that another machine sees as if it were its own: that machine formats it with its own file system (NTFS, VMFS, ext4) and one machine at a time uses it. It is what Windows Server, Proxmox and VMware ask for.

It is not a shared folder: the NAS lends blocks and does not know what is inside. To share files between several people, use a shared folder.

  • The disk is a file inside the volume (<volume>/iscsi/<name>.img) and **takes up what is used**, not the full size from day one.
  • With a password (CHAP) or without one. If you set one it has to be **between 12 and 16 characters**: that is what the Windows initiator accepts, and saying so here saves the "it will not connect and it does not say why" on the other end.
  • A disk that a machine has mounted cannot be removed. It would not give an error: it would corrupt whatever that machine was halfway through writing.
  • The panel keeps no list of its own: it shows the configuration the system will restore at boot, so it cannot say one thing while a server sees another.

How a Windows machine connects

  1. iSCSI Initiator (it comes with Windows) → paste the address the panel shows (<nas-ip>:3260) → Quick Connect.
  2. The disk shows up in Disk Management as a new unformatted one.
  3. Initialise and format it like any other disk.