Comments (73)
Hi tomaae,
I had the same issue with my drives that stopped spinning down after installation of the HA-OMV plugin. I tried a lot of things, and finally I remembered that I have installed the plugin. I disabled the plugin, but the problem persisted. Then I found this discussion, uninstalled the plugin, rebooted HA - and the problem was gone.
I did the following tests as suggested above:
- put HDD to standby: hdparm -Y /dev/sda
- verify that it stays in standby mode: smartctl -i -n standby /dev/sda
- execute one of the omv-rpc commands shown in earlier posts above
- check the status of the HDD: smartctl -i -n standby /dev/sda
- repeat until all omv-rpc command have been tested
My setup involves two magnetic disks.
Results: The following commands do NOT spin up the disks: sudo omv-rpc -u admin "DiskMgmt" "enumerateDevices" sudo omv-rpc -u admin "Smart" "getDeviceSettings" '{"devicefile":"/dev/sdx"}'
The following commands DO spin up the specific disk that was used in the command: sudo omv-rpc -u admin "Smart" "getInformation" '{"devicefile":"/dev/sdx"}' sudo omv-rpc -u admin "Smart" "getAttributes" '{"devicefile":"/dev/sdx"}'
The following commands DO spin up both disks: sudo omv-rpc -u admin "Smart" "enumerateDevices" sudo omv-rpc -u admin "Smart" "enumerateMonitoredDevices" sudo omv-rpc -u admin "Smart" "getList" '{"start":0,"limit":25}'
Hope that helps in debugging; btw thanks a lot for your effort creating and debugging this useful plugin!
Best regards, Christian
Thanks, this is what I needed. Not sure when I will find time for this one, but I know how to resolve this now.
from homeassistant-openmediavault.
Hello!
After installing this integration, omv hdd is not spinning down anymore. Using hd-idle for spinning down, with 30 min. idle time.
Is this normal?
+1
After installing this integration, omv hdd is not spinning down anymore. I also use hd-idle for spinning down.
from homeassistant-openmediavault.
Same issue here. If I have this integration installed hd-idle becomes useless and the disks continually wake. Took me ages to find out... Would be nice to have this one working without waking up the disks.
from homeassistant-openmediavault.
Who knows, we will wait for @blackscreener to test it then. But thanks for trying :)
from homeassistant-openmediavault.
Hi tomaae,
I had the same issue with my drives that stopped spinning down after installation of the HA-OMV plugin. I tried a lot of things, and finally I remembered that I have installed the plugin. I disabled the plugin, but the problem persisted. Then I found this discussion, uninstalled the plugin, rebooted HA - and the problem was gone.
I did the following tests as suggested above:
- put HDD to standby: hdparm -Y /dev/sda
- verify that it stays in standby mode: smartctl -i -n standby /dev/sda
- execute one of the omv-rpc commands shown in earlier posts above
- check the status of the HDD: smartctl -i -n standby /dev/sda
- repeat until all omv-rpc command have been tested
My setup involves two magnetic disks.
Results:
The following commands do NOT spin up the disks:
sudo omv-rpc -u admin "DiskMgmt" "enumerateDevices"
sudo omv-rpc -u admin "Smart" "getDeviceSettings" '{"devicefile":"/dev/sdx"}'
The following commands DO spin up the specific disk that was used in the command:
sudo omv-rpc -u admin "Smart" "getInformation" '{"devicefile":"/dev/sdx"}'
sudo omv-rpc -u admin "Smart" "getAttributes" '{"devicefile":"/dev/sdx"}'
The following commands DO spin up both disks:
sudo omv-rpc -u admin "Smart" "enumerateDevices"
sudo omv-rpc -u admin "Smart" "enumerateMonitoredDevices"
sudo omv-rpc -u admin "Smart" "getList" '{"start":0,"limit":25}'
Hope that helps in debugging; btw thanks a lot for your effort creating and debugging this useful plugin!
Best regards,
Christian
from homeassistant-openmediavault.
I have data, I just need time to update this plugin. In my current situation, I cant make any promises.
from homeassistant-openmediavault.
Z tego co spróbowałem zmienić w configu, to udało mi się taki efekt osiągnąć edytując kod od linijki 78. Głównie dodałem dodatkowe wywoływanie funkcji odczytującej api, ale ona powoduje tylko odczyt danych o systemie + statusu pluginów itp. Natomiast druga funkcja, która wywołuje się dość rzadko, odczytuje tylko smart dysków. Nie sprawdzałem jeszcze ze względu na krótki czas działania, czy pozostałe dwie funkcje odczytywane w momencie odczytywania stanu systemu nie rozkręcają dysków, ale nie powinny. Poniżej kod od linijki 81 (async init) do linijki async update, po której dodałem nową funkcję:
# ---------------------------
# async_init
# ---------------------------
async def async_init(self):
self._force_update_callback = async_track_time_interval(
self.hass, self.force_update, timedelta(seconds=8000)
)
self._force_hwinfo_update_callback = async_track_time_interval(
self.hass, self.force_hwinfo_update, timedelta(seconds=8000)
)
self._force_update_stat = async_track_time_interval(
self.hass, self.force_update_2, timedelta(seconds=60)
)
# ---------------------------
# signal_update
# ---------------------------
@property
def signal_update(self):
"""Event to signal new data."""
return f"{DOMAIN}-update-{self.name}"
# ---------------------------
# async_reset
# ---------------------------
async def async_reset(self):
"""Reset dispatchers."""
for unsub_dispatcher in self.listeners:
unsub_dispatcher()
self.listeners = []
return True
# ---------------------------
# connected
# ---------------------------
def connected(self):
"""Return connected state."""
return self.api.connected()
# ---------------------------
# force_hwinfo_update
# ---------------------------
@callback
async def force_hwinfo_update(self, _now=None):
"""Trigger update by timer."""
await self.async_hwinfo_update()
# ---------------------------
# async_hwinfo_update
# ---------------------------
async def async_hwinfo_update(self):
"""Update OpenMediaVault hardware info."""
try:
await asyncio.wait_for(self.lock.acquire(), timeout=30)
except:
return
await self.hass.async_add_executor_job(self.get_hwinfo)
if self.api.connected():
await self.hass.async_add_executor_job(self.get_plugin)
if self.api.connected():
await self.hass.async_add_executor_job(self.get_disk)
self.lock.release()
# ---------------------------
# force_update
# ---------------------------
@callback
async def force_update(self, _now=None):
"""Trigger update by timer."""
await self.async_update()
# ---------------------------
# force_update_2
# ---------------------------
@callback
async def force_update_2(self, _now=None):
"""Trigger update by timer."""
await self.async_update_2()
# ---------------------------
# async_update
# ---------------------------
async def async_update(self):
"""Update OMV data."""
if self.api.has_reconnected():
await self.async_hwinfo_update()
try:
await asyncio.wait_for(self.lock.acquire(), timeout=10)
except:
return
await self.hass.async_add_executor_job(self.get_hwinfo)
if self.api.connected():
await self.hass.async_add_executor_job(self.get_smart)
async_dispatcher_send(self.hass, self.signal_update)
self.lock.release()
# ---------------------------
# async_update_2
# ---------------------------
async def async_update_2(self):
"""Update OMV data."""
if self.api.has_reconnected():
await self.async_hwinfo_update()
try:
await asyncio.wait_for(self.lock.acquire(), timeout=10)
except:
return
await self.hass.async_add_executor_job(self.get_hwinfo)
if self.api.connected():
await self.hass.async_add_executor_job(self.get_fs)
if self.api.connected():
await self.hass.async_add_executor_job(self.get_service)
async_dispatcher_send(self.hass, self.signal_update)
self.lock.release()`
Timeout z czasem 60 sekund to ten nowy, do odczytu tylko danych systemowych. Jeżeli jednak dyski znowu by się rozkręcały, trzeba by przerzucić linijki z funkcji async_update_2:
await self.hass.async_add_executor_job(self.get_fs)
if self.api.connected():
await self.hass.async_add_executor_job(self.get_service)
Do funkcji async_update.
Oczywiście, jest to moja wariacja która nie obiecuję że nie spowoduje jakiś dodatkowych problemów, chociaż takowych nie zauważyłem, a statystyki systemu odświeżają się co minutę
from homeassistant-openmediavault.
Issue-Label Bot is automatically applying the label bug
to this issue, with a confidence of 0.57. Please mark this comment with 👍 or 👎 to give our bot feedback!
Links: app homepage, dashboard and code for this bot.
from homeassistant-openmediavault.
Should not be. I was testing this during development and check did not cause spin up.
from homeassistant-openmediavault.
Any thoughts on how to make it spin down?
from homeassistant-openmediavault.
try removing the integration and see if they spin down.
if they do, I will check what I can do.
from homeassistant-openmediavault.
yes, they do spin down!
from homeassistant-openmediavault.
ok, I will have a look
from homeassistant-openmediavault.
Upgraded the hard disks and the issue seems to be gone.
from homeassistant-openmediavault.
thats strange, best would be to test it for longer
from homeassistant-openmediavault.
Payed more attention on new hard disks.
OMV integration is asking for informations, as the read/write led from hdds is blinking every minute (guesstimating), but the hdds are not spinning up.
I tend to belive it`s hardware related. Not using hd-idle anymore as hdds spin down themselves after 30-60 sec. of idleing.
from homeassistant-openmediavault.
yes, it is requesting smart information. but only a method that should not cause spin-up. I have tested it only on my nas with wd red's. other disks may spin up, not sure.
30-60 sec spin-down time is too fast, thats not healthy for them. you can set up custom time using OMV GUI. I use 30 minutes for example.
from homeassistant-openmediavault.
WD also, blue.
Previous was Seagate. Had to use hd-idle to spin it down.
Set 20 minutes spindown on OMV. Nothing changed, the spindown time is the same, 30-60 sec.
from homeassistant-openmediavault.
These are my settings for WD Red.
from homeassistant-openmediavault.
Tryed your setup. No spindown.
Replaced 128 with 127 - reverts to old behaviour, spindown 30-60 sec.
from homeassistant-openmediavault.
if there is no spindown on 128, its possible that something accesses that disk
from homeassistant-openmediavault.
Removed all possible access from exterior. It`s or the disks, or OMV integration.
from homeassistant-openmediavault.
Wish I knew whats causing this for some people. I'm not able to reproduce it.
from homeassistant-openmediavault.
Hello. I too have this same issue with HDD's not spinning down when using this integration in HomeAssistant. My OMV5 is running remotely on a pi4 along with plex. It uses a Sabrent 5 bay USB docking station. All HDD's auto spindown after 10-20 min normally.
On a second pi4 I installed Raspiban lite (latest build and all up to date) and the supervisor install of HomeAssistant in a docker. Along with that I also installed the HACS community store which got me to the OMV integration.
I check all my drives with a batch file and putty SSH to see that they are all on standby using hdparm commands
hdparm -C /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1
they would normally report as being in standby from no activity (spindown).
Once I install the OMV integration and set it up, it creates all the entities for the OMV system and each drive, like the disk space and whatnot. during that setup, of course, all the drives have to come out of standby for HA to create all it's entities. All HDD then report hdparm as active.
Now at that point, I haven't added anything to the HA dashboard (post OMV integration install and setup). If I let the system idle, the drives don't go back to standby at all. No rebooting or anything basic fixes the issue.
What I have tried to do though is to disable all the Disk entities so that I can at least view the OMV status things, like uptime, RAM, updates available, etc. That however did not allow the drives to go back to standby.
I made another batch command file to force all drives to go into standby using hdparm -y . All disks will then spindown, but then instantly spin back up due to HA / OMV integration accessing them in some way.
I've tried messing around with it for a few hours but the only way I can keep the drives in standby is to remove the OMV integration / uninstall it, then reboot the system. Then all is back to normal , however, sans HA OMV which I was hoping to get.
Although for me personally, I don't need HA to tell me the disk space or usage at all. But I would like my HA to report if my drives are in standby which I'm trying to figure out another way to get that reporting through SSH or something else, something that can just send the hdparm -C command and report either "standby" or "active" in some way. still trying to figure that out.
I don't know what logs I can get you to try to figure out this issue, if it even is an issue or a bug. But let me know. I'm pretty quick to reply unless I'm asleep at night.
Cheers and thanks for time in what you do for others.
from homeassistant-openmediavault.
Getting the same issue.
My drive spins down, and then immediately spins back up again while running this integration.
from homeassistant-openmediavault.
that unusual. what is your spin-down time?
from homeassistant-openmediavault.
I had it set to 10 minutes first
Then tried 30
But somehow I hear the drive spin up every 30-60 seconds (didn’t happen before installing the integration)
from homeassistant-openmediavault.
I just noticed that the drive wakes up every time I load the OpenMediaVault WebUI.
So there's probably no way to prevent this integration from waking it up as long as you're using the OMV RPC.
from homeassistant-openmediavault.
Yea, that is tricky. Problem is that I dont have access to hardware with OMV right now. I only setup VM so I can fix issues.
from homeassistant-openmediavault.
I am getting the same issue. spent 2 days trying to figure out why drives were not spinning down and getting hot. Finally realised it was the integration from my pi 4 home assistant integration. Tried disabling integration and that did not work had to fully uninstall in hacs.
I could force a spin down with “hdparm –y“, but they would spool back up again after about 15-30 seconds.
from homeassistant-openmediavault.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
from homeassistant-openmediavault.
is this still a thing?
from homeassistant-openmediavault.
I'm pretty sure it still is, just going by drive temperature my drive is running a lot more that it should
from homeassistant-openmediavault.
well, I dont know how to solve it since I dont own any mechanical disk anymore.
if someone is willing to help finding out what is causing it, I will look into it.
from homeassistant-openmediavault.
My OMV machine contains 4 mechanical disks. How can I help you?
from homeassistant-openmediavault.
Thanks.
First, remove the server from OMV integration if you use it so it wont interfere.
We will be spinning down the disk manually and testing which command will spin it up. It is usually audible in quiet room, or you can just touch it and you will feel it spinning up.
It would be ideal to perform test several times to be sure. No need to give me any cli outputs, whose dont matter in this case.
replace all /dev/sdx for devicefile of drive you will be testing.
force spindown with hdparm –y /dev/sdx
and wait few seconds until it spins down.
sudo omv-rpc -u admin "DiskMgmt" "enumerateDevices"
sudo omv-rpc -u admin "Smart" "getInformation" '{"devicefile":"/dev/sdx"}'
sudo omv-rpc -u admin "Smart" "getAttributes" '{"devicefile":"/dev/sdx"}'
from homeassistant-openmediavault.
but:
from homeassistant-openmediavault.
try to type it by hand, most likely a hidden character or tab
from homeassistant-openmediavault.
root@MischaNAS:~# sudo omv-rpc -u admin "DiskMgmt" "enumerateDevices"
[{"devicename":"sda","canonicaldevicefile":"\/dev\/sda","devicefile":"\/dev\/dis k\/by-id\/ata-ADATA_SU650_2J3820137494","devicelinks":["\/dev\/disk\/by-id\/ata- ADATA_SU650_2J3820137494","\/dev\/disk\/by-path\/pci-0000:00:1f.2-ata-1"],"model ":"ADATA SU650","size":"120034123776","description":"ADATA SU650 [\/dev\/sda, 11 1.79 GiB]","vendor":"ATA","serialnumber":"2J3820137494","wwn":"","israid":false, "isroot":true},{"devicename":"sdb","canonicaldevicefile":"\/dev\/sdb","devicefil e":"\/dev\/disk\/by-id\/ata-TOSHIBA_HDWD130_89JEUA3CS","devicelinks":["\/dev\/di sk\/by-id\/ata-TOSHIBA_HDWD130_89JEUA3CS","\/dev\/disk\/by-id\/wwn-0x5000039fe6f 08e68","\/dev\/disk\/by-path\/pci-0000:00:1f.2-ata-3"],"model":"TOSHIBA HDWD130" ,"size":"3000592982016","description":"TOSHIBA HDWD130 [\/dev\/sdb, 2.72 TiB]"," vendor":"ATA","serialnumber":"89JEUA3CS","wwn":"0x5000039fe6f08e68","israid":fal se,"isroot":false},{"devicename":"sdc","canonicaldevicefile":"\/dev\/sdc","devic efile":"\/dev\/disk\/by-id\/ata-TOSHIBA_DT01ACA300_95PGWDEGS","devicelinks":["\/ dev\/disk\/by-id\/ata-TOSHIBA_DT01ACA300_95PGWDEGS","\/dev\/disk\/by-id\/wwn-0x5 000039fe3c6c40e","\/dev\/disk\/by-path\/pci-0000:00:1f.2-ata-4"],"model":"TOSHIB A DT01ACA300","size":"3000592982016","description":"TOSHIBA DT01ACA300 [\/dev\/s dc, 2.72 TiB]","vendor":"ATA","serialnumber":"95PGWDEGS","wwn":"0x5000039fe3c6c4 0e","israid":false,"isroot":false},{"devicename":"sdd","canonicaldevicefile":"\/ dev\/sdd","devicefile":"\/dev\/disk\/by-id\/ata-TOSHIBA_HDWD130_89JEU6DCS","devi celinks":["\/dev\/disk\/by-id\/ata-TOSHIBA_HDWD130_89JEU6DCS","\/dev\/disk\/by-i d\/wwn-0x5000039fe6f08df5","\/dev\/disk\/by-path\/pci-0000:00:1f.2-ata-5"],"mode l":"TOSHIBA HDWD130","size":"3000592982016","description":"TOSHIBA HDWD130 [\/de v\/sdd, 2.72 TiB]","vendor":"ATA","serialnumber":"89JEU6DCS","wwn":"0x5000039fe6 f08df5","israid":false,"isroot":false},{"devicename":"sde","canonicaldevicefile" :"\/dev\/sde","devicefile":"\/dev\/disk\/by-id\/ata-TOSHIBA_DT01ACA300_Y5PN63PGS ","devicelinks":["\/dev\/disk\/by-id\/ata-TOSHIBA_DT01ACA300_Y5PN63PGS","\/dev\/ disk\/by-id\/wwn-0x5000039fe3c92e64","\/dev\/disk\/by-path\/pci-0000:00:1f.2-ata -6"],"model":"TOSHIBA DT01ACA300","size":"3000592982016","description":"TOSHIBA DT01ACA300 [\/dev\/sde, 2.72 TiB]","vendor":"ATA","serialnumber":"Y5PN63PGS","ww n":"0x5000039fe3c92e64","israid":false,"isroot":false}]
from homeassistant-openmediavault.
no need for output. I just need to know where HDD spins up :)
from homeassistant-openmediavault.
oeps, i think, i need to stop containers with plex and bittorent, they may interupt us, wait a minut
from homeassistant-openmediavault.
take as much time as you need. it does not need to be today.
from homeassistant-openmediavault.
Ok, this is strange, OMV integration in HA is disabled, all extra container on the machine are stopped, but hdd's spin up automatically some seconds after the initiated spindown, with no command from me. So it is stil OMV it self, who spins them up...
from homeassistant-openmediavault.
maybe you have smart checks enabled in OMV?
from homeassistant-openmediavault.
yes, i try that...
from homeassistant-openmediavault.
from homeassistant-openmediavault.
My HDD idle perfect without hass OMV integration. pon., 21 mar 2022, 12:52 użytkownik Tomaae @.> napisał:
…
maybe you have smart checks enabled in OMV? — Reply to this email directly, view it on GitHub <#19 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANPG7NA2W65FG55US5B3KMLVBBPHRANCNFSM4O75J3EA . You are receiving this because you commented.Message ID: @.>
You may give a try to those commands too then. More data is always better.
from homeassistant-openmediavault.
OK, I will try later.
from homeassistant-openmediavault.
ok, all smart capability functions disabled, built in DLNA server disabled, they still spin up... what ever its the cause, it is not HA integration... :-)
from homeassistant-openmediavault.
Fyi guys had the same effect, I am 100% sure it is caused by the integration. I have still physical HDD if there is any way I can assist let me know! I would love to see this working
from homeassistant-openmediavault.
Fyi guys had the same effect, I am 100% sure it is caused by the integration. I have still physical HDD if there is any way I can assist let me know! I would love to see this working
yea, you can give this a try to help identify the issue:
#19 (comment)
from homeassistant-openmediavault.
Who knows, we will wait for @blackscreener to test it then. But thanks for trying :)
So sudo omv-rpc -u admin "Smart" "getInformation" '{"devicefile":"/dev/sdx"}'
and sudo omv-rpc -u admin "Smart" "getAttributes" '{"devicefile":"/dev/sdx"}'
spin-up HDD with ntfs (Driver=uas) file system. HDD with ext4 (Driver=usb-storage) sleeps fine. Maybe it's related to disk file system.
from homeassistant-openmediavault.
both of them? interesting.
usb-storage would be external USB drives, are they? Those should have separate controller on board which may behive differently.
could you test these if any cause spin up?
sudo omv-rpc -u admin "Smart" "enumerateDevices"
sudo omv-rpc -u admin "Smart" "enumerateMonitoredDevices"
sudo omv-rpc -u admin "Smart" "getList" '{"start":0,"limit":25}'
sudo omv-rpc -u admin "Smart" "getDeviceSettings" '{"devicefile":"/dev/sdx"}'
I'm looking if there is alternate way or way to exclude them.
Please also provide outputs if you can, since I dont have any mechanical and cant test output on them anymore.
from homeassistant-openmediavault.
You could disable polling drive states or create a custom polling time for them.
Once a day is for the most applications OK. But if you have disks running full and you want a direct message you might want to poll it even faster than the 20-30min at the moment.
Is it possible to call the update of OMV drives via a service inside HomeAssistant? If so, everyone can create his own polling by creating an automation.
Maybe activating/deactivating it via a switch in the Integration tab.
from homeassistant-openmediavault.
That would be very non-standard approach and would just cause confusion.
There are standard options how to make this work, but I will need data.
from homeassistant-openmediavault.
the problem also occurs with omv6?
from homeassistant-openmediavault.
I checked for mine system. As I can see in OMV the drive is constantly checked when probably status from add on refresh. I think that possibility to change how often drives will be check can be enough. For me for example once a day will be enough, because it will give me information about drives.
On chart you can see that when I installed add on it started to constantly read it. Every drive I have with ext4 filesystem
from homeassistant-openmediavault.
Great! If I can assist by testing further commands or so, please let me know.
from homeassistant-openmediavault.
Any News?
from homeassistant-openmediavault.
Witam, mam ten sam problem. Integracja omv hacs, serwer
4x seagate 4TB
APM 127
gdy wtyczka HA OMV jest wyłączona dyski się nie budzą samoczynnie po około 30s.
Czy jest jakiś sposób na zmianę częstotliwości odpytywania stanów dysków w integracji HA?
from homeassistant-openmediavault.
from homeassistant-openmediavault.
Thanks for the neat plugin. Today, I've stumbled across the same issue when trying to find the source of unexpected spinup, and I would love to see it fixed. If I can help in any way, please let me know. Not sure though, how.
OMV6.0.46-5
dockerized home assistant 2022.8.7
this plugin v1.3.0
from homeassistant-openmediavault.
W integracji co prawda nie ma możliwości zmiany częstotliwości, ale wchodząc w folder config -> custom components -> openmediavault i edytując plik omv_controller.py można zmienić czas odświeżania. Dokładnie jest to w linijce od 80 - timedelta. Osobiście ustawiłem to na czas rzadszy niż odświeżanie SMART które mam ustawione w OMV, aby odczytywało dane dopiero w momencie kiedy smart dysków został już sprawdzony przez OMV. Do edycji tych plików używam w HA addona Samba Share i z poziomu windowsa wchodzę na lokalizację sieciową śr., 26 paź 2022 o 20:05 remik24 @.> napisał(a):
…
Witam, mam ten sam problem. Integracja omv hacs, serwer 4x seagate 4TB APM 127 gdy wtyczka HA OMV jest wyłączona dyski się nie budzą samoczynnie po około 30s. Czy jest jakiś sposób na zmianę częstotliwości odpytywania stanów dysków w integracji HA? — Reply to this email directly, view it on GitHub <#19 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIOZYCDIO6TSYO7QBZFLWCLWFFXGRANCNFSM4O75J3EA . You are receiving this because you commented.Message ID: @.>
Cześć,
Miałem również problem z ciągłymi wybudzeniami dysków, Twoja porada pomogła, jednak po zmianie częstotliwości wykres użycia pamięci oraz procesora w HA jest przerywany bo zbyt rzadko się odświeża :/. Da się jakoś rozdzielić i ustawić aby rzadziej odczytywał info o dyskach aby ich nie wybudzać i jednocześnie wystarczająco często aktualizaował statystyki użycia pamięci i procesora?
from homeassistant-openmediavault.
Bardzo dziękuję, będzie chwilą to wypróbuję twoje rozwiązanie 🙂👍
from homeassistant-openmediavault.
Could you please write english, so other people can read it too? Thank you.
from homeassistant-openmediavault.
Hi
I got the some problem with my old NAS. I did not use the HA Integration at that time but a self made bash script (see below) which worked fine without waking up the drives.
So what I did was to check if the drive was in sleep mode with smartctl -a -n standby . If the drive answered STANDBY then I skipped parsing the information and used previous values instead. Not a big deal because I only checked the drives twice a day.
Otherwise I used all the SMART attributes to publish them via MQTT to my HA installation. Now I use your integration instead (thank you for that piece of software).
I also saw that your integration does not read SSD information correctly. For a correct reading of Temperature and other attributes I had to parse different ones like Airflow_Temperature_Cel, Retired_Block_Count, Wear_Leveling_Count and Used_Rsvd_Blk_Cnt_Tot instead. Maybe you could put that in your code as well.
My new NAS hard drives must (and should) run 24/7 so the problem went away on its own. No idle mode neccessary anymore (except for the Seagate Archive drive) and your integration works fine for me. A small bug I found: your integration does not report sizes at all (total, remaining) but zero values instead.
Anyway, hope I could help a bit and looking forward to an updated version.
Dieter
Edit:
I was wrong about the missing size informations! They work fine, I just read the wrong ones from a missing drive. Sorry.
System-Info:
System: Self-Made NAS
Controller: Rock Pi 64 with SATA-Hat
OS: Armbian Linux 5.15.80-rockchip64
Software: Open Media Vault 6.1.4-2
Home Assistant 2023.1.2
Supervisor 2022.12.1
Operating System 9.4
Frontend 20230104.0 - latest
Hard Disks (old):
1 x WDC WD80EDAZ-11TA3A0 (8TB)
3 x ST8000AS0002-1NA17Z (Archive 8TB)
1 x WDC WD80EZAZ-11TDBA0 (8TB)
1 x Samsung SSD 840 EVO (250GB)
total of 40,25TB
Hard Disks (now):
1 x WDC WD80EDAZ-11TA3A0 (8TB)
2 x ST16000NM001G-2KK103 (Seagate Exos 16TB)
1 x WDC WD80EZAZ-11TDBA0 (8TB)
1 x ST8000AS0002-1NA17Z (Archive 8TB)
1 x Samsung SSD 840 EVO (250GB)
total of 56,25TB
My old bash script:
#!/bin/bash
sdadev="/dev/disk/by-uuid/17d8464a-9bb9-476d-a07c-eab797649367"
sdbdev="/dev/disk/by-uuid/a7d004c4-df7c-4c09-8bb2-fecfaf762b5e"
sdcdev="/dev/disk/by-uuid/b16edcfd-db1b-4200-b3fa-5b55c94ac11c"
sdddev="/dev/disk/by-uuid/bd2747cb-613d-43b2-a022-1b755bc4c96e"
sdedev="/dev/disk/by-uuid/0c2933dc-65a0-4f73-9c86-40eca5a47973"
sdfdev="/dev/disk/by-uuid/f57ebd9e-4cb4-4af2-9091-195d6be8c97d"
oldhdt0=0
oldrsc0=0
oldlcc0=0
oldcps0=0
oldhdt1=0
oldrsc1=0
oldlcc1=0
oldcps1=0
oldhdt2=0
oldrsc2=0
oldlcc2=0
oldcps2=0
oldhdt3=0
oldrsc3=0
oldlcc3=0
oldcps3=0
oldhdt4=0
oldrsc4=0
oldlcc4=0
oldcps4=0
oldhdt5=0
oldrsc5=0
oldwlc5=0
oldurc5=0
round()
{
bc -l <<END_BC
define round(number,r_scale)
{
auto o_scale
o_scale = scale
scale = r_scale+1
number += 5 / (10 ^ scale)
scale = r_scale
number /= 1
scale = o_scale
return number
}
round ($1,$2)
END_BC
}
###
### Read CPU Temperature
###
core=`cat /sys/devices/virtual/thermal/thermal_zone0/temp | sed 's/^\(.\{2\}\)/\1./'`
ct=$(round $core 1)
###
### Read S.M.A.R.T. Information Drive 0
###
status=`/sbin/smartctl -a -n standby $sdadev`
pwr0=`echo "$status" | grep "Power mode\|Device is in" | awk '{printf "%2s\n", $4}'`
if [ "$status" != "STANDBY" ];
then
hdt0=`echo "$status" | grep "Temperature_Celsius" | awk '{printf "%2s\n", $10}'`
rsc0=`echo "$status" | grep "Reallocated_Sector" | awk '{printf "%2s\n", $10}'`
lcc0=`echo "$status" | grep "Load_Cycle_Count" | awk '{printf "%2s\n", $10}'`
cps0=`echo "$status" | grep "Current_Pending_Sector" | awk '{printf "%2s\n", $10}'`
oldhdt0="$hdt0"
oldrsc0="$rsc0"
oldlcc0="$lcc0"
oldcps0="$cps0"
else
hdt0="$oldhdt0"
rsc0="$oldrsc0"
lcc0="$oldlcc0"
cps0="$oldcps0"
fi
###
### Read S.M.A.R.T. Information Drive 1
###
status=`/sbin/smartctl -a -n standby $sdbdev`
pwr1=`echo "$status" | grep "Power mode\|Device is in" | awk '{printf "%2s\n", $4}'`
if [ "$status" != "STANDBY" ];
then
hdt1=`echo "$status" | grep "Temperature_Celsius" | awk '{printf "%2s\n", $10}'`
rsc1=`echo "$status" | grep "Reallocated_Sector" | awk '{printf "%2s\n", $10}'`
lcc1=`echo "$status" | grep "Load_Cycle_Count" | awk '{printf "%2s\n", $10}'`
cps1=`echo "$status" | grep "Current_Pending_Sector" | awk '{printf "%2s\n", $10}'`
oldhdt1="$hdt1"
oldrsc1="$rsc1"
oldlcc1="$lcc1"
oldcps1="$cps1"
else
hdt1="$oldhdt1"
rsc1="$oldrsc1"
lcc1="$oldlcc1"
cps1="$oldcps1"
fi
###
### Read S.M.A.R.T. Information Drive 2
###
status=`/sbin/smartctl -a -n standby $sdcdev`
pwr2=`echo "$status" | grep "Power mode\|Device is in" | awk '{printf "%2s\n", $4}'`
if [ "$status" != "STANDBY" ];
then
hdt2=`echo "$status" | grep "Temperature_Celsius" | awk '{printf "%2s\n", $10}'`
rsc2=`echo "$status" | grep "Reallocated_Sector" | awk '{printf "%2s\n", $10}'`
lcc2=`echo "$status" | grep "Load_Cycle_Count" | awk '{printf "%2s\n", $10}'`
cps2=`echo "$status" | grep "Current_Pending_Sector" | awk '{printf "%2s\n", $10}'`
oldhdt2="$hdt2"
oldrsc2="$rsc2"
oldlcc2="$lcc2"
oldcps2="$cps2"
else
hdt2="$oldhdt2"
rsc2="$oldrsc2"
lcc2="$oldlcc2"
cps2="$oldcps2"
fi
###
### Read S.M.A.R.T. Information Drive 3
###
status=`/sbin/smartctl -a -n standby $sdddev`
pwr3=`echo "$status" | grep "Power mode\|Device is in" | awk '{printf "%2s\n", $4}'`
if [ "$status" != "STANDBY" ];
then
hdt3=`echo "$status" | grep "Temperature_Celsius" | awk '{printf "%2s\n", $10}'`
rsc3=`echo "$status" | grep "Reallocated_Sector" | awk '{printf "%2s\n", $10}'`
lcc3=`echo "$status" | grep "Load_Cycle_Count" | awk '{printf "%2s\n", $10}'`
cps3=`echo "$status" | grep "Current_Pending_Sector" | awk '{printf "%2s\n", $10}'`
oldhdt3="$hdt3"
oldrsc3="$rsc3"
oldlcc3="$lcc3"
oldcps3="$cps3"
else
hdt3="$oldhdt3"
rsc3="$oldrsc3"
lcc3="$oldlcc3"
cps3="$oldcps3"
fi
###
### Read S.M.A.R.T. Information Drive 4
###
status=`/sbin/smartctl -d sat -a -n standby $sdedev`
pwr4=`echo "$status" | grep "Power mode\|Device is in" | awk '{printf "%2s\n", $4}'`
if [ "$status" != "STANDBY" ];
then
hdt4=`echo "$status" | grep "Temperature_Celsius" | awk '{printf "%2s\n", $10}'`
rsc4=`echo "$status" | grep "Reallocated_Sector" | awk '{printf "%2s\n", $10}'`
lcc4=`echo "$status" | grep "Load_Cycle_Count" | awk '{printf "%2s\n", $10}'`
cps4=`echo "$status" | grep "Current_Pending_Sector" | awk '{printf "%2s\n", $10}'`
oldhdt4="$hdt4"
oldrsc4="$rsc4"
oldlcc4="$lcc4"
oldcps4="$cps4"
else
hdt4="$oldhdt4"
rsc4="$oldrsc4"
lcc4="$oldlcc4"
cps4="$oldcps4"
fi
###
### Read S.M.A.R.T. Information Drive 5 (SSD)
###
status=`/sbin/smartctl -d sat -a -n standby $sdfdev`
pwr5=`echo "$status" | grep "Power mode\|Device is in" | awk '{printf "%2s\n", $4}'`
if [ "$status" != "STANDBY" ];
then
hdt5=`echo "$status" | grep "Airflow_Temperature_Cel\|Temperature_Celsius" | awk '{printf "%2s\n", $10}'`
rsc5=`echo "$status" | grep "Retired_Block_Count\|Reallocated_Sector_Ct" | awk '{printf "%2s\n", $10}'`
wlc5=`echo "$status" | grep "Wear_Leveling_Count" | awk '{printf "%2s\n", $10}'`
urc5=`echo "$status" | grep "Used_Rsvd_Blk_Cnt_Tot" | awk '{printf "%2s\n", $10}'`
oldhdt5="$hdt5"
oldrsc5="$rsc5"
oldwlc5="$wlc5"
oldurc5="$urc5"
else
hdt5="$oldhdt5"
rsc5="$oldrsc5"
wlc5="$oldwlc5"
urc5="$oldurc5"
fi
/usr/bin/mosquitto_pub -u $USER -P $PASS -h casper -i Satan -t $TOPIC/config -m '{ .....
.... snip here .....
from homeassistant-openmediavault.
Additional infromation:
This is the current reading of my SSD drive - the provided attributes are all wrong for a Solid State Drive:
Furthermore a few very important attribues are missing on the other HDDs like Pending Bad Sectors, High Fly Writes etc. Would be nice if you could implement them.
from homeassistant-openmediavault.
Same case here, OMV6, drives would spinup and not spindown (10 minute spindown configured) after installing HA-OMV integration. Disabling sensors, disabling integration, deleting integration did not fix it. Only after deleting HA-OMV and hard-reset on HA did the spinup stopped.
I´ve fought quite a few battles with spindown vs SMART, not all drives behave the same way every time. But I have no doubt that this spinup issue was caused by the HA-OMV integration.
I am running OMV6 on an Argon Eon and I had to disable the script section that feeds the front LED panel HDDs SMART info for spindown to work properly.
from homeassistant-openmediavault.
This integration also woke my drives preventing them from going into various idle states. I used fatrace to note read/writes and saw df was being called every time the integration queried OMV.
I found that calling the FileSystemMgmt is what caused df to be run, preventing the drives from idling. I commented out the get_fs call and now I can run the integration without it waking my drives. Obviously I cannot monitor the drive status with this removed, but at least I can pull the other SMART data, etc.
Perhaps this could be added as an option next to Disable SMART in the integration options?
from homeassistant-openmediavault.
that should not happen. which omv version do you use?
from homeassistant-openmediavault.
Running the latest 6.7.1-2. Note I'm using Seagate Exos drives, monitoring state with https://github.com/Seagate/openSeaChest
from homeassistant-openmediavault.
it should not matter which drives you have, but it could be related to some change in OMV.
will wait to see if anybody else has this issue again
from homeassistant-openmediavault.
@tomaae, disregard, I got lost during troubleshooting and it was the SMART call spinning up the drives. I've disabled SMART in the integration. Sorry for bringing this back up, it can be closed again.
from homeassistant-openmediavault.
Related Issues (20)
- After upgrade of Home Assistant Core to latest version integration stopped working HOT 15
- CPU stuck at 0% on 1.4.2 update version HOT 1
- [Bug] All multiple OMV instances share the Services device, giving errors HOT 1
- [Bug] Entity names are generic, do not match device overview page. HOT 4
- [Bug] OMV Integration gives "Unknown error occurred" when trying to add the integration after instalation. HA 23.11 + OMV6 HOT 3
- [Bug] Error 500 on SMART attributes HOT 16
- [Feature] Enable configuration of port of the webgui HOT 3
- [Bug] - CPU load and System wlanRX and TX doesn't have data HOT 8
- Change the way the Disk sensors are created in HA [Feature] HOT 6
- Sensors not working with SMART enabled [Bug] HOT 15
- [Bug] Cannot add OMV integration. Error! HOT 5
- [Lokalise] Add new translations language HOT 2
- [Bug]Doesn't work with OMV in NanoPC T6 (FriendlyElec) HOT 11
- [Bug] Entities unavailable HOT 10
- [Bug] HA integration is not working with OMV 7 HOT 28
- Prevents disk spindown on Raspberry Pi 4.
- Prevents disk spindown on Raspberyy Pi 4 HOT 8
- [Bug] Integration fails with error "OpenMediaVault <my_omv_ip> unable to fetch data (500)"; my OMV compose is installed and functional but not in use HOT 7
- New version HOT 2
- [Feature] Turn on/Turn off for compose integration HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homeassistant-openmediavault.