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.

Sunday, 26 February 2017

Ubuntu 16.04 on HP Pavilion dv7

Ten years ago I did buy a big HP laptop which was delivered with Windows Vista. Microsoft now is going to end the support for Vista. The device still works perfectly. I decided to move it to Ubuntu. The dv7-1060ez is a dual core with 4 GB memory and 310 GB hard disk, good candidate to become a usable Ubuntu laptop.

Saturday, 28 January 2017

Project Migration to Angular 2: Bootstrap Part 1

The migration of a working application to a more recent platform brings some risks. Generally, some functions cannot be reproduced as is and it takes many times. I wish to move a simple client, programmed using a mix of JavaScript and AngularJS, to Angular 2.

Thursday, 19 January 2017

Build & Deploy Angular 2 Projects

I have built the front end of some WEB applications using AngularJS. Now I would like to move it to Angular 2. The first step is learning about Angular 2 and to figure out how to migrate the AngularJS code. The second step is to build the project for deployment on a WEB container which is not the NodeJs WEB server used for development.

Friday, 30 December 2016

Android 6.0 on HTC ONE M7

The Internet offers quite a lot of step by step instructions on how to flash an Android device with a different ROM (Firmware). The most of them tell you how to do it and are really well for a defined device and a defined software. I'm a developer and I like to have some more options. I don't want to write a general flashing manual. The aim is to share some useful information about flashing.

Sunday, 23 August 2015

Springboot mutlipart upload

The upload works very well for many use cases but I want to handle the upload with an AJAX client. As soon as the upload exceeds the limits the embedded servlet container fires an unhandled exception and the Javascript client doesn't receive any suitable answer from the server.

Thursday, 6 August 2015

Webfonts mime types with Springboot

Springboot (1.2.5) per default doesn't have mime mapping for WEB fonts (glyphicons).

Maven build and Webfonts.

The build of a Maven project containing WEB fonts may be broken.

Sunday, 22 January 2012

Inexpensive Development E-Mail Server

A common issue using the company e-mail server for development is SPAM which, sooner or later, will reach the customer or a third party. To avoid the problem I did use a very good dummy e-mail server the Dumbster. In May, last year, I had to send HTML formatted mails from my application and test the result on the most common E-Mail clients.

The Dumbster wasn't enough anymore, but I didn't want to install/configure a true e-mail server and maintain it. My new choice is Apache James because it is quite simple to setup and use. It supports MSOutlook and Thunderbird (and many other which I didn't really check).

Friday, 22 April 2011

Backup of the PostgreSQL Database

At the end of the project I had to set up a simple but reliable backup for the PostgreSQL database. If you have some interest, I did describe the environment in a previous article "Ubuntu Server as Inexpensive Platform for J2EE". Here I describe the backup on that platform. With less changes the scripts works also on other UNIXes. The principle may be also used on MS Windows, but the implementation will be different.

Saturday, 26 February 2011

Inexpensive Development Platform for J2EE

Once the server is ready (see my previous article) I need a similar inexpensive development environment. Inexpensive it's OK but uncomfortable would be bad. I have two different choices: the first is to create a small development corner on my office workstation. The second would be to buy a a net-book and use it as dedicated appliance.

The first option has the advantage of a powerful hardware and a large screen. The net-book is small and may be used everywhere. I decided to investigate both environments because the first is suitable for developing a new project or a major release and the second seems to be suitable for support and small changes.

Saturday, 5 February 2011

Key-Based SSH Logins

I did found a lot of pages with good explanation of the theory and / or how to setup client and server and I don't want to write another one. The motivation of this article is only to have a concise check list to use with "copy & paste" when I have to set up a such login.

Monday, 1 November 2010

Ubuntu Server as Inexpensive Platform for J2EE

Due to the very small budget of the project I had to find a good but inexpensive platform. The development server is an old single core single CPU Pentium 4 pizza-box with 200 GB hard disk. The productive environment will be much better, but OS and middle-ware should work out-of-the-box and require a very little maintenance.