Re: Distinguishing among [unmount, Safely Remove Drive, Eject]

2018-05-09 Thread Liam O'Toole
On 2018-05-09, Brian  wrote:
> On Wed 09 May 2018 at 12:50:29 -0500, Richard Owlett wrote:
>
>> On 05/06/2018 09:42 AM, Richard Owlett wrote:
>> > On 05/06/2018 09:26 AM, Brian wrote:
>> > > On Sun 06 May 2018 at 15:53:05 +1200, Richard Hector wrote:
>> > > 
>> > > > On 06/05/18 07:35, Brian wrote:
>> > > > > On Sat 05 May 2018 at 11:06:25 -0500, Richard Owlett wrote:
>> > > > > 
>> > > > > > What are the distinguishing features of unmount, Safely
>> > > > > > Remove Drive, and
>> > > > > > Eject?
>> > > > > 
>> 
>> [*SNIP*]
>> 
>> > > 
>> > > Although it is from a few years ago, the material at
>> > > 
>> > >    https://bugzilla.gnome.org/show_bug.cgi?id=598690
>> > > 
>> > > could still be useful. Safely Remove Drive and Eject are associated
>> > > with DEs, although Xfce seems to manage without them and has unmount as
>> > > an only option.
>> 
>> Just got a chance to look at it, has points in common with my problem.
>> It, and related bugs, will be worth a detailed read.
>
> You have *never* explained what *your* problem is. Whatever *you* read
> will not make it any clearer to us what the issue is. It is what *we*
> read which determines what we have to respond to. Could you not be more
> helpful and forthcoming?
>
>> I'm suspecting that there were explicit choices made that I wouldn't.
>
> You can suspect what you like. We would like to know exactly what it
> is that is exercising you.
>
>> Or, to paraphrase a truism, "You can satisfy some of the people all of the
>> time, and all of the people some of the time, but you can not satisfy all of
>> the people all of the time."
>
> Gosh, I wish I had said that!
>

You just broke my ironometer. Thanks a bunch.



Re: Distinguishing among [unmount, Safely Remove Drive, Eject]

2018-05-09 Thread Brian
On Wed 09 May 2018 at 13:01:09 -0500, Richard Owlett wrote:

> On 05/08/2018 02:09 PM, Brian wrote:
> > On Sun 06 May 2018 at 07:27:17 -0500, Richard Owlett wrote:
> > 
> > > I'm running Debian 9 with MATE.
> > > My observed symptoms were initially observed related to what choices given
> > > when right clicking on the icon associated with a partition.
> > 
> > Are you at liberty to talk about and describe the symptoms in public?
> > 
> 
> After a  brief read of https://bugzilla.gnome.org/show_bug.cgi?id=598690 I
> suspect that what's bothering me was done by design. I've got some reading
> ahead.

Deconstruction: That's the way it works. (But I would like it to work my
way. Strangely enough - it doesn't work like that).

-- 
Brian.



Re: Distinguishing among [unmount, Safely Remove Drive, Eject]

2018-05-09 Thread Brian
On Wed 09 May 2018 at 12:50:29 -0500, Richard Owlett wrote:

> On 05/06/2018 09:42 AM, Richard Owlett wrote:
> > On 05/06/2018 09:26 AM, Brian wrote:
> > > On Sun 06 May 2018 at 15:53:05 +1200, Richard Hector wrote:
> > > 
> > > > On 06/05/18 07:35, Brian wrote:
> > > > > On Sat 05 May 2018 at 11:06:25 -0500, Richard Owlett wrote:
> > > > > 
> > > > > > What are the distinguishing features of unmount, Safely
> > > > > > Remove Drive, and
> > > > > > Eject?
> > > > > 
> 
> [*SNIP*]
> 
> > > 
> > > Although it is from a few years ago, the material at
> > > 
> > >    https://bugzilla.gnome.org/show_bug.cgi?id=598690
> > > 
> > > could still be useful. Safely Remove Drive and Eject are associated
> > > with DEs, although Xfce seems to manage without them and has unmount as
> > > an only option.
> 
> Just got a chance to look at it, has points in common with my problem.
> It, and related bugs, will be worth a detailed read.

You have *never* explained what *your* problem is. Whatever *you* read
will not make it any clearer to us what the issue is. It is what *we*
read which determines what we have to respond to. Could you not be more
helpful and forthcoming?

