Skip to main content

Scrub your hard drives in your Synology NAS

I found an excellent post that I used on my DS209J when the volume crashed with no other log information.

FYI, I've replaced with commands in that blog post with the correct ones for a 2-bay NAS where the volume is 'md2'. Login to your NAS with SSH (after enabling that feature under 'Terminal') and use root for the username and the admin password for the password.

echo check > /sys/block/md2/md/sync_action


If you login to your NAS dashboard after you run this command, you'll see the following.













To scrub and fix the errors, run this command:

echo repair > /sys/block/md2/md/sync_action

If you check the dashboard again under 'Storage Manager' , you should see this screen.













Lastly, run:

cat /sys/block/md2/md/rd?/errors

Hopefully it reports back

0
0

Comments

Popular posts from this blog

How to retain your GUI settings in Kodi

When you restore Kodi or copy your existing Kodi userdata folder to another device it will always default the guisettings.xml, always. Even if you drop your previous settings into Kodi via a network folder, it will still reload it to default upon restart. This is because the guisettings.xml can't be written into the userdata folder when Kodi is running. To prevent this from happening, overwrite the guisettings.xml with SSH using two programs. One to stop and start the Kodi process and one to copy over the backed up guisettings.xml file that contains all your GUI goodness.

Using ESPEasy with Home Assistant via MQTT

Preface: I've just started playing around with Home Assistant on a Raspberry Pi and exploring the world of MQTT to control devices on the network. Learning curve is a bit steep but worth the effort as MQTT is very fast. The hardware and software tools I'm using are as follows: 2 x Sonoff relay units 2 x NodeMCU Boards ESPEasy firmware (must be version 121 or above as that contains the MQTT 'retain' flag option. Home Assistant software on Raspberry Pi2 MQTT Test Software: PC: MQTT.fx Android: MQTT Dashboard

How to check what entities are filling up your Home Assistant database

If you use the Home Assistant MariaDB add-on, this tip will show you how to query the database so see what Home Assistant entity states are triggering the most, filling up your database. What were going to do: Install the phMyAdmin add-on for MariaDB. Query the MariaDB database. See what entity state changes have the most action. Paste the code below into the SQL query box:  select entity_id,count( * ) from states group by entity_id order by count ( * ) desc; And if you're using the internal home-assistant_v2.db instead, you can use the SQLite Web add-on to achieve the same thing.