NAS, backing up data etc

U-Green are a brand very much on the up in the enthusiast community.

Synology have recently been forced to row back on their dick move regards drive compatibility. It’s cost them a ton of sales and even more in goodwill.

Well yes, but I’d argue that high availability isn’t a huge issue in a domestic scenario. And if you have one drive fail then I wouldn’t trust the other not to shake itself to bits during the full merge after you replace the dud

While I have had a drive fail on me recently, more important IMO are the usual threats of fire, flood and stupidity so I’ll leave this here

for that budget I’d be buying a HP micro server and installing TrueNAS/FreeNAS

I won’t touch synology with a bargepole.

Been checking out their docking stations given that I currently have a work laptop without DisplayAlt mode for some reason and a personal dock at home which doesn’t do DisplayLink.

I can’t comment on specific hardware, but I would make sure that the NAS runs the version of LMS that you want by default. Some older or packaged NAS systems would have an old version, and may lack security or features (especially Qobuz integration?)

There’s a lot to be said for having something that gives you more control, as per @thebiglebowski mentions. Indeed you could get a £50 used mini pc and plug in a USB drive. (Plus an extra drive for backing up!)

I’ve had a look at the process for installing LMS on a NAS and it looks like it could easily go very tits up for someone with my low level of expertise.

The idea of using a cheap mini PC as suggested by @AmDismal appeals as it’s relatively within my comfort zone. Anyone know whether something like the below with a portable hard drive would work ok?

Personally I would get a smaller thing like this

Install Ubuntu and LMS, add a HD. Should just work, really, and gives you control.

I use a Beelink similar to this, and it’s up for months at a time.

1 Like

Is it worth fitting a UPS to my Synology NAS? Being out in the sticks makes us vulnerable to occasional power cuts.

Thus far, no issues, but I’m aware that a sudden loss of power to anything with hard drives attached to it is a potential risk in terms of data loss.

I’m thinking something simple that will keep the NAS alive long enough for it to shut down safely in the event of a loss of power. I suppose the UPS will also need to be able to communicate with the NAS so it knows it’s time to shut down?

Cheers

I have a small APC with mine for that reason

Daft question, perhaps, but does the APC tell the NAS that it needs to shut down, or simply keep it powered until the batteries run out?

This is a new concept to me.

Old school storage guy here. No.

Unless you’re writing to the discs at furious speed then no, it matters not a jot if you accidentally kick the plug out of the wall.

I, personally, would always put a UPS on a NAS because their file systems generally do not react well to dirty shutdowns.

Most UPS will have a USB connection to your Syno which should then detect it as a UPS. You can configure shutdown or unmounting the file system rules from there.

That might explain why I’ve never had issues before. The NAS stores video, music and photos and I only add to the storage sporadically. Most of the time, it streams to laptops, video players and phones within the house.

Thanks, good to know.

Most NAS use android which is installed on one of the disks and then loaded into memory.

Power cuts can often and quite easily cause corruption resulting in boot fails or corrupted file system tables

Well yes, that’s how computers tend to work.

I literally did file system development and maintenance for a living for a long time, both old-school allocation table systems and (what at the time was) new-fangled journalling stuff.

I don’t doubt that there are highly specific narrow windows where power failure during furious writing can result in data loss / corruption but a) they’ve thought of that and b) geezer at home doing 99% reads is unlikely to tickle them. So on balance I’d say that a UPS is unnecessary.

(context: my NAS happens to use ext4, it looks like others also use xfs and some zfs)

Normally I ignore AI stuff in browsers but the AI summary of “ext4 scenario where power failure can result in data corruption” actually made interesting reading.

Ext4 is a journaling filesystem designed to be robust against sudden power loss, but it is not immune to data corruption. While the journaling mechanism (usually data=ordered) ensures that the filesystem structure remains consistent and bootable, it does not guarantee that the contents of files currently being written will survive intact.

Here are the primary scenarios where an ext4 power failure results in data corruption:

  1. In-Flight Data Loss (Delayed Allocation)

By default, ext4 uses “delayed allocation” (delalloc). Instead of writing data to the disk immediately, it buffers the data in RAM, waiting for a better opportunity to allocate physical disk blocks.

  • Scenario: A file is being written to, and the application has not called fsync() (which forces a flush to disk). Power fails.
  • Result: The file system journals that the file exists, but because the data was never flushed from the RAM cache, the file ends up being 0 bytes in size after reboot, or filled with old data.
  1. Partial Writes (Non-Atomic Updates)

When a file is modified (not just appended), the new data is written to disk. If power fails mid-write, the file can end up with a mix of new data and old data.

  • Scenario: Overwriting a configuration file or a database record.
  • Result: The file is “corrupted” in the sense that it is partially written and logically invalid. It is not necessarily “unrecoverable,” but the content is garbage.
  1. Missing fsync in Applications

Many applications write files by creating a new file, writing content, and then renaming it over the old one. If they do not explicitly call fsync to ensure the data hits the disk before the file is renamed, a power loss can leave you with a 0-byte file, or a file that existed before.

  1. Disk Write Cache Reordering

Modern hard drives and SSDs have internal caches. They often lie to the operating system, claiming a write is complete when it is only in the disk’s volatile memory.

  • Scenario: Ext4 sends write A, then write B. The drive caches them and writes them in order B, then A (reordering for performance). Power fails.
  • Result: Even if ext4 intended to make a consistent write, the drive’s reordering broke the transaction integrity.
  1. Disabled Write Barriers

Ext4 uses “write barriers” by default to prevent the disk from writing the journal commit record before the actual data is written to the platter.

  • Scenario: The user has mounted the file system with barrier=0 (common for benchmarking or on poor RAID controllers).
  • Result: If power is lost, the journal may be marked “committed” even though the data never made it to the disk. The filesystem will think everything is fine but will load garbage data, or in extreme cases, become corrupted.
  1. Journal Corruption

While rare, the journal itself can be corrupted if the power fails at the exact moment the journal is being written, specifically if the filesystem is unmounted and remounted quickly during the power failure event.

Summary of Risks

Type of Data Risk Level Consequence
System/Metadata Low Very unlikely with journaling (fsck fixes it).
Active File Data Moderate Partial file or 0-byte file (data loss).
Database High Uncommitted data lost, potential logical corruption.

Mitigation: To prevent this, use a UPS (Uninterruptible Power Supply) to allow a graceful shutdown, and use fsync() in applications that write critical data.

1 Like

TL;DR

That’s the thing - I reckon I go whole weeks without writing anything to the drive!

Yes, there is a usb between the ups and nas, and if power dies the nas shuts down in an organised manner during the time the ups can provide power after the mains has failed, or at least that is the plan

Every few years I need to replace the battery in the ups, but it has been fine for as long as I can recall