> I'm suspecting that there were explicit choices made that I wouldn't.

You can suspect what you like. We would like to know exactly what it
is that is exercising you.

> Or, to paraphrase a truism, "You can satisfy some of the people all of the
> time, and all of the people some of the time, but you can not satisfy all of
> the people all of the time."

Gosh, I wish I had said that!

-- 
Brian.



Re: Distinguishing among [unmount, Safely Remove Drive, Eject]

2018-05-09 Thread Richard Owlett

On 05/08/2018 02:09 PM, Brian wrote:

On Sun 06 May 2018 at 07:27:17 -0500, Richard Owlett wrote:


I'm running Debian 9 with MATE.
My observed symptoms were initially observed related to what choices given
when right clicking on the icon associated with a partition.


Are you at liberty to talk about and describe the symptoms in public?



After a  brief read of https://bugzilla.gnome.org/show_bug.cgi?id=598690 
I suspect that what's bothering me was done by design. I've got some 
reading ahead.






Re: Distinguishing among [unmount, Safely Remove Drive, Eject]

2018-05-09 Thread Richard Owlett

On 05/06/2018 09:42 AM, Richard Owlett wrote:

On 05/06/2018 09:26 AM, Brian wrote:

On Sun 06 May 2018 at 15:53:05 +1200, Richard Hector wrote:


On 06/05/18 07:35, Brian wrote:

On Sat 05 May 2018 at 11:06:25 -0500, Richard Owlett wrote:

What are the distinguishing features of unmount, Safely Remove 
Drive, and

Eject?




[*SNIP*]



Although it is from a few years ago, the material at

   https://bugzilla.gnome.org/show_bug.cgi?id=598690

could still be useful. Safely Remove Drive and Eject are associated
with DEs, although Xfce seems to manage without them and has unmount as
an only option.


Just got a chance to look at it, has points in common with my problem.
It, and related bugs, will be worth a detailed read.
I'm suspecting that there were explicit choices made that I wouldn't.
Or, to paraphrase a truism, "You can satisfy some of the people all of 
the time, and all of the people some of the time, but you can not 
satisfy all of the people all of the time."



[snip]
That explains a lot. Will have to wait till this afternoon to read your 
reference.








Re: Distinguishing among [unmount, Safely Remove Drive, Eject]

2018-05-08 Thread Brian
On Sun 06 May 2018 at 07:27:17 -0500, Richard Owlett wrote:

> I'm running Debian 9 with MATE.
> My observed symptoms were initially observed related to what choices given
> when right clicking on the icon associated with a partition.

Are you at liberty to talk about and describe the symptoms in public?

-- 
Brian.



Re: Distinguishing among [unmount, Safely Remove Drive, Eject]

2018-05-06 Thread Henrique de Moraes Holschuh
On Sun, 06 May 2018, Richard Owlett wrote:
> On 05/06/2018 06:23 AM, Henrique de Moraes Holschuh wrote:
> > Anyway, it looks like it is giving you "unmount" when it thinks it is an
> > unremovable device, and the two others when it thinks either the device
> > or the media might be removable.
> 
> I'm running Debian 9 with MATE.
> My observed symptoms were initially observed related to what choices given
> when right clicking on the icon associated with a partition.

Ok, so it is the "device/partition is registered as removable" thing, as
hinted by the kernel plus whatever overrides udev/udisks2/MATE has for a
particular device / device type.

> I suspect the underlying probably is related to how/when something is
> "auto-magically" mounted. YES, a vague statement. This afternoon I plan to
> run some tests.

Indeed.  Anyway, FWIW, there are ways (through udev or equivalent) to
change the system's notion of whether a device is removable or not.
Unfortunately, it has been half a decade I needed to mess with this, so
I don't recall the incantations.

As for removable *media* (cdroms, etc), the kernel will return an error
when the eject IOCTL is issued and the operation cannot be performed for
any reason (e.g., you tried it on a SSD/HDD, or the optical drive tray
was locked, or the media is mounted and in use).  I *assume* that
userspace (MATE, udisks, whatever) _might_ decide to (in some
situations), attempt to "safely remove" when the eject IOCTL fails with
an "ioctl innapropriate for this device" error.

-- 
  Henrique Holschuh



Re: Distinguishing among [unmount, Safely Remove Drive, Eject]

2018-05-06 Thread Richard Owlett

