- This topic has 35 replies, 9 voices, and was last updated Jul 18-4:19 am by Robin.
June 9, 2021 at 11:00 pm #61264MemberRobin
Version update to unplugdrive 0.83
— true rotational devices do spin down now when user is told it is safe to unplug.
— speeded up waiting time for write cache sync with device. Turned out on heavy system load the check misses sometimes the moment system reports cache is written, causing our script to wait forever… Fix speeds up waiting time for this noticeably.
Side effects: As a consequence of this bugfix the default behaviour of unplugdrive had to be changed. Since we simply can’t tell users it is safe to unplug their rotational device while it is still spinning, the default has to take this into account. If user decides on his own not to use safe settings, he can use options.
So the option -s or –safe-mode is deprecated now, since safe mode is to be default now.
Instead we see two new options now:
-u – -unsafe which restores the unsafe behaviour known as default from former versions.
-i – -ignore doesn’t care of rotationals, even in default mode. This is meant to deal with some unreliable manufacturers, fooling us reporting to system their device was rotational even if this is not true. In case manufacturer have implemented this correctly (completely), the wrong report is acceptable, since these devices do actually react to spindown command with the correct answer (telling “yes, we are spun down” in no time) so everything works fine. But some manufacturers don’t care neither of correct reporting nor of responding to spindown command at all. Which causes system to wait useless 30 seconds for a response which never happens to come. Only in these special cases user may speed up things a little by using -i, knowing what he’s doing.
Some few new strings for this version are waiting for translation on transifex antiX contribs.
No need to copy strings 1:1 from ”Pirate English” to true English (en). Only If you want to make improvements to my doggerel original strings, please “translate” the string(s) in question to true English (en), leaving all the fine ones blank. If you want to have different flavours of English please feel free to add strings in en_GB, en_US and other English language flavours.
Now most of the strings are featured with developers notes and string instructions.
Program script file of unplugdrive ver. 0.83 on gitlab for download.
Unplugdrive Version 0.83 Language template file (.pot) on gitlab for download.
Unplugdrive 0.83 German language file (.mo) on gitlab for download.
As always: Please test this on any kind of plugable storage devices and please report any bugs here. I have myself done testing alredy with all pluggable devices within my reach.
If no problems show up, I’ll file a merge request for this version to anticapitalista next week.
Bear in mind, the wellknown “can’t-unmount-when-mountpoint-contains-blank-character” bug isn’t fixed yet in this version. So there is no need to report about this. Bugfix for this will come in next version.
Have fun with it
RobinJune 10, 2021 at 4:43 am #61270Memberskidoo
unless Jimmy had chosen the “toram” liveboot option, the boot device should be filtered from the list, eh?
(I didn’t test. Would umount recognize the boot device as “busy” and refuse to unmount it?)
footgun (plural footguns)
(programming slang, humorous, derogatory)
Any feature whose addition to a product results in the user shooting themselves in the foot.June 10, 2021 at 5:23 am #61271MemberRobin
Good morning skidoo (or hello, since I don’t know which daytime is in your place)
many thanks for your bug report. I know about this specific problem and have worked on it already. (I never have tried what actually happens if clicking OK in the dialog on your screenshot… since it was obvious to me live medium can only get removed under the condition you described.) But I was also aware of the fact, not all users might see the interdependence, so it is a good idea to prevent them from unplugging their live antiX boot medium. (We really don’t want to footgun antiX users)
I believe I have found a way to filter these devices from the list presented to user. But this took some major rewriting of the code (which deserves a bit cleanup anyway, all these different lists in use are a thorn in my side, this is legacy still from original script), and the new code is not ready for use by now. My new method filters devices which are storage source file systems of mounted filesystem images from being presented to user for unmounting, displaying them separately as not unmountable for this reason.
So this will get fixed in one of the next versions also.
So long and many thanks for testing!July 4, 2021 at 4:21 pm #62757MemberRobin
New language files available for unplugdrive ver. 0.83
Many thanks for the great work of all translators in any languages.
Language file updates for unplugdrive ver. 0.83 from transifex:
Belgian French (fr_BE)
sha-256-checksums for unplugdrive ver. 0.83:
f3546e19877a71e473b7ca462a0f027d0e209cf45fc736595771f7006b02341a unplugdrive.sh 556ecb616e48a81ec44bc396e109528214d15b8e2a0096e5e3bf99a74de85103 de/unplugdrive.sh.mo 2bf4dc04725a4c45dc7ded1aab2a2a3b875ae26f743e77a38ce41589c0bcb596 el/unplugdrive.sh.mo 4be229c3b54f20707a2e38b62898928adf3103315a422a490c67a9d9bc92a093 en/unplugdrive.sh.mo b03d0a9bf4061f043021b173c20360d3a44616af1311cdbc30a742d876eba40b es/unplugdrive.sh.mo 462abe687ea20c7679ed454ba1534514be46b99e4e1b8ab4d0c2f7d57a163673 fr/unplugdrive.sh.mo 8c45288ed1be9dd10d449c7258a691a73cb8dfdb39317ff4c5ae761ac8a4081f fr_BE/unplugdrive.sh.mo 84b989e6d333bacfca78c2130dc7235de4c86c7451bfdb7d0c7c51e083a59d4c pt/unplugdrive.sh.mo d44d3e0e8e7bba90ba5bee2494cdaec05ab8b76591ebea833988808283ca5c5a pt_BR/unplugdrive.sh.mo d4cb57f9c862b95af365ea2c15d2e70fa5df0432170fedcbe07431d882fbee7a ru/unplugdrive.sh.mo
Please note: users of country specific language files (four significant letter code) like e.g. “fr_BE” need to download the base language file (two significant letter code) e.g. “fr” also. Copy these language files to the corresponding system folder
Hint to English language users: this time there also is an English language file present, which contains some error corrections of original strings. It is recommended to copy the file to its target system folder. This works just like all the other languages also, but contains some few strings only, which get replaced automatically each time when script is run.
@anticapitalista: merge request on gitlab is filed now.July 17, 2021 at 6:14 pm #63200MemberQwerty
I’m totally not an expert on this topic and it looks like powering modern disks off by unplugging while they’re spinning should be safe at the hardware level anyway, but when it’s about clean and proper procedures, is just “hdparm -Y” really enough? I haven’t found a reliable source of information, but various guides that I read suggested
echo 1 >/sys/block/.../device/delete
and some of them
echo offline >/sys/block/.../device/state
before that too, but I’m not sure about the full set of actions done by these.
July 18, 2021 at 4:19 am #63221MemberRobin
- This reply was modified 3 months ago by Qwerty.
thank you very much for your suggestions. You meet my own concerns.
I haven’t found a reliable source of information
exactly this is the point. Since I also didn’t and don’t find any clean documentation about these commands (*), I believe it is not a good idea to use them. We need at least to know what exactly they are doing before engaging them.
it looks like powering modern disks off by unplugging while they’re spinning should be safe at the hardware level
Even for modern drives: “It looks like…“ isn’t enough. Moreover, this is antiX, and we have to consider users employing older hardware also. We can’t simply say: Let’s hope the users drives won’t get damaged, but we don’t have any clue whether this is true.
when it’s about clean and proper procedures, is just “hdparm -Y” really enough?
It’s about protecting users devices. And no, I’m quite sure it is not enough. But it is all I could do by now, since there doesn’t seem to exist any documented command providing a clean shutdown of rotational devices besides of “hdparm -Y”.
So if you can provide more pieces information about the exact effects and side effects of these commands, this would be a great help.
Also, any help of specialised experts in this area is highly welcome.
(*) Single “official” text I could find about it was from RHEL: Clean storage device removal But it doesn’t give any insights what exactly happens when the commands are performed.
- You must be logged in to reply to this topic.