Unable to detach (spindown) external USB HDD in 15.04; “Safely Remove” just remounts it












4















I have an external USB 3.0 HDD with several partitions on it, and I can't safely remove it (spin it down) before unplugging in Ubuntu 15.04.



I can run "Unmount" on each partition; but after unmounting all partitions disk is still spinning (it vibrates and I hear the spinning), and I think it may be unsafe to unplug it in such condition.



There is a Safely Remove Drive context menu option in Nautilus, Safely remove parent device in left Unity panel, and there is the command udisks --detach /dev/sdb (recommended in this Ubuntu Forums post). After any of these actions HDD spins down for 0.4-0.5 seconds, and then it is detected again as plugged in; all its partitions are auto-mounted just like when I insert its USB cable for the first time.



In dmesg I see



[ 46.592192] usb 3-1: USB disconnect, device number 4
[ 47.003378] usb 3-1: new SuperSpeed USB device number 5 using xhci_hcd
...
[ 48.638436] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)


Click "Safely Remove Drive" for second time:



[ 68.815860] usb 3-1: USB disconnect, device number 6
[ 69.229567] usb 3-1: new SuperSpeed USB device number 7 using xhci_hcd
....
[ 71.199942] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)


How can I safely unmount and spindown an external HDD without having it get redetected in seconds?










share|improve this question




















  • 2





    I'm facing the same problem, the drive is mounted again automatically. How can we remove it safely then???

    – Salvatorelab
    Aug 2 '15 at 9:15
















4















I have an external USB 3.0 HDD with several partitions on it, and I can't safely remove it (spin it down) before unplugging in Ubuntu 15.04.



I can run "Unmount" on each partition; but after unmounting all partitions disk is still spinning (it vibrates and I hear the spinning), and I think it may be unsafe to unplug it in such condition.



There is a Safely Remove Drive context menu option in Nautilus, Safely remove parent device in left Unity panel, and there is the command udisks --detach /dev/sdb (recommended in this Ubuntu Forums post). After any of these actions HDD spins down for 0.4-0.5 seconds, and then it is detected again as plugged in; all its partitions are auto-mounted just like when I insert its USB cable for the first time.



In dmesg I see



[ 46.592192] usb 3-1: USB disconnect, device number 4
[ 47.003378] usb 3-1: new SuperSpeed USB device number 5 using xhci_hcd
...
[ 48.638436] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)


Click "Safely Remove Drive" for second time:



[ 68.815860] usb 3-1: USB disconnect, device number 6
[ 69.229567] usb 3-1: new SuperSpeed USB device number 7 using xhci_hcd
....
[ 71.199942] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)


How can I safely unmount and spindown an external HDD without having it get redetected in seconds?










share|improve this question




















  • 2





    I'm facing the same problem, the drive is mounted again automatically. How can we remove it safely then???

    – Salvatorelab
    Aug 2 '15 at 9:15














4












4








4


2






I have an external USB 3.0 HDD with several partitions on it, and I can't safely remove it (spin it down) before unplugging in Ubuntu 15.04.



I can run "Unmount" on each partition; but after unmounting all partitions disk is still spinning (it vibrates and I hear the spinning), and I think it may be unsafe to unplug it in such condition.



There is a Safely Remove Drive context menu option in Nautilus, Safely remove parent device in left Unity panel, and there is the command udisks --detach /dev/sdb (recommended in this Ubuntu Forums post). After any of these actions HDD spins down for 0.4-0.5 seconds, and then it is detected again as plugged in; all its partitions are auto-mounted just like when I insert its USB cable for the first time.



In dmesg I see



[ 46.592192] usb 3-1: USB disconnect, device number 4
[ 47.003378] usb 3-1: new SuperSpeed USB device number 5 using xhci_hcd
...
[ 48.638436] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)


Click "Safely Remove Drive" for second time:



[ 68.815860] usb 3-1: USB disconnect, device number 6
[ 69.229567] usb 3-1: new SuperSpeed USB device number 7 using xhci_hcd
....
[ 71.199942] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)


How can I safely unmount and spindown an external HDD without having it get redetected in seconds?










share|improve this question
















I have an external USB 3.0 HDD with several partitions on it, and I can't safely remove it (spin it down) before unplugging in Ubuntu 15.04.



I can run "Unmount" on each partition; but after unmounting all partitions disk is still spinning (it vibrates and I hear the spinning), and I think it may be unsafe to unplug it in such condition.



