I am able to unmount any HDD partition (secondary storage) one by one but when i eject any one it ejects all mounted partitions. Both the partitions are on the same HDD. Is this a feature or a bug?
-
you mean "physically eject a disk"? then yes, that will always unmount all partitions. Those are all on the same disk so actually ejecting them means ejecting all.– RinzwindJun 8, 2020 at 11:37
-
Ejecting works on a disk? Not on a mounted partition. Then y do they have separate eject icons.– Mukul AnandJun 8, 2020 at 11:44
-
I guess ejecting ejects the whole disk. Try unmounting the partition. That should unmount only one partition.– nobodyJun 8, 2020 at 11:46
-
3Does this answer your question? What is the difference between "Unmount", "Eject", "Safely Remove Drive" and the eject icon?– user68186Jun 8, 2020 at 12:02
2 Answers
It’s a feature, and documented in the man page (note that I haven’t checked the Ubuntu 20.04 man page specifically):
If eject determines that the device can have multiple partitions, it will attempt to unmount all mounted partitions of the device before ejecting (see also --no-partitions-unmount). If an unmount fails, the program will not attempt to eject the media.
Since “eject” means something physical for the device, it makes sense to unmount all volumes on the device.
If what you’re looking to do is unmount a single volume, don’t use eject.
I guess the real reason for this behaviour is the difference between how to handle different partitions and devices in this link. It also discusses what is the difference between ejecting, unmounting, safely removing. I was thinking of it as an issue with my system but it seems it's a feature that's not so elegant.
What is the difference between "Unmount", "Eject", "Safely Remove Drive" and the eject icon?