Forum › Forums › Official Releases › antiX-21/22 “Grup Yorum” › WARNING! Regeression in pumount
Tagged: antiX 22, external, HDD, pumount, removable, rotational, spinning, unplugdrive
- This topic has 8 replies, 4 voices, and was last updated Apr 2-10:47 pm by Brian Masinick.
-
AuthorPosts
-
April 2, 2023 at 7:32 am #103897Member
Robin
BEWARE: When using pumount to unmount your spinning external hdds you may damage your true rotational external devices again when unplugging.
On recent antiX 22 I found that pumount, which was specially crafted by Xecure for antiX 21 to handle all this properly, now again fails to spin down the true rotationals.
Running:
$ pumount -D /dev/sdc Device /dev/sdc1 unmounted Device /dev/sdv stopped, you should now be able to safely unplug it $ echo $? 0But in spite of this message and the exit code 0 (zero) the device is still spinning full spead and even wouldn’t stop for the next hour.
When checking lsblk there is no /dev/sdc anymore, so you can’t even send a hdparm command directly to the disk to stop it:
hdparm -Y /dev/sdc /dev/sdc: No such file or directoryI didn’t find any way to spin the drive down and had to unplug it in full speed after an hour of internet research how to solve this issue. You’d have to fake an udev plug event to re-establish the /dev/sdc device folder again on kernel level, to be able to send the hdparm command. But I didn’t succeed to recreate the link without unplugging first… this is way above my paygrade.
BEWARE: This regression causes unplugdrive 0.93b to fail also when not running in sudo mode.
All users of spinning external devices are highly encouraged to use unplugdrive only with sudo as long this pumount issue regression is not fixed again. This renders using the icon in taskbar dangerous as well.You can safely use the sudoed mode of unplugdrive, which doesn’t make use of pumount and spins down the devices properly always still. So you should add the sudo to the icon using again the interim workaround Xecure had described here: https://www.antixforum.com/forums/topic/usb-drive-unmount-icon-on-toolbar/#post-66708
@antiX devs: please could somebody with programming skills look into the pumount program version Xecure has crafted, and fix it for antiX 22 and 23? Otherwise I’d need to deactivate the non-sudoed mode in unplugdrive again for security reasons.
Background:
Bugfixes:
— true rotational devices do spin down now when user is told it is safe to unplug.This bugfix has a side effect: user needs to enter sudo password now, since umount in contrast to pumount doesn’t accept normal users.
But it is simply impossible to get consistent behaviour from pumount.Xecure has found a workaround by creating a special version of the pumount tool to be included in antiX 21. So it was possible to make run the script unsudoed again, but only whith this specially crafted pumount you can run the unplugdrive script safely unsudoed. If this special version is not present, unplugdrive 0.93 series will tell you everything is fine, while actually possibly nothing was done.
Windows is like a submarine. Open a window and serious problems will start.
April 2, 2023 at 11:17 am #103905Forum Admin
anticapitalista
::antiX 21/22/23 is using pmount packaged by Xecure. (0.9.23-10~contribs1)
Philosophers have interpreted the world in many ways; the point is to change it.
antiX with runit - leaner and meaner.
April 2, 2023 at 3:17 pm #103917MemberRobin
::antiX 21/22/23 is using pmount packaged by Xecure. (0.9.23-10~contribs1)
@anticapitalista I’m aware of this. It is exactly the version Xecure had crafted originally, which is still present.
$ apt-cache policy pmount pmount: Installed: 0.9.23-10~contribs1 Candidate: 0.9.23-10~contribs1 Version table: *** 0.9.23-10~contribs1 500 500 http://ftp.halifax.rwth-aachen.de/mxlinux/packages/antix/bullseye bullseye/main i386 Packages 100 /var/lib/dpkg/status 0.9.23-6 500 500 http://ftp.de.debian.org/debian bullseye/main i386 PackagesBut some other system update must have caused to stop the fix Xecure has applied from working meanwhile. No idea what apt-upgrade exactly had caused it, or after which apt-upgrade at which point of time since the original testings this started to fail again. I even haven’t any clue how the fix Xecure has created works, so no idea where or what to look for.
But I can confirm that the -D command line option Xecure had added to pumount still exists and (falsely) reports to have done its task („Device /dev/sdv stopped, you should now be able to safely unplug it”), while the device actually isn’t spun down and stopped anymore like it did originally with the very same pumount version on antiX 19 on the very same hardware and the very same external hdds.
Meanwhile I did some further testing: Using sudo or being on true root console doesn’t help either to make pumount -D work again properly stopping true rotationals on antiX 22. Also it failed the same way on a most recently apt-upgraded antiX 21.
Maybe it is a kernel related issue? The original testing was done on a 4.19 antiX kernel, while the testing system runs 5.19 debian kernel now due to nouveau fails on lower kernels to run the graphic device, and no proprietary nvidia 304.137 driver can get installed on antiX > 19 due to nvidia don’t care to provide their crapy blobs to xorg devs, and additionally not providing working drivers the same time themselves. So maybe some feature or some change present in newer kernels might keep the -D option from working? Sorry, I’m not skilled to analyse Xecures code to find out.
The most problematic part of it is: I can’t repeat testings again and again on the external spinning USB hdd device to isolate the error causing parameters more clearly, since this would ruin the hardware, by repeatedly having no choice but cutting it off on full speed after pumount -D has failed. If there was a way to file hdparm -Y to the device still after pumount had failed I could do some more testing on this regression issue.
Windows is like a submarine. Open a window and serious problems will start.
April 2, 2023 at 3:47 pm #103920Forum Admin
anticapitalista
::@Robin But antiX-19 does not have Xecure’s version of pmount, but Debian’s.
What happens if you use Debian’s version of pmount on antiX-22/23?Philosophers have interpreted the world in many ways; the point is to change it.
antiX with runit - leaner and meaner.
April 2, 2023 at 3:47 pm #103921MemberRobin
::while the testing system runs 5.19 debian kernel now
Have done one more test, in spite of the danger for the hard disk (which is a 1,3 TB Seagate external drive containing all my backups) this time on antiX 23 64bit running on antiX kernel.
$ uname -r 6.1.10-antix.1-amd64-smpSame issue, the hdd isn’t spun down as originally designed.
Will only do any further testings with my spinning drives after the issue was addressed.
By then I’ll use unplugdrive in sudo mode, and strongly advise people using spinning external devices to do the same. Unplugging a spinning device at full speed is a true hdd killer.
Windows is like a submarine. Open a window and serious problems will start.
April 2, 2023 at 3:54 pm #103923MemberRobin
::But antiX-19 does not have Xecure’s version of pmount, but Debian’s.
I know this, but please recollect, the original testing was done in late 2021, and I had out of tree installed Xecures testing version of pmount on antiX 19 (where it runs perfectly) since I couldn’t upgrade to antiX 21 due to nouveau driver available those days not handling the nvidia gpu properly, and no way to install the proprietary nvidia drivers the same time. So Xecure himself and Marcelo did the antiX 21 testing of pumount, while I did the tests on antiX 17 and 19.
Windows is like a submarine. Open a window and serious problems will start.
April 2, 2023 at 4:19 pm #103925MemberRobin
::What happens if you use Debian’s version of pmount on antiX-22/23?
Checked on antiX 23:
$ apt-cache policy pmount pmount: Installiert: 0.9.23-10~contribs1 Installationskandidat: 0.9.23-10~contribs1 Versionstabelle: *** 0.9.23-10~contribs1 500 500 http://repo.antixlinux.com/testing testing/main amd64 Packages 100 /var/lib/dpkg/status 0.9.23-6 500 500 http://ftp.de.debian.org/debian bookworm/main amd64 Packages 0.9.23-3+b2 500 500 http://ftp.de.debian.org/debian buster/main amd64 PackagesOriginal behaviour of antiX (Xecure) pmount version:
$ pumount -D /dev/sdc Device /dev/sdc1 unmounted Device /dev/sdc stopped, you should now be able to safely unplug it(but drive doesn’t stop spinning and is inaccessible afterwards for any commands like hdparm which could actually stop it)
Default debian version:
$ sudo apt-get install pmount=0.9.23-6 Paketlisten werden gelesen… Fertig Abhängigkeitsbaum wird aufgebaut… Fertig Statusinformationen werden eingelesen… Fertig Die folgenden Pakete werden durch eine ÄLTERE VERSION ERSETZT (Downgrade): pmount 0 aktualisiert, 0 neu installiert, 1 durch eine ältere Version ersetzt, 0 zu entfernen und 194 nicht aktualisiert. Es müssen 86,2 kB an Archiven heruntergeladen werden. Nach dieser Operation werden 8.192 B Plattenplatz freigegeben. Möchten Sie fortfahren? [J/n] j Holen:1 http://ftp.de.debian.org/debian bookworm/main amd64 pmount amd64 0.9.23-6 [86,2 kB] Es wurden 86,2 kB in 0 s geholt (200 kB/s). dpkg: Warnung: Version 0.9.23-10~contribs1 des Paketes pmount wird durch ältere Version 0.9.23-6 ersetzt (Lese Datenbank ... 285808 Dateien und Verzeichnisse sind derzeit installiert.) Vorbereitung zum Entpacken von .../pmount_0.9.23-6_amd64.deb ... Entpacken von pmount (0.9.23-6) über (0.9.23-10~contribs1) ... pmount (0.9.23-6) wird eingerichtet ... Trigger für man-db (2.11.2-1) werden verarbeitet ... $ pmount -D /dev/sdc pmount: Ungültige Option -- DAnd also debian backports version (had on purpose added the buster repo to check against the the old antiX 17 debian pmount):
$ LANG=C sudo apt-get install pmount=0.9.23-3+b2 Reading package lists... Done Building dependency tree... Done Reading state information... Done The following packages will be DOWNGRADED: pmount 0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 194 not upgraded. Need to get 85.6 kB of archives. After this operation, 2048 B disk space will be freed. Do you want to continue? [Y/n] y Get:1 http://ftp.de.debian.org/debian buster/main amd64 pmount amd64 0.9.23-3+b2 [85.6 kB] Fetched 85.6 kB in 0s (333 kB/s) dpkg: warning: downgrading pmount from 0.9.23-6 to 0.9.23-3+b2 (Reading database ... 285808 files and directories currently installed.) Preparing to unpack .../pmount_0.9.23-3+b2_amd64.deb ... Unpacking pmount (0.9.23-3+b2) over (0.9.23-6) ... Setting up pmount (0.9.23-3+b2) ... Processing triggers for man-db (2.11.2-1) ... $ LANG=C pmount -D /dev/sdc pmount: invalid option -- 'D'——————-
Update:
Debian versions can’t handle unmount of luks encrypted partitions and drives properly either, as used in unsudoed unplugdrive, the –luks-force option is missing in debian pmount versions.——————-
2nd Update:
Debian versions still can’t do the job at all, it refuses to work on drives but allows only partitions (since -D option isn’t present, and it fails completely without this):$ LANG=C pumount /dev/sdd Error: device /dev/sdd is not mounted $ mount […] /dev/sdd1 on /media/demo/sdd1-ata-ST31000528AS_9VP type ext3 (rw,nosuid,nodev,noexec,noatime)Debian pumount still allows unmount of partition, but this won’t stop the drive spinning:
$ LANG=C pumount /dev/sdd1 $ echo $? 0While the drive is still spinning (what was expected, since only the partition was addressed by /dev/sdd1, not the drive /dev/sdd itself).
- This reply was modified 1 month, 1 week ago by Robin. Reason: Update
- This reply was modified 1 month, 1 week ago by Robin. Reason: 2nd update
Windows is like a submarine. Open a window and serious problems will start.
April 2, 2023 at 7:49 pm #103937MemberXunzi_23
::USB unmount just failed me too. In my case today Phone, Probably related.
antiX23 beta, fully updated. Phone Honor 9X. was a problem to mount now
just stays mounted. Overdose…April 2, 2023 at 10:47 pm #103945Moderator
Brian Masinick
::Since the behavior has been explained, documented and repeated by at least two forum participants, should we consider the behavior a defect?
If so, please note accordingly, thanks.
--
Brian Masinick -
AuthorPosts
- You must be logged in to reply to this topic.