On 05/06/2018 09:26 AM, Brian wrote:

On Sun 06 May 2018 at 15:53:05 +1200, Richard Hector wrote:


On 06/05/18 07:35, Brian wrote:

On Sat 05 May 2018 at 11:06:25 -0500, Richard Owlett wrote:


What are the distinguishing features of unmount, Safely Remove Drive, and
Eject?


There are none. The device is either unmounted or it isn't. It cannnot
be half-unmounted.


Hmm. Is there not a point where it's been made inaccessible to the
filesystem, but caches are not yet flushed?


I don't know but I've always thought that unmounting a USB stick led to
a sync action and buffers were flushed. Anyway, in the light of Henrique
de Moraes Holschuh's enlightening post I'll back away a little from my
previous mail and give a restructured response.

Although it is from a few years ago, the material at

   https://bugzilla.gnome.org/show_bug.cgi?id=598690

could still be useful. Safely Remove Drive and Eject are associated
with DEs, although Xfce seems to manage without them and has unmount as
an only option.

udisks2 is the software involved. A test (as an unprivileged user) after
plugging in a USB stick:

  lsblk(To get the device)
  udisksctl mount -b /dev/sdg1
  udisksctl unmount -b /dev/sdg1   (Must be done before the next command).
  udisksctl power-off -b /dev/sdg1 (Observe indicator light on the stick).

The stick needs detaching and re-inserting to get mounting to work again.


From udisksctl(1):


  power-off
   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.
  
   Note that as some physical devices contain multiple drives (for

   example 4-in-1 flash card reader USB devices) powering off one drive
   may affect other drives. As such there are not a lot of guarantees
   associated with performing this action. Usually the effect is that
   the drive disappears as if it was unplugged.

I'm still pondering why I would need power-off with a USB device.



That explains a lot. Will have to wait till this afternoon to read your 
reference.






Re: Distinguishing among [unmount, Safely Remove Drive, Eject]

2018-05-06 Thread Richard Owlett

On 05/06/2018 09:19 AM, Reco wrote:

Hi.

On Sun, May 06, 2018 at 09:07:50AM -0500, Richard Owlett wrote:

On 05/06/2018 08:30 AM, Reco wrote:

Hi.

On Sun, May 06, 2018 at 09:05:19AM -0400, rhkra...@gmail.com wrote:

On Sunday, May 06, 2018 08:11:25 AM Reco wrote:

Hi.

On Sun, May 06, 2018 at 07:51:24AM -0400, rhkra...@gmail.com wrote:

On Sunday, May 06, 2018 07:10:53 AM Reco wrote:

Certain Modern Desktop Environment™ is known for
its effort to "simplify the things for the user". Some may even say
that it's "dumbing down things".


For the *uninitiated (or old)* among us, care to enlighten us?


Easy. Does it look like it's designed for a tablet?
Does it look pretty yet likes to crash often?
Or maybe it has a rodent on a logo?


Doesn't help me--see *emphasized" part in my first response.

I guess I'm not using one, but I'd like to know what to avoid in the future.


This list is known for shadowbanning its users if certain words are
mentioned. I'd like to avoid it.

I propose a techincal criteria then.
If it can be run via Wayland - it's Modern.
If still it requires X to run - it's not.



Does that gibberish have any thing to do with Debian 9 installed from then
current repository via netinst?


No. Should it? Hint - please read the e-mail topic.



 I be OP and never requested Wayland, but just 
discovered that Synaptic reports I have *FOUR* of its modules installed.










Re: Distinguishing among [unmount, Safely Remove Drive, Eject]

2018-05-06 Thread Brian
On Sun 06 May 2018 at 15:53:05 +1200, Richard Hector wrote:

> On 06/05/18 07:35, Brian wrote:
> > On Sat 05 May 2018 at 11:06:25 -0500, Richard Owlett wrote:
> > 
> >> What are the distinguishing features of unmount, Safely Remove Drive, and
> >> Eject?
> > 
> > There are none. The device is either unmounted or it isn't. It cannnot
> > be half-unmounted.
> 
> Hmm. Is there not a point where it's been made inaccessible to the
> filesystem, but caches are not yet flushed?

I don't know but I've always thought that unmounting a USB stick led to
a sync action and buffers were flushed. Anyway, in the light of Henrique
de Moraes Holschuh's enlightening post I'll back away a little from my
previous mail and give a restructured response.

