Score:1

udisksctl power off wrong disk

im flag

I try to safely eject my external disk with the following 2 commands:

udisksctl unmount -b /dev/sdc1
udisksctl power-off -b /dev/sdc

The partition is correctly unmounted, but the second command gives the following error:

Error powering off drive: The drive in use: Device /dev/sdb1 is mounted (udisks-error-quark, 14)

Yes, I have another partition on another drive mounted /dev/sdb. But I want to power-off /dev/sdc. How is this supposed to happen? How can I remove safely sdc?

Ubuntu 20.04

(base) home@home:~$ lsblk --topology --exclude 7
NAME                      ALIGNMENT MIN-IO OPT-IO PHY-SEC LOG-SEC ROTA SCHED       RQ-SIZE  RA WSAME
sda                               0   4096      0    4096     512    1 mq-deadline      64 128    0B
├─sda1                            0   4096      0    4096     512    1 mq-deadline      64 128    0B
├─sda2                            0   4096      0    4096     512    1 mq-deadline      64 128    0B
└─sda3                            0   4096      0    4096     512    1 mq-deadline      64 128    0B
  └─ubuntu--vg-ubuntu--lv         0   4096      0    4096     512    1                 128 128    0B
sdb                               0   4096      0    4096     512    1 mq-deadline       2 128    0B
└─sdb1                            0   4096      0    4096     512    1 mq-deadline       2 128    0B
sdc                               0   4096      0    4096     512    1 mq-deadline       2 128    0B
├─sdc1                         3072   4096      0    4096     512    1 mq-deadline       2 128    0B
└─sdc2                            0   4096      0    4096     512    1 mq-deadline       2 128    0B
sr0                               0    512      0     512     512    1 mq-deadline      64 128    0B

Thanks

N0rbert avatar
zw flag
What is your Ubuntu version? Please add the output of `lsblk --topology --exclude 7` to the question.
Melvin86 avatar
im flag
@N0rbert thanks for answering and sorry for my delay. I added the information needed.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.