There is a Safely Remove Drive context menu option in Nautilus, Safely remove parent device in left Unity panel, and there is the command udisks --detach /dev/sdb (recommended in this Ubuntu Forums post). After any of these actions HDD spins down for 0.4-0.5 seconds, and then it is detected again as plugged in; all its partitions are auto-mounted just like when I insert its USB cable for the first time.



In dmesg I see



[ 46.592192] usb 3-1: USB disconnect, device number 4
[ 47.003378] usb 3-1: new SuperSpeed USB device number 5 using xhci_hcd
...
[ 48.638436] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)


Click "Safely Remove Drive" for second time:



[ 68.815860] usb 3-1: USB disconnect, device number 6
[ 69.229567] usb 3-1: new SuperSpeed USB device number 7 using xhci_hcd
....
[ 71.199942] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)


How can I safely unmount and spindown an external HDD without having it get redetected in seconds?







mount 15.04 external-hdd






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 12 at 15:33









Zanna

51k13138242




51k13138242










asked Jul 12 '15 at 10:34









osgxosgx

497516




497516








  • 2





    I'm facing the same problem, the drive is mounted again automatically. How can we remove it safely then???

    – Salvatorelab
    Aug 2 '15 at 9:15














  • 2





    I'm facing the same problem, the drive is mounted again automatically. How can we remove it safely then???

    – Salvatorelab
    Aug 2 '15 at 9:15








2




2





I'm facing the same problem, the drive is mounted again automatically. How can we remove it safely then???

– Salvatorelab
Aug 2 '15 at 9:15





I'm facing the same problem, the drive is mounted again automatically. How can we remove it safely then???

– Salvatorelab
Aug 2 '15 at 9:15










1 Answer
1






active

oldest

votes


















0














First of all, you must unmount all partitions mounted on the USB HDD, then try detach it. I gave an example below with udisksctl



1 Use lsblk to see your USB HDD and all mounted partition on it:



Shell@localhost:~$ lsblk
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 128M 0 part
└─sda2 8:2 0 931.4G 0 part /
sdb 8:16 0 501.8G 0 disk
└─sdb1 8:20 0 500.2G 0 part /USBDRIVE


2 Unmount all mounted partition for USB HDD



sudo umount /dev/sdb1


3 Power off the USB HDD using next command :



udisksctl power-off -b /dev/sdb



replace /dev/sdb with the correct USB HDD.






share|improve this answer


























  • What are real actions done by "udisksctl power-off"?

    – osgx
    Jun 1 '18 at 15:10











  • Arranges for the drive to be safely removed and powered off. On the OS side this includes ensuring that no process is using the drive, then requesting that in-flight buffers and caches are committed to stable storage. The exact steps for powering off the drive depends on the drive itself and the interconnect used. For drives connected through USB, the effect is that the USB device will be deconfigured followed by disabling the upstream hub port it is connected to.

    – Cornea Valentin
    Jun 1 '18 at 19:54











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f647478%2funable-to-detach-spindown-external-usb-hdd-in-15-04-safely-remove-just-remo%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














First of all, you must unmount all partitions mounted on the USB HDD, then try detach it. I gave an example below with udisksctl



1 Use lsblk to see your USB HDD and all mounted partition on it:



Shell@localhost:~$ lsblk
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 128M 0 part
└─sda2 8:2 0 931.4G 0 part /
sdb 8:16 0 501.8G 0 disk
└─sdb1 8:20 0 500.2G 0 part /USBDRIVE


2 Unmount all mounted partition for USB HDD



sudo umount /dev/sdb1


3 Power off the USB HDD using next command :



udisksctl power-off -b /dev/sdb



replace /dev/sdb with the correct USB HDD.






share|improve this answer


























  • What are real actions done by "udisksctl power-off"?

    – osgx
    Jun 1 '18 at 15:10











  • Arranges for the drive to be safely removed and powered off. On the OS side this includes ensuring that no process is using the drive, then requesting that in-flight buffers and caches are committed to stable storage. The exact steps for powering off the drive depends on the drive itself and the interconnect used. For drives connected through USB, the effect is that the USB device will be deconfigured followed by disabling the upstream hub port it is connected to.

    – Cornea Valentin
    Jun 1 '18 at 19:54
















0














First of all, you must unmount all partitions mounted on the USB HDD, then try detach it. I gave an example below with udisksctl



1 Use lsblk to see your USB HDD and all mounted partition on it:



Shell@localhost:~$ lsblk
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 128M 0 part
└─sda2 8:2 0 931.4G 0 part /
sdb 8:16 0 501.8G 0 disk
└─sdb1 8:20 0 500.2G 0 part /USBDRIVE


2 Unmount all mounted partition for USB HDD