Although it is from a few years ago, the material at

  https://bugzilla.gnome.org/show_bug.cgi?id=598690

could still be useful. Safely Remove Drive and Eject are associated
with DEs, although Xfce seems to manage without them and has unmount as
an only option.

udisks2 is the software involved. A test (as an unprivileged user) after
plugging in a USB stick:

 lsblk(To get the device)
 udisksctl mount -b /dev/sdg1
 udisksctl unmount -b /dev/sdg1   (Must be done before the next command).
 udisksctl power-off -b /dev/sdg1 (Observe indicator light on the stick).

The stick needs detaching and re-inserting to get mounting to work again.

>From udisksctl(1):

 power-off
  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.
 
  Note that as some physical devices contain multiple drives (for
  example 4-in-1 flash card reader USB devices) powering off one drive
  may affect other drives. As such there are not a lot of guarantees
  associated with performing this action. Usually the effect is that
  the drive disappears as if it was unplugged.

I'm still pondering why I would need power-off with a USB device.

-- 
Brian.



Re: Distinguishing among [unmount, Safely Remove Drive, Eject]

2018-05-06 Thread Reco
Hi.

On Sun, May 06, 2018 at 09:07:50AM -0500, Richard Owlett wrote:
> On 05/06/2018 08:30 AM, Reco wrote:
> > Hi.
> > 
> > On Sun, May 06, 2018 at 09:05:19AM -0400, rhkra...@gmail.com wrote:
> > > On Sunday, May 06, 2018 08:11:25 AM Reco wrote:
> > > > Hi.
> > > > 
> > > > On Sun, May 06, 2018 at 07:51:24AM -0400, rhkra...@gmail.com wrote:
> > > > > On Sunday, May 06, 2018 07:10:53 AM Reco wrote:
> > > > > > Certain Modern Desktop Environment™ is known for
> > > > > > its effort to "simplify the things for the user". Some may even say
> > > > > > that it's "dumbing down things".
> > > > > 
> > > > > For the *uninitiated (or old)* among us, care to enlighten us?
> > > > 
> > > > Easy. Does it look like it's designed for a tablet?
> > > > Does it look pretty yet likes to crash often?
> > > > Or maybe it has a rodent on a logo?
> > > 
> > > Doesn't help me--see *emphasized" part in my first response.
> > > 
> > > I guess I'm not using one, but I'd like to know what to avoid in the 
> > > future.
> > 
> > This list is known for shadowbanning its users if certain words are
> > mentioned. I'd like to avoid it.
> > 
> > I propose a techincal criteria then.
> > If it can be run via Wayland - it's Modern.
> > If still it requires X to run - it's not.
> > 
> 
> Does that gibberish have any thing to do with Debian 9 installed from then
> current repository via netinst?

No. Should it? Hint - please read the e-mail topic.



Re: Distinguishing among [unmount, Safely Remove Drive, Eject]

2018-05-06 Thread Richard Owlett

On 05/06/2018 08:30 AM, Reco wrote:

Hi.

On Sun, May 06, 2018 at 09:05:19AM -0400, rhkra...@gmail.com wrote:

On Sunday, May 06, 2018 08:11:25 AM Reco wrote:

Hi.

On Sun, May 06, 2018 at 07:51:24AM -0400, rhkra...@gmail.com wrote:

On Sunday, May 06, 2018 07:10:53 AM Reco wrote:

Certain Modern Desktop Environment™ is known for
its effort to "simplify the things for the user". Some may even say
that it's "dumbing down things".


For the *uninitiated (or old)* among us, care to enlighten us?


Easy. Does it look like it's designed for a tablet?
Does it look pretty yet likes to crash often?
Or maybe it has a rodent on a logo?


Doesn't help me--see *emphasized" part in my first response.

I guess I'm not using one, but I'd like to know what to avoid in the future.


This list is known for shadowbanning its users if certain words are
mentioned. I'd like to avoid it.

I propose a techincal criteria then.
If it can be run via Wayland - it's Modern.
If still it requires X to run - it's not.



Does that gibberish have any thing to do with Debian 9 installed from 
then current repository via netinst?







Re: Distinguishing among [unmount, Safely Remove Drive, Eject]

2018-05-06 Thread Reco
Hi.

