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
lsblk --topology --exclude 7
to the question. – N0rbert Aug 07 '21 at 19:27