Moving HDA_ROOT to msata disks

Discussion about hard drive spin down (standby) feature of NAS.
Locked
dagoodyear
New here
Posts: 9
Joined: Thu Jan 30, 2020 6:06 pm

Moving HDA_ROOT to msata disks

Post by dagoodyear »

Hi all,

Does anyone know if it's possible to get the QNAP TS-873 to make the HDA_ROOT volume and keep it on a pair of msata disks, rather than the spinning media. There's all sort of storage usage log's being written to HDA_ROOT one which looks like a volume across all 8 spinning HDD's. This prevents spin down, a solution I can see would be to make the unit use the internal msata disks for that volume instead of the spinning media.

At the moment I'm just trying to figure out options possibly without fully resetting our unit, as then I'd have to buy a load more disks to transfer the data off before resetting it. Hopefully there's a way to create a volume maybe even via SSH, clone the data over and change the config files to use this msata based RAID 1 volume rather than something over 8 HDD's in RAID 6?

(In a way supported by QNAP that a FW update would be thrown by etc...)

Any ideas - if its possible, if the unit would create it on msata internal disks if all disks were removed and it was reset, etc....

P.S if there isn't then I guess I should make a new feature request! Powering 8 HHD's constantly when the onboard msata or other internal SSD based media could host basic system data, would make a lot of sense to users for power saving now days.

Thanks in advance
Last edited by dagoodyear on Thu Jun 16, 2022 9:55 pm, edited 1 time in total.
User avatar
dolbyman
Guru
Posts: 35024
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: Moving HDA_ROOT to msata disks

Post by dolbyman »

If you mean the internal DOM, those are mostly not meant for constant writes and failure of the DOM would result in a non booting NAS

QNAP writes the logs on the spanning RAID1 on purpose and any change could be reversed on firmware update
dagoodyear
New here
Posts: 9
Joined: Thu Jan 30, 2020 6:06 pm

Re: Moving HDA_ROOT to msata disks

Post by dagoodyear »

Im not asking to remove the data, but simply change the location of that volume it's storing 500MB of data, to a different volume effectively which is in my case currently two internal msata disks. That would remove the need for the disk's to be constantly spun up. For example this log file would go on a different volume its just a log file?

** Search file ** between Thu Jun 16 14:53:33 2022 and Thu Jun 16 14:58:33 2022 at /mnt/boot_config
** Search file ** between Thu Jun 16 14:53:33 2022 and Thu Jun 16 14:58:33 2022 at /mnt/HDA_ROOT
Last file modification: Thu Jun 16 14:58:30 2022 /mnt/HDA_ROOT/.logs/kmsg