On Sun, May 06, 2018 at 09:05:19AM -0400, rhkra...@gmail.com wrote:
> On Sunday, May 06, 2018 08:11:25 AM Reco wrote:
> > Hi.
> > 
> > On Sun, May 06, 2018 at 07:51:24AM -0400, rhkra...@gmail.com wrote:
> > > On Sunday, May 06, 2018 07:10:53 AM Reco wrote:
> > > > Certain Modern Desktop Environment™ is known for
> > > > its effort to "simplify the things for the user". Some may even say
> > > > that it's "dumbing down things".
> > > 
> > > For the *uninitiated (or old)* among us, care to enlighten us?
> > 
> > Easy. Does it look like it's designed for a tablet?
> > Does it look pretty yet likes to crash often?
> > Or maybe it has a rodent on a logo?
> 
> Doesn't help me--see *emphasized" part in my first response.
> 
> I guess I'm not using one, but I'd like to know what to avoid in the future.

This list is known for shadowbanning its users if certain words are
mentioned. I'd like to avoid it.

I propose a techincal criteria then. 
If it can be run via Wayland - it's Modern.
If still it requires X to run - it's not.

Reco



Re: Distinguishing among [unmount, Safely Remove Drive, Eject]

2018-05-06 Thread rhkramer
On Sunday, May 06, 2018 08:11:25 AM Reco wrote:
>   Hi.
> 
> On Sun, May 06, 2018 at 07:51:24AM -0400, rhkra...@gmail.com wrote:
> > On Sunday, May 06, 2018 07:10:53 AM Reco wrote:
> > > Certain Modern Desktop Environment™ is known for
> > > its effort to "simplify the things for the user". Some may even say
> > > that it's "dumbing down things".
> > 
> > For the *uninitiated (or old)* among us, care to enlighten us?
> 
> Easy. Does it look like it's designed for a tablet?
> Does it look pretty yet likes to crash often?
> Or maybe it has a rodent on a logo?

Doesn't help me--see *emphasized" part in my first response.

I guess I'm not using one, but I'd like to know what to avoid in the future.

For the record, I don't enjoy guessing games, or whatever we're playing here.



Re: Distinguishing among [unmount, Safely Remove Drive, Eject]

2018-05-06 Thread Reco
Hi.

On Sun, May 06, 2018 at 10:29:41PM +1000, Charlie S wrote:
> On Sun, 6 May 2018 15:11:25 +0300 Reco sent:
> 
> > Hi.
> > 
> > On Sun, May 06, 2018 at 07:51:24AM -0400, rhkra...@gmail.com wrote:
> > > On Sunday, May 06, 2018 07:10:53 AM Reco wrote:  
> > > > Certain Modern Desktop Environment™ is known for
> > > > its effort to "simplify the things for the user". Some may even
> > > > say that it's "dumbing down things".  
> > > 
> > > For the uninitiated (or old) among us, care to enlighten us?  
> > 
> > Easy. Does it look like it's designed for a tablet?
> > Does it look pretty yet likes to crash often?
> > Or maybe it has a rodent on a logo?
> > 
> > If any of those is true, you're using a Modern Desktop Environment™.
> > 
> > Reco
> > 
>   After contemplation, my reply is:
> 
>   I have to admit to reading your post that, a "Desktop
>   Environment" dumbs things down.

Was not my intention, just in case. Back in the day they designed
Desktop Environments to enhance users' productivity (GNOME1 comes to
mind), now all they seem to care about are the needs of a mythical
"clueless user".

So let's keep it PG-13 clean, and call it "simplifying".


> I also read the question, as referring to, why does a Desktop
> Environment dumbs things down?

Who knows? Martians send their mind-controlling rays, certain corporate
entities are plotting to take the world - the possibilities are endless.
And of course there are They.

Reco



Re: Distinguishing among [unmount, Safely Remove Drive, Eject]

2018-05-06 Thread Richard Owlett

On 05/06/2018 06:51 AM, rhkra...@gmail.com wrote:

On Sunday, May 06, 2018 07:10:53 AM Reco wrote:

Certain Modern Desktop Environment™ is known for
its effort to "simplify the things for the user". Some may even say that
it's "dumbing down things".


For the uninitiated (or old) among us, care to enlighten us?


As one for whom three-score-and-ten is past:

Various Linux distros appear to compete for the worst combination of 
"mother hen" and "papa knows best" of Unix and Windows. Debian offends 
least.


A less opinionated description should be appear in my reply later today 
to Henrique's post.