sudo umount /dev/sdb1


3 Power off the USB HDD using next command :



udisksctl power-off -b /dev/sdb



replace /dev/sdb with the correct USB HDD.






share|improve this answer


























  • What are real actions done by "udisksctl power-off"?

    – osgx
    Jun 1 '18 at 15:10











  • Arranges for the drive to be safely removed and powered off. On the OS side this includes ensuring that no process is using the drive, then requesting that in-flight buffers and caches are committed to stable storage. The exact steps for powering off the drive depends on the drive itself and the interconnect used. For drives connected through USB, the effect is that the USB device will be deconfigured followed by disabling the upstream hub port it is connected to.

    – Cornea Valentin
    Jun 1 '18 at 19:54














0












0








0







First of all, you must unmount all partitions mounted on the USB HDD, then try detach it. I gave an example below with udisksctl



1 Use lsblk to see your USB HDD and all mounted partition on it:



Shell@localhost:~$ lsblk
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 128M 0 part
└─sda2 8:2 0 931.4G 0 part /
sdb 8:16 0 501.8G 0 disk
└─sdb1 8:20 0 500.2G 0 part /USBDRIVE


2 Unmount all mounted partition for USB HDD



sudo umount /dev/sdb1


3 Power off the USB HDD using next command :



udisksctl power-off -b /dev/sdb



replace /dev/sdb with the correct USB HDD.






share|improve this answer















First of all, you must unmount all partitions mounted on the USB HDD, then try detach it. I gave an example below with udisksctl



1 Use lsblk to see your USB HDD and all mounted partition on it:



Shell@localhost:~$ lsblk
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 128M 0 part
└─sda2 8:2 0 931.4G 0 part /
sdb 8:16 0 501.8G 0 disk
└─sdb1 8:20 0 500.2G 0 part /USBDRIVE


2 Unmount all mounted partition for USB HDD



sudo umount /dev/sdb1


3 Power off the USB HDD using next command :



udisksctl power-off -b /dev/sdb



replace /dev/sdb with the correct USB HDD.







share|improve this answer














share|improve this answer



share|improve this answer








edited Jun 1 '18 at 13:01

























answered Jun 1 '18 at 12:44









Cornea ValentinCornea Valentin

1357




1357













  • What are real actions done by "udisksctl power-off"?

    – osgx
    Jun 1 '18 at 15:10











  • Arranges for the drive to be safely removed and powered off. On the OS side this includes ensuring that no process is using the drive, then requesting that in-flight buffers and caches are committed to stable storage. The exact steps for powering off the drive depends on the drive itself and the interconnect used. For drives connected through USB, the effect is that the USB device will be deconfigured followed by disabling the upstream hub port it is connected to.

    – Cornea Valentin
    Jun 1 '18 at 19:54



















  • What are real actions done by "udisksctl power-off"?

    – osgx
    Jun 1 '18 at 15:10











  • Arranges for the drive to be safely removed and powered off. On the OS side this includes ensuring that no process is using the drive, then requesting that in-flight buffers and caches are committed to stable storage. The exact steps for powering off the drive depends on the drive itself and the interconnect used. For drives connected through USB, the effect is that the USB device will be deconfigured followed by disabling the upstream hub port it is connected to.

    – Cornea Valentin
    Jun 1 '18 at 19:54

















What are real actions done by "udisksctl power-off"?

– osgx
Jun 1 '18 at 15:10





What are real actions done by "udisksctl power-off"?

– osgx
Jun 1 '18 at 15:10













Arranges for the drive to be safely removed and powered off. On the OS side this includes ensuring that no process is using the drive, then requesting that in-flight buffers and caches are committed to stable storage. The exact steps for powering off the drive depends on the drive itself and the interconnect used. For drives connected through USB, the effect is that the USB device will be deconfigured followed by disabling the upstream hub port it is connected to.

– Cornea Valentin
Jun 1 '18 at 19:54





Arranges for the drive to be safely removed and powered off. On the OS side this includes ensuring that no process is using the drive, then requesting that in-flight buffers and caches are committed to stable storage. The exact steps for powering off the drive depends on the drive itself and the interconnect used. For drives connected through USB, the effect is that the USB device will be deconfigured followed by disabling the upstream hub port it is connected to.

– Cornea Valentin
Jun 1 '18 at 19:54


















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f647478%2funable-to-detach-spindown-external-usb-hdd-in-15-04-safely-remove-just-remo%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How to reconfigure Docker Trusted Registry 2.x.x to use CEPH FS mount instead of NFS and other traditional...

is 'sed' thread safe

How to make a Squid Proxy server?