Thursday, 26 December 2024

NAS Failure: What Can I Do ?

Just before Christmas, one of my NAS devices stopped working; to be precise, it shut down and could not be turned back on. Such a catastrophic failure after less than three years is quite disappointing. At this point, I’m wondering whether I can still recover the data and if I really need to purchase a replacement unit.


One Sunday, while attempting to update the family photo archive, my PC notified me that it was unable to connect to the NAS unit. After a quick investigation, I discovered that the power management of the motherboard was irreparably damaged. Unfortunately, the repair would cost nearly as much as purchasing a new unit, making it an impractical solution.

I had planned for such an eventuality and, therefore, have a similar unit containing the same data. The model and manufacturer are different, as I would never consider buying an identical unit. On top of that, I also keep a full offline backup to safeguard against potential intrusions where someone might encrypt my data and demand a ransom.

Review

The damaged unit proved to be easy to install and manage. However, it had to be administered like any server based on the Linux operating system, requiring regular logins to update the firmware and additional packages. Everything beyond the basic NAS functions, essentially storing files, relied on public domain software packages. None of these software packages ever added any significant value for me. The NAS processor's power was simply too limited.

The ironic part was that, before failing, the unit notified me via email that everything was working perfectly. The messages never even informed me that a firmware update was available. It was always necessary to log in as an administrator to check for updates.

Alternatives

I have two possible alternatives:

  • A dual-core x64 notebook already running Ubuntu 22.04 Desktop, to which I would add an 8TB external hard drive connected via USB 3.x.
  • A quad-core x64 tower that has fallen out of use because it cannot run Windows 11.

The first option cost me around 160 euros, as the hard drive is new, while the second option cost nothing since it’s discarded hardware that I’ve already paid for and fully depreciated.

Notebook Solution

The solution is simple and immediate: Ubuntu recognizes the drive and automatically mounts it. This allowed me to immediately copy all the data from the remaining NAS unit and restore redundancy within 48 hours at minimal cost. In order to replace the NAS, the configuration of shared directories needs to be added: the Samba software package and its configuration are required.

I wondered whether the graphical interface of the NAS is an indispensable tool. For the simplest case—a single large directory and one user—I would say no, since the solution as a whole still requires some familiarity with a Linux system. In the case of multiple users with separate directories and access rights, the tool saves time but is not essential.

This alternative offers four key advantages: the external drive automatically powers down when idle and restarts when needed. The notebook's battery provides protection against power outages. The system consumes minimal energy, even when kept online continuously. Lastly, the external drive can be transferred to another PC with any operating system if the notebook becomes irreparably damaged, and this can be done in just a couple of minutes.

Tower Solution

This option is actually intended to test the possibility of recovering data from the damaged NAS, assuming that both drives are intact.

Initially, I installed the latest version of Ubuntu Desktop (2024.04.1) as the PC's operating system. Since it is a non-EFI PC, despite having a SATA 3 bus, I had to install the boot disk using my lab infrastructure. I then added the two drives taken from the damaged NAS and reconnected them as described by the NAS manufacturer's support page.

Initially, the drives were mounted as read-only. The issue was that the NAS had written some files with exclusive access for a specific user unknown to the replacement system. I could have created the same user with an identical identifier to read the data, but I decided not to waste time and remounted the drives with write access. After all, I wasn’t risking anything, as I’m not truly reliant on recovering the data since I already have it elsewhere.

This solution demonstrates that the data can be recovered, but also that recovery can become costly if the necessary infrastructure and technical expertise are lacking. In the end, my PC perfectly replaces the lost NAS unit.

Conclusion

Budget NAS devices are inherently vulnerable to unexpected failures. To ensure constant access to your data and safeguard against even partial loss, it's essential to maintain an equivalent backup, ideally stored offline.

Another option is to repurpose recently retired hardware, achieving greater value at a lower cost while also supporting environmental sustainability. However, the key factor remains the organization and backup strategy—losing data or failing to access it when needed can be both costly and frustrating.

Sunday, 23 June 2024

Quarkus vs. Spring Boot

The idea behind Quarkus is to have small containers that can be launched in just a few seconds. This allows for rapid scaling up and down, adapting resource usage to demand by automatically adding or removing containers, which makes costs especially effective in a pay-per-use cloud environment. If we take a medium-sized implementation built with Spring Boot, we would need to segment the application into several sub-projects to achieve the desired effect. Even for a new implementation, the question is: what advantages would Quarkus bring? In the case of one or more significant modules that need to scale quickly, the benefits are measurable. However, for an implementation with predictable usage and stable traffic volumes, there is no advantage to being faster.

Friday, 2 August 2019

Unlock Bilocker USB or NTFS Partition on Ubuntu 18.04

Quick procedure to unlock an USB stick or a NTFS partition encrypted using Bitlocker.

Sunday, 6 January 2019

PostgreSQL 11 and Spring Data - Part 1 The Database

In the past I used PostgreSQL as an alternative to Oracle for my experiments. Using a cloud-based development environment is now more practical and efficient than installing a server.

But I regularly find myself in a place where connections are difficult and I cannot access the database or some services from my development environment. In these cases a complete environment installed locally on the laptop is an advantage.

Sunday, 23 December 2018

Ubuntu 18.04 on HP Pavilion dv7-1060ez

At the beginning of 2017 I installed my HP Pavilion dv7 with Ubuntu 16.04. One moth ago I realized that the processor is a 64-bit CPU and that for all these years it has never been used as such. HP originally supplied it to me with Windows Vista 32Bit, so I believed that the processor did not support a 64Bit operating system.

Saturday, 22 July 2017

SSH Key Management on Ubuntu

I installed my notebook with Ubuntu 16.04 LTS. Now I must manage the different keys I use to access my GIT repositories on different hosts/services. I found some interesting hints I resume here.

Monday, 5 June 2017

Project Migration to Angular 2: Bootstrap Part 2

This article should be called Bootstrap Part 1 rewinded, because, in the mean time i did move from Angular 2 and Angular-Seed to Angular 4 and Angular CLI.

Sunday, 4 June 2017

Build & Deploy Angular 4 Projects

In January, this year, I was dealing with the migration from AngularJS to Angular 2. In the meantime the current version of Angular is 4. I decided to skip Angular 2 and continue with Angular 4.