Re: Distinguishing among [unmount, Safely Remove Drive, Eject]

2018-05-06 Thread Charlie S
On Sun, 6 May 2018 15:11:25 +0300 Reco sent:

>   Hi.
> 
> On Sun, May 06, 2018 at 07:51:24AM -0400, rhkra...@gmail.com wrote:
> > On Sunday, May 06, 2018 07:10:53 AM Reco wrote:  
> > > Certain Modern Desktop Environment™ is known for
> > > its effort to "simplify the things for the user". Some may even
> > > say that it's "dumbing down things".  
> > 
> > For the uninitiated (or old) among us, care to enlighten us?  
> 
> Easy. Does it look like it's designed for a tablet?
> Does it look pretty yet likes to crash often?
> Or maybe it has a rodent on a logo?
> 
> If any of those is true, you're using a Modern Desktop Environment™.
> 
> Reco
> 
After contemplation, my reply is:

I have to admit to reading your post that, a "Desktop
Environment" dumbs things down.

I also read the question, as referring to, why does a Desktop
Environment dumbs things down?

My error.

Charlie

-- 
Registered Linux User:- 329524
***

A dream grants what one covets when awake. - German proverb

***

Debian GNU/Linux - Magic indeed.

-



Re: Distinguishing among [unmount, Safely Remove Drive, Eject]

2018-05-06 Thread Richard Owlett

On 05/06/2018 06:23 AM, Henrique de Moraes Holschuh wrote:

On Sat, 05 May 2018, Richard Owlett wrote:

What are the distinguishing features of unmount, Safely Remove Drive, and
Eject?


Usually it goes like this:

unmount: exactly what it says.  Likely operates only on a single
filesystem (device may have many, if it is partitioned, etc).  Will
flush caches related to that filesystem, and will issue device cache
flushes or write barriers as required, but only related to that
filesystem.

safely remove: unmount all partitions/filesystems; quiesce the device
(flush all caches, plug all read/write queues); issue device quiesce
commands (spin down HDDs, prepare-for-power-off notification for SSDs,
etc); delete it from the kernel (so that it can be physically
hot-removed by the operator, etc).

eject: unmount all partitions/filesystems, issue "media eject" IOCTL
command to device (some card readers, cdrom/cdrw/dvdrom/dvdrw and other
media-tray based devices, etc).  Might or not end up doing nearly the
same as "safely remove", depending on just what the kernel decides to do
when it gets that ioctl (or if some lower level userspace is intelligent
enough to map it to "safely remove", etc).  Does *not* delete the device
from the kernel.


The question is prompted by observing that for partitions on USB flash
drives which have been auto-mounted, one or both of the last two are listed
when clicking on the icon associated with a partition. For a hard disk
partition, only the first is given.


Next time, give us the name of the DE and application in question.

Anyway, it looks like it is giving you "unmount" when it thinks it is an
unremovable device, and the two others when it thinks either the device
or the media might be removable.



I'm running Debian 9 with MATE.
My observed symptoms were initially observed related to what choices 
given when right clicking on the icon associated with a partition.


I suspect the underlying probably is related to how/when something is 
"auto-magically" mounted. YES, a vague statement. This afternoon I plan 
to run some tests.


Thanks all for feed back received.





Re: Distinguishing among [unmount, Safely Remove Drive, Eject]

2018-05-06 Thread Reco
Hi.

On Sun, May 06, 2018 at 07:51:24AM -0400, rhkra...@gmail.com wrote:
> On Sunday, May 06, 2018 07:10:53 AM Reco wrote:
> > Certain Modern Desktop Environment™ is known for
> > its effort to "simplify the things for the user". Some may even say that
> > it's "dumbing down things".
> 
> For the uninitiated (or old) among us, care to enlighten us?

Easy. Does it look like it's designed for a tablet?
Does it look pretty yet likes to crash often?
Or maybe it has a rodent on a logo?

If any of those is true, you're using a Modern Desktop Environment™.

Reco



Re: Distinguishing among [unmount, Safely Remove Drive, Eject]

2018-05-06 Thread rhkramer
On Sunday, May 06, 2018 07:10:53 AM Reco wrote:
> Certain Modern Desktop Environment™ is known for
> its effort to "simplify the things for the user". Some may even say that
> it's "dumbing down things".

For the uninitiated (or old) among us, care to enlighten us?