or for example these - as well: (Samba I've shutdown - that cleared it writing DB files - but there's load's of bit like these ones:

** Search file ** between Thu Jun 16 14:58:14 2022 and Thu Jun 16 15:08:14 2022 at /mnt/boot_config
** Search file ** between Thu Jun 16 14:58:14 2022 and Thu Jun 16 15:08:14 2022 at /mnt/HDA_ROOT
Last file modification: Thu Jun 16 15:00:05 2022 /mnt/HDA_ROOT/.config/storage_usage_history
Last file modification: Thu Jun 16 15:00:00 2022 /mnt/HDA_ROOT/.config/storage_usage_history/CE_CACHEDEV1_DATA.log
Last file modification: Thu Jun 16 15:00:03 2022 /mnt/HDA_ROOT/.config/storage_usage_history/vg1_snapshot_usage.log
Last file modification: Thu Jun 16 15:00:04 2022 /mnt/HDA_ROOT/.config/storage_usage_history/vg2_snapshot_usage.log
Last file modification: Thu Jun 16 15:00:01 2022 /mnt/HDA_ROOT/.config/storage_usage_history/CACHEDEV5_DATA.log
Last file modification: Thu Jun 16 15:00:01 2022 /mnt/HDA_ROOT/.config/storage_usage_history/CE_CACHEDEV2_DATA.log
Last file modification: Thu Jun 16 15:00:03 2022 /mnt/HDA_ROOT/.config/storage_usage_history/vg1_snapshot_reservation.log
Last file modification: Thu Jun 16 15:00:02 2022 /mnt/HDA_ROOT/.config/storage_usage_history/vg2.log
Last file modification: Thu Jun 16 15:00:03 2022 /mnt/HDA_ROOT/.config/storage_usage_history/vg1_snapshot_recycle.log
Last file modification: Thu Jun 16 15:00:02 2022 /mnt/HDA_ROOT/.config/storage_usage_history/vg1.log
Last file modification: Thu Jun 16 15:00:01 2022 /mnt/HDA_ROOT/.config/storage_usage_history/CE_CACHEDEV6_DATA.log
Last file modification: Thu Jun 16 15:00:05 2022 /mnt/HDA_ROOT/.config/storage_usage_history/vg2_snapshot_reservation.log
Last file modification: Thu Jun 16 15:00:05 2022 /mnt/HDA_ROOT/.config/storage_usage_history/vg2_snapshot_recycle.log

Again all log files so surely they could go on a different volume that does not require so much power to run?
User avatar
dolbyman
Guru
Posts: 35024
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: Moving HDA_ROOT to msata disks

Post by dolbyman »

My answer stands ...There is plenty of topics discussing the same thing on end...if you want to complain, open a ticket with QNAP
dagoodyear
New here
Posts: 9
Joined: Thu Jan 30, 2020 6:06 pm

Re: Moving HDA_ROOT to msata disks

Post by dagoodyear »

Hi @dolbyman,

At first I didn't get what you mean by the DOM but from quick searching your talking about the module onboard holding the OS. No I would not expect / want to destroy that with constant writes, if its as I expect a small flash based piece of memory in the unit - I would quite like the OS to continue booting from the DOM.

In this unit it has 8 spinning platter's, and 2 msata disks & a DOM module somewhere on the mainboard. I was looking to add 4 more msata's or 4 x NVMe SSD's. That would mean it has 6 drives, it can store this log data or other system data without using the spinning platters.

This partition in /proc/mdadm is currently over all disks: (8 spinning + 2 msata)

md9 : active raid1 sdg1[0] sdi1[40] sdd1[39] sdc1[38] sdh1[37] sdj1[36] sdf1[35] sdb1[34] sda1[33] sde1[32]
530048 blocks super 1.0 [32/10] [UUUUUUUUUU______________________]
bitmap: 1/1 pages [4KB], 65536KB chunk

I don't understand why it cannot be limited to 6 ssd disks (or even 2) to exclude the spinning platters so log files that write once per minute don't prevent the spinning platters from spinning down. The redundancy of 6 SSD's should be more than enough and allow the disks to spin down.

An alternative is, if I added these 4 more ssd/nvme could they be setup in a manner to prevent the writes to the spinning media for a long duration at least a day or longer to minimise spin up time? Im just trying to find a way to remove that unnecessary 1 write every min, or whatever it is - to stop the disks spinning down.

Does that make sense? Am I missing some other key piece of how the unit works?
User avatar
dolbyman
Guru
Posts: 35024
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: Moving HDA_ROOT to msata disks

Post by dolbyman »

Check the topic this was moved into (hdd spindown) ..all been done before (but will not survive reboot or firmware update)
dagoodyear
New here
Posts: 9
Joined: Thu Jan 30, 2020 6:06 pm

Re: Moving HDA_ROOT to msata disks

Post by dagoodyear »

For anyone also facing issues with HD spindown's. I have a QNAP TS-873. It's sole purpose is to host several VM's and have HD based storage read for retrieving media should any of the kodi boxes want to watch something that's been recorded. I could not for months get it to spin down, (previously I'd have preferred to keep the drives spun up as it used to have shares - so it would have worn out the disks - spinning down and up constantly).

After looking at the tool (Disk_Standby_Debug) hidden somewhere in the QNAP website - linked many times in post's on this forum. With basic Virtualisation running, Samba, and NFS my disks never went to sleep. They wrote 2k once per minute from memory.

Using the tool this was because of 3, things on my use case - samba, and 2 others. As nearly all boxes here are Linux or MacOS that I shutdown samba, and rerouted everything to NFS mainly :fingers-crossed.

The other two were interesting, there is under /mnt/HDA_ROOT/.config/storage_usage_history a directory that constantly get's updated with disk usage. ((It would be good to know what it actually uses this for - as I don't need disk usage stat's this was one target to remove. This volume appears to be spread across every disk be it HDD, or one of the mSATA boards.

The other was a file called kmsg or something similar under /mnt/HDA_ROOT/.logs. For home use this could be okay (I understand if it gets hack's I likely loose the logs).

So I decided to move the .logs directory and usage stat's to a ramdisk, which of course will be lost at reboot, but I believe i'll need them. So the autorun script I have is:

(Note this system has 64GB) so I can loose 1G, the standard systems with less you may want to choose carefully, or use du stat's etc, to size to the correct amount.

#!/bin/bash
# This script will run on boot startup
mkdir /share/memdisk
mount -t tmpfs -o size=1G tmpfs /share/memdisk
mkdir /share/memdisk/storage_usage_history
chmod 777 /share/memdisk/storage_usage_history
rm /mnt/HDA_ROOT/.config/storage_usage_history
ln -sf /share/memdisk/storage_usage_history/ /mnt/HDA_ROOT/.config/
mkdir /share/memdisk/.logs
chmod 777 /share/memdisk/.logs
rm -r /mnt/HDA_ROOT/.logs
ln -sf /share/memdisk/.logs/ /mnt/HDA_ROOT/

Hopefully this helps others in some way.

P.S 8 disks spinning down by the UPS power measurements has reduced the power consumption from 160W to 80W. That currently accordingly to google in the uk is approx £350. As they may be spun up for a hour a week, that now allows me to justify adding some extra boards in to host more non HD based storage for the VM's :)
xenox
First post
Posts: 1
Joined: Wed Feb 11, 2015 3:08 am

Re: Moving HDA_ROOT to msata disks

Post by xenox »

Ciao @dagoodyear !

Finally, a method that works for me.
I have a TS-253Pro with a 512 ssd for the system and an 8 tb hdd that I wanted to 'shut up' after a 5 minute innactivity.
I just added <-r> between rm and /mnt... (rm /mnt/HDA_ROOT/.config/storage_usage_history), otherwise it wouldn't work.
Now the disk stops spinning after the time set by me.
Thank you very much for sharing your method!
Locked

Return to “HDD Spin Down (HDD Standby)”