tlaro...@polynum.com writes:

> It's then clear that writes are differed (the write cache is not
> settable with dkctl(8)) and that the disk gets a lot in its cache
> memory and writing only after.

Does it write things within a few seconds?

> 2) Is there a way to query the status of the disk in order to give a hint
> to the user about if it's safe or not to unplug the external device?
> The problem is that the commands are terminated while data is perhaps
> not (in my case: aren't) written yet to disk.

It seems that unmount should invoke some sort of sync flag, so when
unmount returns it should be safe.

Another question is if your disk is following the specifications....

> 3) If 1) was guaranteed, wouldn't it be safer to automatically mount
> with "sync" whatever wedge (written to) is found on an umass drive?

Perhaps, but it would be vastly slower.  From what I understand, your
concern is not about consistency in the case of power loss.  So really
you just need to arrange that after someone unmounts, data is written
and then it can be powered off.

Or are you talking about writing other than via the filesystem?

With eSATA instead of USB, support for command queuing is probably
different (but I can't explain either).


> 5) In what limit is Sata (or eSata) hot-pluggable? Never? Depends on the
> controler? Would the kernel panic if a SATA connected disk (unmounted)
> would be unplugged? (If the theoretical answer is not none, I could
> always test...)

As I understand it, hot plugging requires not only logical support but
electrical support to avoid damage.  So if you controller is not labeled
for that, it's not ok.

As for panic, that was the way it was in the early days.   These days, I
think a missing disk should not be a panic, but simply an IO error on
all accesses.  Except perhaps on the root filesystem.

Reply via email to