Re: Distinguishing among [unmount, Safely Remove Drive, Eject]

2018-05-06 Thread Henrique de Moraes Holschuh
On Sat, 05 May 2018, Richard Owlett wrote:
> What are the distinguishing features of unmount, Safely Remove Drive, and
> Eject?

Usually it goes like this:

unmount: exactly what it says.  Likely operates only on a single
filesystem (device may have many, if it is partitioned, etc).  Will
flush caches related to that filesystem, and will issue device cache
flushes or write barriers as required, but only related to that
filesystem.

safely remove: unmount all partitions/filesystems; quiesce the device
(flush all caches, plug all read/write queues); issue device quiesce
commands (spin down HDDs, prepare-for-power-off notification for SSDs,
etc); delete it from the kernel (so that it can be physically
hot-removed by the operator, etc).

eject: unmount all partitions/filesystems, issue "media eject" IOCTL
command to device (some card readers, cdrom/cdrw/dvdrom/dvdrw and other
media-tray based devices, etc).  Might or not end up doing nearly the
same as "safely remove", depending on just what the kernel decides to do
when it gets that ioctl (or if some lower level userspace is intelligent
enough to map it to "safely remove", etc).  Does *not* delete the device
from the kernel.

> The question is prompted by observing that for partitions on USB flash
> drives which have been auto-mounted, one or both of the last two are listed
> when clicking on the icon associated with a partition. For a hard disk
> partition, only the first is given.

Next time, give us the name of the DE and application in question.

Anyway, it looks like it is giving you "unmount" when it thinks it is an
unremovable device, and the two others when it thinks either the device
or the media might be removable.

-- 
  Henrique Holschuh



Re: Distinguishing among [unmount, Safely Remove Drive, Eject]

2018-05-06 Thread Reco
Hi.

On Sun, May 06, 2018 at 10:15:11AM +0200, Felix Dietrich wrote:
> Reco  writes:
> 
> > But, considering *who* designed DE in question, it may be for the best
> > that users are oblivious about this particular feature ;).
> 
> What is „DE” referring to?

"Desktop Environment". Certain Modern Desktop Environment™ is known for
its effort to "simplify the things for the user". Some may even say that
it's "dumbing down things".

Reco



Re: Distinguishing among [unmount, Safely Remove Drive, Eject]

2018-05-06 Thread songbird
Felix Dietrich wrote:
> Reco  writes:
>
>> But, considering *who* designed DE in question, it may be for the best
>> that users are oblivious about this particular feature ;).
>
> What is „DE” referring to?

  i'm guessing Desktop Environment...


  songbird



Re: Distinguishing among [unmount, Safely Remove Drive, Eject]

2018-05-06 Thread Felix Dietrich
Reco  writes:

> But, considering *who* designed DE in question, it may be for the best
> that users are oblivious about this particular feature ;).

What is „DE” referring to?

--
Felix Dietrich



Re: Distinguishing among [unmount, Safely Remove Drive, Eject]

2018-05-05 Thread Richard Hector
On 06/05/18 07:35, Brian wrote:
> On Sat 05 May 2018 at 11:06:25 -0500, Richard Owlett wrote:
> 
>> What are the distinguishing features of unmount, Safely Remove Drive, and
>> Eject?
> 
> There are none. The device is either unmounted or it isn't. It cannnot
> be half-unmounted.

Hmm. Is there not a point where it's been made inaccessible to the
filesystem, but caches are not yet flushed?

Richard




signature.asc
Description: OpenPGP digital signature


Re: Distinguishing among [unmount, Safely Remove Drive, Eject]

2018-05-05 Thread Brian
On Sat 05 May 2018 at 11:06:25 -0500, Richard Owlett wrote:

> What are the distinguishing features of unmount, Safely Remove Drive, and
> Eject?

There are none. The device is either unmounted or it isn't. It cannnot
be half-unmounted.

-- 
Brian.



Re: Distinguishing among [unmount, Safely Remove Drive, Eject]

2018-05-05 Thread Reco
Hi.

On Sat, May 05, 2018 at 08:41:21PM +0200, Thomas Schmitt wrote:
> Hi,
> 
> i wrote:
> > > CAP_DESTROY_HARDWARE and CAP_ENDANGER_BYSTANDERS.
> 
> Reco wrote:
> > Please. Surely you heard of SATA/SAS hotplug? Or SATA rack?
> 
> Plus a robot arm which performs the mechanical part ?

