HC1/HC2 - properly park harddisk on shutdown

User avatar
neal
Posts: 259
Joined: Fri Apr 14, 2017 10:02 am
languages_spoken: Korean, English
Has thanked: 10 times
Been thanked: 19 times
Contact:

Re: HC1/HC2 - properly park harddisk on shutdown

Post by neal »

Hi @artoxxx,

I've checked with the same image(Custom Debian Image) and WD Red 2TB HDD on my HC2.
I can't hear "clack" sound when its power down and no more increase attribute 192 "Power-Off_Retract_Count" after I installed the script.
https://wiki.odroid.com/odroid-xu4/trou ... own_script
But, I'm not sure the meaning of 192 attribute of S.M.A.R.T of your old Toshiba HDD. Because its attribute has a little different meaning basis on the manufacturer.

Code: Select all

root@odroid:~# uname -a
Linux odroid 5.3.0-odroid-upstream-armmp #1 SMP Wed, 18 Sep 2019 17:41:55 +0000 armv7l GNU/Linux
root@odroid:~#

ACSmith
Posts: 8
Joined: Wed Dec 02, 2020 2:33 am
languages_spoken: english
ODROIDs: HC2's
Has thanked: 0
Been thanked: 1 time
Contact:

Re: HC1/HC2 - properly park harddisk on shutdown

Post by ACSmith »

I'm not currently able to get the script to work with omv on an HC2 and a WDC WD140EDFZ-11A0VA0

User avatar
odroid
Site Admin
Posts: 38352
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 2128 times
Been thanked: 1264 times
Contact:

Re: HC1/HC2 - properly park harddisk on shutdown

Post by odroid »

ACSmith wrote:
Wed Dec 02, 2020 2:37 am
I'm not currently able to get the script to work with omv on an HC2 and a WDC WD140EDFZ-11A0VA0
Which OS image and kernel version do you run with OMV?
What messages appeared when you ran the script?

ACSmith
Posts: 8
Joined: Wed Dec 02, 2020 2:33 am
languages_spoken: english
ODROIDs: HC2's
Has thanked: 0
Been thanked: 1 time
Contact:

Re: HC1/HC2 - properly park harddisk on shutdown

Post by ACSmith »

ARMBIAN 5.85 stable Debian GNU/Linux 9 (stretch) 4.14.111-odroidxu4. I don't run the script to shutdown manually, I've installed it like the wiki showed. I have another HC2 with a 4TB running the new Ubuntu Release and its working fine.

User avatar
odroid
Site Admin
Posts: 38352
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 2128 times
Been thanked: 1264 times
Contact:

Re: HC1/HC2 - properly park harddisk on shutdown

Post by odroid »

We've not used Armbian image and it is hard to know what's wrong.
Can you switch to our Ubuntu image to narrow down root causes?
If it is an Armbian specific issue, post an issue on the Armbian forum.

ACSmith
Posts: 8
Joined: Wed Dec 02, 2020 2:33 am
languages_spoken: english
ODROIDs: HC2's
Has thanked: 0
Been thanked: 1 time
Contact:

Re: HC1/HC2 - properly park harddisk on shutdown

Post by ACSmith »

So its possible that its not compatible with the OpenMediaVault image here? - https://wiki.odroid.com/odroid-xu4/os_i ... hird_party. That's what its currently running. The other HC2 is running Ubuntu 20.04.1 LTS (GNU/Linux 5.4.58-211 armv7l) from that same link and it appears to be working ok, although it has a different hard disk in it.

User avatar
odroid
Site Admin
Posts: 38352
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 2128 times
Been thanked: 1264 times
Contact:

Re: HC1/HC2 - properly park harddisk on shutdown

Post by odroid »

Did you follow this recent instruction to install OMV on your HC2?
https://github.com/OpenMediaVault-Plugi ... rmbian.pdf

We used an HC1/HC2 specific old OMV image a couple of years ago.
https://wiki.odroid.com/odroid-xu4/soft ... stallation

