Gnome Disk Utility Issues incorrect command when ejecting a SATA Harddisk or Solid State Drive
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
udisks |
Unknown
|
Unknown
|
|||
gnome-disk-utility (Ubuntu) |
Triaged
|
Low
|
Unassigned |
Bug Description
Use case: As a user of hot swap-able SATA disks using a Harddrive Riser over eSATA. I need a safe, easy and convenient way to remove the hot swap-able SATA disk without rebooting and without having to go to the command line.
When attempting to eject an harddisk or a solid state disk using the eject button in "Gnome Disk Utility" it issues the 'eject' command which results in an IOCTL error.
The correct commands the eject button in the GUI should issue to eject a SATA HDD or SSD are:
# where X is the drive letter of the drive being worked with
# -Y Put drive to sleep
sudo hdparm -Y /dev/sdX
# remove the device from the kernel
sudo sh -c 'echo 1 > /sys/block/
Please see the screen shots for the error.
This should be an easy fix (20 minutes) for someone who is good a programmer.
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: gnome-disk-utility 3.28.3-
ProcVersionSign
Uname: Linux 4.15.0-74-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.9-0ubuntu7.9
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Wed Jan 8 21:07:32 2020
InstallationDate: Installed on 2018-11-11 (423 days ago)
InstallationMedia: Ubuntu 18.04.1 LTS "Bionic Beaver" - Release amd64 (20180725)
SourcePackage: gnome-disk-utility
UpgradeStatus: No upgrade log present (probably fresh install)
Translation of the Error message to English:
Removal of the medium has failed
Error ejecting /dev/sdi: Command-line `eject"/dev/sdi"' exited with a non-zero status 1: error-quark, 0)
eject: could not eject, last error:
Incorrect ioctl() for device
(udisks-
So you can see in the error message that the incorrect command was used for the type of drive.