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

General support questions
Post Reply
User avatar
siliconclassics
Posts: 2
Joined: 2022/05/13 21:46:25

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

Post by siliconclassics » 2022/05/13 22:00:50

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?

User avatar
TrevorH
Site Admin
Posts: 32406
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

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

Post by TrevorH » 2022/05/13 22:06:06

I've always used udiskctl power-off -b /dev/sdX
CentOS 8 died a premature death at the end of 2021 - migrate to Rocky/Alma/OEL/Springdale ASAP.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are dead, do not use them.
Use the FAQ Luke

User avatar
siliconclassics
Posts: 2
Joined: 2022/05/13 21:46:25

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

Post by siliconclassics » 2022/05/14 12:03:07

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.
Last edited by siliconclassics on 2022/05/14 12:13:04, edited 1 time in total.

User avatar
TrevorH
Site Admin
Posts: 32406
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

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

Post by TrevorH » 2022/05/14 12:10:21

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
CentOS 8 died a premature death at the end of 2021 - migrate to Rocky/Alma/OEL/Springdale ASAP.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are dead, do not use them.
Use the FAQ Luke

Post Reply