ACSmith
Posts: 8
Joined: Wed Dec 02, 2020 2:33 am
languages_spoken: english
ODROIDs: HC2's
Has thanked: 0
Been thanked: 1 time
Contact:

Re: HC1/HC2 - properly park harddisk on shutdown

Post by ACSmith »

Mine would resemble option B. This odroid has been running since 2018. I've just upgraded from a 4TB to a 14TB drive. OS is still the original install though.

User avatar
odroid
Site Admin
Posts: 38352
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 2128 times
Been thanked: 1264 times
Contact:

Re: HC1/HC2 - properly park harddisk on shutdown

Post by odroid »

Do you mean your new 14TB HDD's parking works fine on Ubuntu 20.04.1 while the latest Armbian doesn't?

ACSmith
Posts: 8
Joined: Wed Dec 02, 2020 2:33 am
languages_spoken: english
ODROIDs: HC2's
Has thanked: 0
Been thanked: 1 time
Contact:

Re: HC1/HC2 - properly park harddisk on shutdown

Post by ACSmith »

Open Media Vault installed via https://wiki.odroid.com/odroid-xu4/soft ... stallation with a 14TB drive doesn't park the HDD.

It was working fine with the old 4TB drive. I ran out of space so I dd'd the 4TB to the 14TB and swapped the drives. The 4 year old 4TB drive's SMART is 168 while this new 14TB drive is already to 120.

User avatar
odroid
Site Admin
Posts: 38352
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 2128 times
Been thanked: 1264 times
Contact:

Re: HC1/HC2 - properly park harddisk on shutdown

Post by odroid »

Did you add @FanDjango's script?
viewtopic.php?p=246051#p246051

ACSmith
Posts: 8
Joined: Wed Dec 02, 2020 2:33 am
languages_spoken: english
ODROIDs: HC2's
Has thanked: 0
Been thanked: 1 time
Contact:

Re: HC1/HC2 - properly park harddisk on shutdown

Post by ACSmith »

Yes. I was running the other one but @FanDjango's also isn't working for me. Is there anything in the OpenMediaVault dashboard I should look at?

jperkins
Posts: 9
Joined: Wed Feb 17, 2021 5:30 pm
languages_spoken: english
ODROIDs: hc1
Has thanked: 3 times
Been thanked: 1 time
Contact:

Re: HC1/HC2 - properly park harddisk on shutdown

Post by jperkins »

I have the HC1. The hard disk clacking sound started when I moved 'root' to the sata drive. the included and original fix did not work. I didnt download the alternate fix but borrowed the -Y vs -y paramaters to hdparm and got this working for me. I had this issue whether using odroid/hardkernel images or armbian, when 'root' was on the sata drive

what worked for me. the sleep delays are important or sometimes upon reboot the sata disk does not come up. did not investigate why.
EDIT: increased sleep delays. sometimes the hard drive would be lost upon reboot. Even stranger, sometimes the ethernet wouldnt come back upon reboot

Code: Select all

root@backup:/lib/systemd/system-shutdown# cat shutdown 
#!/bin/bash
sleep 2
/sbin/hdparm -Y /dev/sda
sleep 10
details of my system

Code: Select all

root@backup:~# cat /etc/issue | tr -d '\n';uname -a;smartctl -a /dev/sda | grep -E "Model|Retract|Start|Power"
Armbian 21.02.3 Focal \l Linux backup 5.4.102-odroidxu4 #21.02.3 SMP PREEMPT Mon Mar 8 07:55:51 UTC 2021 armv7l armv7l armv7l GNU/Linux
Model Family:     Seagate Barracuda 2.5 5400
Device Model:     ST5000LM000-2AN170
  4 Start_Stop_Count        0x0032   100   100   020    Old_age   Always       -       169
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       615 (219 249 0)
 12 Power_Cycle_Count       0x0032   100   100   020    Old_age   Always       -       165
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       47
The original odroid.shutdown script generated this error, which was captured via serial port
IMG_20210321_185715.jpg
IMG_20210321_185715.jpg (325.7 KiB) Viewed 1433 times
the inode referenced traced back to /usr/bin
the exit code 126 means 'Command invoked cannot execute'. https://tldp.org/LDP/abs/html/exitcodes.html
I did not troubleshoot any further

