Giter VIP home page Giter VIP logo

Comments (3)

adelolmo avatar adelolmo commented on June 29, 2024

Hope the answers help.

what does the extra feature "Use disk partitions or device mapper to calculate activity" exactly mean?

It means that it can spin down disks encrypted via LUKS.

What happens if I combine all six disks into a single virtual disk using LVM?

Only disk with no read/write activity will spin down. I not 100% sure of how LVM works, so take this answer with care.

So would I get in trouble with the old version of Christian?

I don't see why you would.

Why should I use /dev/mapper/luks-0123456890 or /dev/disk/by-id/abcdefgh instead of just e.g. sda ?

Because the disk id won't change and the sda assignation might.

A parallel installation of both hd-idles (original+remake) for test purposes is probably not possible, since the files used have the same names, right?

Yes, you are right.

from hd-idle.

malvinas2 avatar malvinas2 commented on June 29, 2024

Based on your answer I didn't understand what actually changed now or what the benefit of the new feature is.
In particular, when you write "I don't see why you would (get in trouble with the old version)", that questions the point of all the changes ;-)
After reading the related pull requests, I would summarize the issue as follows: For some unknown reason, the kernel's behavior has changed. In newer kernels disk monitoring tools -e.g. even temperature query of hddfancontrol- change read/write values on disk level. To avoid this, disk activity was calculated by watching read/write changes on partitions (sda1 instead of sda).
Later on someone explained that it is not sufficient to just watch normal partitions, but also encrypted ones (dm-x partitions).

  1. Should the documentation be changed to use partitions everywhere? It would be consistent that way.
    Instead of
    hd-idle -i 0 -a sda -i 300 -a sdb -i 1200
    the example would be something like
    hd-idle -i 0 -a sda1 -i 300 -a sda2 -i 300 -a sdb1 -i 1200

  2. As you already wrote yourself, there will be "many issues opened asking for further explanations". :-)
    Maybe @spasche and @V33m can name more application examples.

For example, my old media server still running fine with Ubuntu 16.04 and hdidle 1.5 is configured as follows:

disc_1 \
        > raid_md1 - crypt-raid_md1 - pv    \
disc_2 /                                                      | 
                                                                  |
disc_3 \                                                      \
        > raid_md2 - crypt-raid_md2 - pv      >   LVM
disc_4 /                                                      /
                                                                  |
disc_5 \                                                      |
        > raid_md3 - crypt-raid_md3 - pv    /
disc_6 /

According to the remarks so far ("The whole external drive is encrypted") an order like RAID --> LVM --> LUKS --> ext4 would be a problem (?).
Here the order is RAID --> LUKS --> LVM --> ext4.

  1. Although it's not your problem: Is the changed behaviour of the kernel a bug or a feature? If it is some kind of (changed) feature, I would have expected a notification from the developers.
    What about the comment "passing partitions can be confusing because it can lead to spinning down a drive that is currently active on another partition."?

from hd-idle.

V33m avatar V33m commented on June 29, 2024

There are likely to be variations and at least in my case, this is what works and not.

Setup

  • ARM64 SBC
  • LUKS encrypted external harddrives (the entire drives)

sudo ls -lv /dev/disk/by-id/

lrwxrwxrwx 1 root root 20 Feb 20 00:00 ata-ST6000DM005-2DP166_ZGY0LBRB -> ../../sda
lrwxrwxrwx 1 root root 20 Feb 20 00:00 ata-ST8000DM005-K03HFU_KJ02NSY1 -> ../../sdb
lrwxrwxrwx 1 root root 20 Feb 20 00:00 dm-name-hdd1 -> ../../dm-0
lrwxrwxrwx 1 root root 20 Feb 20 00:00 dm-name-hdd2 -> ../../dm-1
lrwxrwxrwx 1 root root 20 Feb 20 00:00 dm-uuid-CRYPT-LUKS2-904jsdgh4flmdvfbowemf34iogmsdvl0-hdd1 -> ../../dm-0
lrwxrwxrwx 1 root root 20 Feb 20 00:00 dm-uuid-CRYPT-LUKS2-j38fmd4jsdgh4flmdvfbowemf34imifu-hdd2 -> ../../dm-1
lrwxrwxrwx 1 root root 20 Feb 20 00:00 usb-Generic_STORAGE_DEVICE_000000001532-0:0 -> ../../sda
lrwxrwxrwx 1 root root 20 Feb 20 00:00 usb-Generic_STORAGE_DEVICE_000000001532-0:1 -> ../../sdb
lrwxrwxrwx 1 root root 20 Feb 20 00:00 wwn-0x5000c500a3d1d419 -> ../../sda
lrwxrwxrwx 1 root root 20 Feb 20 00:00 wwn-0x5000c500a3e2k9j2 -> ../../sdb

If I try to use any of the links pointing to dm-*, e.g. dm-0, I am not able to spin down the drives. Meaning that the following does not work in my case
HD_IDLE_OPTS='-i 0 -s 1 -a /dev/disk/by-id/dm-name-hdd1 -i 600 -a /dev/disk/by-id/dm-uuid-CRYPT-LUKS2-j38fmd4jsdgh4flmdvfbowemf34imifu-hdd2 -i 600'

However, using any of the links pointing to sd* etc. seems to work fine.
HD_IDLE_OPTS='-i 0 -s 1 -a /dev/disk/by-id/wwn-0x5000c500a3d1d419 -i 600 -a /dev/disk/by-id/ata-ST8000DM005-K03HFU_KJ02NSY1 -i 600'

from hd-idle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.