Page 1 of 1

USB removable HDDs & flash drives won't stay powered-off

Posted: 2022/05/13 22:00:50
by siliconclassics
Fresh CentOS 7 user here, migrated from Linux Lite and am already enjoying the greater polish & customizeability and the KDE desktop.

One nagging problem: I prefer to power down my USB storage devices via the Disks utility before unplugging them. On my prior system this worked fine but here they power off and then immediately return as if they had just been plugged back in.

Can anyone help?

Re: USB removable HDDs & flash drives won't stay powered-off

Posted: 2022/05/13 22:06:06
by TrevorH
I've always used udiskctl power-off -b /dev/sdX

Re: USB removable HDDs & flash drives won't stay powered-off

Posted: 2022/05/14 12:03:07
by siliconclassics
When I enter that it says "Unknown command `power-off'"

The accepted commands are as follows:

Usage:
udisksctl COMMAND

Commands:
help Shows this information
info Shows information about an object
dump Shows information about all objects
status Shows high-level status
monitor Monitor changes to objects
mount Mount a filesystem
unmount Unmount a filesystem
unlock Unlock an encrypted device
lock Lock an encrypted device
loop-setup Set-up a loop device
loop-delete Delete a loop device
smart-simulate Set SMART data for a drive


But moreso I'm wondering why removable drives immediately reappear after powering-down from the Disks utility (v3.14.0) as this was not the behavior on my previous distribution.

Re: USB removable HDDs & flash drives won't stay powered-off

Posted: 2022/05/14 12:10:21
by TrevorH
What updates do you get offered if you run yum update as it sounds like your system is not up to date. I checked on CentOS 7 and I get a power-off option listed in the output from udiskctl as the 2nd to last option, just after the loop-setup/loop-delete options.

Code: Select all

[root@centos7 ~]# rpm -qf $(which udisksctl)
udisks2-2.8.4-1.el7.x86_64