note I do not use mdadm and only have one sata drive connected to my HC1. Currently this is working with LVM and LUKS. Also running a swap file on the sata drive. disabled the zram and zlog armbian utilities.

On a unrelated note I never could get zfs to work on this system when zfs was 'UNDER LOAD'. it would hang on multi GB writes or zfs send/receives on a 1gb network. tested zfs on many hardkernel/armbian/ubuntu/debian/kernel/zfs_version/ with_uas_or_without configurations. YMMV
Last edited by jperkins on Mon Mar 22, 2021 5:22 pm, edited 1 time in total.
These users thanked the author jperkins for the post:
odroid (Mon Mar 22, 2021 12:41 pm)

User avatar
odroid
Site Admin
Posts: 38352
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 2128 times
Been thanked: 1264 times
Contact:

Re: HC1/HC2 - properly park harddisk on shutdown

Post by odroid »

Thank you for sharing a nice tip about the additional sleep delays.
The parking characteristics of the Seagate ST5000LM000-2AN170 seems to be different from our tested WD or Toshiba HDDs.

renegat
Posts: 8
Joined: Wed Oct 23, 2013 2:47 am
languages_spoken: english german
ODROIDs: U2 U3 U3+ XU4Q 2xHC1 2xC1+
Has thanked: 0
Been thanked: 0
Contact:

Re: HC1/HC2 - properly park harddisk on shutdown

Post by renegat »

Device: Odroid HC1
HDD: Hitachi 5K500.250B
Kernel: Linux 5.11.2-1-ARCH #1 SMP PREEMPT Sun Feb 28 22:03:25 UTC 2021 armv7l GNU/Linux
OS: Arch Linux Arm

Still the same issue here too.

I applied the given script and installed it.
The HDD spins down on shutdown - just to restart again and than 'KLACK' resulting in rising Power-Off_Retract_Count value in SMART.


Tried to set second 'Wait' variable for sleep after hdparm command to 10 which seems to work for this device (also the HDD still stops/restarts/stops/restarts when shutting down but no self-destruct sound and no PORC rising anymore).

Code: Select all

[ -e $Dev ] && /sbin/hdparm -y /dev/${Dev##*/} && Wait=10
EDIT I:
Cheered too soon, issue persists irregulary with Hitachi 5K500.250B. Very annoying!
The disk is parked on shutdown and stops spinning - just to spin up again and make this self-destruct-sound before finally poweroff.
Tested with mainline linux-armv7 5.11.2-1 kernel and linux-odroid-xu3 4.14.180-3
Is there really still no working solution on this issue?!

EDIT II:
The issue seems to depend on the hard disk used:
With an old WD3200BEKT (WD Black) the disk does not spin up short bevor poweroff and does not make this loud klick noise using the script.

Perhaps there should be a compatibility list for devices known to work well with this device!

gnome_shell
Posts: 28
Joined: Mon Oct 04, 2021 2:35 am
languages_spoken: english
ODROIDs: ODROID-HC2
Has thanked: 5 times
Been thanked: 1 time
Contact:

Re: HC1/HC2 - properly park harddisk on shutdown

Post by gnome_shell »

on a Western Digital Red 4TB (WD40EFZX) I had the issue that it sometimes it worked fine but sometimes not and resulting in raising the retract value. I have tried various delays and it works with Wait=0 in my case.

Try on your own and see if it helps.
These users thanked the author gnome_shell for the post:
odroid (Mon Nov 22, 2021 11:20 am)

Post Reply

Return to “Hardware and peripherals”

Who is online

Users browsing this forum: No registered users and 2 guests