EMC does it. Price could be lower though, as AFAIK you have to buy
Symmetrix (sp?) for the feature.


> But i rather thought of a 3.5 inch steel frisbee hopping out of its
> casing at 7200 rpm.

It's either glass or aluminium these days. Could still cause some damage
if fractured before the ejection ☺.

Reco



Re: Distinguishing among [unmount, Safely Remove Drive, Eject]

2018-05-05 Thread Thomas Schmitt
Hi,

i wrote:
> > CAP_DESTROY_HARDWARE and CAP_ENDANGER_BYSTANDERS.

Reco wrote:
> Please. Surely you heard of SATA/SAS hotplug? Or SATA rack?

Plus a robot arm which performs the mechanical part ?

But i rather thought of a 3.5 inch steel frisbee hopping out of its
casing at 7200 rpm. And even if it's a mechanically harmless SSD:
Who will sweep up all the popped-off memory chips ?


Have a nice day :)

Thomas



Re: Distinguishing among [unmount, Safely Remove Drive, Eject]

2018-05-05 Thread Reco
Hi.

On Sat, May 05, 2018 at 05:59:15PM +0100, Brad Rogers wrote:
> On Sat, 5 May 2018 11:06:25 -0500
> Richard Owlett  wrote:
> 
> Hello Richard,
> 
> >Why?
> 
> Probably not an exhaustive list
> 
> Ever tried to eject an HD?

Yup. Did it a week ago last time, I was changing yet another NAS SATA
drive.

> (Un)mount is the only thing that makes sense here.

Actually, no. For instance, this particular PC says to me that it's
possible to remove two HDs from the running kernel (powering down it
effectively):

$ ls -al /sys/block/sd*/device/delete
--w--- 1 root root 4096 May  5 21:00 /sys/block/sda/device/delete
--w--- 1 root root 4096 May  5 21:00 /sys/block/sdb/device/delete

But, considering *who* designed DE in question, it may be for the best
that users are oblivious about this particular feature ;).


> Safely Remove is to ensure writes to flash drives etc. are actually
> completed as opposed to being in progress from buffers.  Only then is it
> safe to remove the memory card.

In other words, perform umount(2). How is it different from Unmount is
anyone's guess.

Reco



Re: Distinguishing among [unmount, Safely Remove Drive, Eject]

2018-05-05 Thread Reco
Hi.

On Sat, May 05, 2018 at 07:04:08PM +0200, Thomas Schmitt wrote:
> Hi,
> 
> Richard Owlett wrote:
> > unmount, Safely Remove Drive, and Eject?
> > [...] For a hard disk partition, only the first is given.
> 
> To eject a hard disk you need the undocumented privileges CAP_DESTROY_HARDWARE
> and CAP_ENDANGER_BYSTANDERS.

Please. Surely you heard of SATA/SAS hotplug? Or SATA rack?

It's true that it's usually impossible to *eject* the harddrive.
Does not mean that it's impossible to replace a harddrive without
powering down. 

Reco



Re: Distinguishing among [unmount, Safely Remove Drive, Eject]

2018-05-05 Thread Brad Rogers
On Sat, 5 May 2018 11:06:25 -0500
Richard Owlett  wrote:

Hello Richard,

>Why?

Probably not an exhaustive list

Ever tried to eject an HD?  (Un)mount is the only thing that makes sense
here.

Safely Remove is to ensure writes to flash drives etc. are actually
completed as opposed to being in progress from buffers.  Only then is it
safe to remove the memory card.

Eject will open a CD/DVD/BluRay drive tray, or actually eject the disk
from a slot drive.

-- 
 Regards  _
 / )   "The blindingly obvious is
/ _)radnever immediately apparent"
What will you do when the gas taps turn?
The Gasman Cometh - Crass


pgpBi1Wz4wbCp.pgp
Description: OpenPGP digital signature


Re: Distinguishing among [unmount, Safely Remove Drive, Eject]

2018-05-05 Thread Thomas Schmitt
Hi,

Richard Owlett wrote:
> unmount, Safely Remove Drive, and Eject?
> [...] For a hard disk partition, only the first is given.

To eject a hard disk you need the undocumented privileges CAP_DESTROY_HARDWARE
and CAP_ENDANGER_BYSTANDERS.


Have a nice day :)

Thomas