[Bug 1239087]

2014-03-26 Thread Zeuthen
Hi, finally got around to making udisks also send the SYNCHRONIZE CACHE
command. Please check if it works. The patch is on master and here:

http://cgit.freedesktop.org/udisks/commit/?id=429892f2ec39d66732bee0f78d093eb6d2c5433f

Thanks!

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to gnome-disk-utility in Ubuntu.
https://bugs.launchpad.net/bugs/1239087

Title:
  Safely remove is not working (or broken) in Gnome Disks

To manage notifications about this bug go to:
https://bugs.launchpad.net/gnome-disk-utility/+bug/1239087/+subscriptions

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs


[Bug 1239087]

2014-03-13 Thread Zeuthen
Hi, sorry for the lack of updates. Nothing special, just been busy with
work, I'm still planning on adding the SYNCHRONIZE CACHE command.
Hopefully I'll get to look at it soon. Thanks.

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to gnome-disk-utility in Ubuntu.
https://bugs.launchpad.net/bugs/1239087

Title:
  Safely remove is not working (or broken) in Gnome Disks

To manage notifications about this bug go to:
https://bugs.launchpad.net/gnome-disk-utility/+bug/1239087/+subscriptions

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs


[Bug 1239087]

2014-02-06 Thread Zeuthen
(In reply to comment #20)
 OK, I'm interested in output of /var/log/messages when it doesn't work with 
 the WD. Or is that what you posted in comment 15?
 I tested it again - the log in comment 15 represent both situations - when
 drive spinned-down and when it does not. Only timestamps differ, messages
 order is the same.
 
 
 With udisks1 this WD-HDD spins-down (by Safely remove in Nautilus or Power
 off in Disks) even if all partitions mounted, with udisks2 it does not. 
 There is a little difference between udisks1 and udisks2 powering off
 drive algorithms. What other log-file can I attach to help you to
 understand the problem?

Your testing with udisks1 is on an older version of Ubuntu (12.04 vs.
14.04) isn't it? If so, any chance you can install the udisks1 package
on the same OS as you tested with udisks2? The packages are parallel-
installable (and called 'udisks' and 'udisks2') so it should be as
simple as 'apt-get install udisks' and then run udisks --detach
/dev/sdX.

I'm asking for this because I think this is due to a kernel and/or ntfs-
3g problem.

Another thing to try would be to see if it happens if the filesystem
type is *not* ntfs, e.g. try with ext4. (I realize this may not be
possible as you may not want to reformat the disk.)

To recap, the only difference now from udisks1 is that udisks2 does not
send SYNCHRONIZE CACHE before START STOP UNIT (it didn't work on any of
my devices when I make the recent udisks2 changes). If it turns out that
udisks1 works as expected on 14.04, I will try to add this change to see
if it makes the difference...

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to gnome-disk-utility in Ubuntu.
https://bugs.launchpad.net/bugs/1239087

Title:
  Safely remove is not working (or broken) in Gnome Disks

To manage notifications about this bug go to:
https://bugs.launchpad.net/gnome-disk-utility/+bug/1239087/+subscriptions

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs


[Bug 1239087]

2014-02-06 Thread Zeuthen
(Hmm, the drives have

  can_stop=1
  start_stop_type=shutdown

so everything should be good. My guess is that it's the NTFS partition
that is the culprit. Specifically, unmounting it via udisks somehow
fails.)

If you manually unmount the partitions, does powering down the drive
work? Specifically, try this

 1. Unmount all partitions using Disks
- if that fails, try 'umount /dev/sdXN' from a terminal. Does that work?
 2. Press the Power off button in Disks when everything has been unmounted.

Does that work?

Also, please include all messages from udisks from syslog (e.g.
/var/log/messages or similar) when pressing the Power off button in
Disks. It should contain some useful info.

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to gnome-disk-utility in Ubuntu.
https://bugs.launchpad.net/bugs/1239087

Title:
  Safely remove is not working (or broken) in Gnome Disks

To manage notifications about this bug go to:
https://bugs.launchpad.net/gnome-disk-utility/+bug/1239087/+subscriptions

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs


[Bug 1239087]

2014-02-06 Thread Zeuthen
OK, I'm interested in output of /var/log/messages when it doesn't work
with the WD. Or is that what you posted in comment 15?

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to gnome-disk-utility in Ubuntu.
https://bugs.launchpad.net/bugs/1239087

Title:
  Safely remove is not working (or broken) in Gnome Disks

To manage notifications about this bug go to:
https://bugs.launchpad.net/gnome-disk-utility/+bug/1239087/+subscriptions

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs


[Bug 1239087]

2014-02-06 Thread Zeuthen
Let me see if I understand this correctly:

 1. Manually unmount, then power-off via the Disks GUI works as expected.
 2. The safely remove drive button in Nautilus does not work as expected.

Is that about right?

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to gnome-disk-utility in Ubuntu.
https://bugs.launchpad.net/bugs/1239087

Title:
  Safely remove is not working (or broken) in Gnome Disks

To manage notifications about this bug go to:
https://bugs.launchpad.net/gnome-disk-utility/+bug/1239087/+subscriptions

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs


[Bug 1239087]

2014-02-06 Thread Zeuthen
(In reply to comment #22)
 I have 500Gb of data on my NTFS partition, so I do not want to reformat my
 HDD. I'm sorry for this.

Fair enough. I'll try to see if I can repro on my hardware.

 If there are no other differences - please add SYNCHRONIZE CACHE, I'm ready
 to do a test and report back.

Will do - thanks for testing!

 I prepared an archive of log-files for my WD-HDD on Ubuntu 14.04 with
 udisks1 and udisks2 installed.

Thanks for doing that - it's very helpful!

 On FAIL-cases there are interesting lines in udisks --monitor-detail
 (udisks:2365): udisks-WARNING **: Couldn't call GetAll() to get
 properties for /org/freedesktop/UDisks/devices/sdc2: Method GetAll with
 signature s on interface org.freedesktop.DBus.Properties doesn't exist
 may be it cause problems. I do not know.

This is likely not a problem.

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to gnome-disk-utility in Ubuntu.
https://bugs.launchpad.net/bugs/1239087

Title:
  Safely remove is not working (or broken) in Gnome Disks

To manage notifications about this bug go to:
https://bugs.launchpad.net/gnome-disk-utility/+bug/1239087/+subscriptions

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs


[Bug 1239087]

2014-02-06 Thread Zeuthen
Hey, thanks for testing the patches.

(In reply to comment #10)
 1.2. WD - 'Safely remove drive' option in Nautilus spinned-down it,
 gnome-disks 'Power off the drive' and 'udisksctl power-off -b /dev/sdX'
 works too.
 But there is a little difference - if I enable automount

I have an idea of what's wrong here but before I speculate on that, what
exactly does enable automount mean? Are you referring to having the
'auto' option in the /etc/fstab file?

 the 'Safely remove
 drive'/'Power off the drive' does not spin-down the disk (disk plates
 rotating, but device is removed from system), I reopen the bug because of
 this.
 
 2. for USB-flashes
 There is no 'Safely remove drive' option in Nautilus for my USB-flashes.
 After 'Eject' the parent device remains in system and may be powered-off by
 gnome-disks. For me it's a good compromise between udisks1 and udisks2
 behavior.
 
 
 I'm ready to test and collect logs of my WD USB-HDD. I can't understand why
 Seagate drive unmounts all partitions before power-off, but WD does not.
 What logs can help you to understand the problem?

When the system is running with the WD USB-HDD, please include the
output of 'gvfs-mount -li' from a non-root shell in a terminal in the
desktop session.

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to gnome-disk-utility in Ubuntu.
https://bugs.launchpad.net/bugs/1239087

Title:
  Safely remove is not working (or broken) in Gnome Disks

To manage notifications about this bug go to:
https://bugs.launchpad.net/gnome-disk-utility/+bug/1239087/+subscriptions

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs


[Bug 1239087]

2014-01-30 Thread Zeuthen
OK, I just made that change

http://cgit.freedesktop.org/udisks/commit/?id=fcdd8f48b6ac9b1b6da82fdf5f59230fc2ea6feb

and tested it with a couple of different units. Notes

 - One of my devices (bus-powered) does not accept the START STOP UNIT
   command so we just continue if it fails. That is, this patch should
   not break existing behavior.

 - Another device (not bus-powered) used to spin down a couple of seconds
   after removing power to the USB port. With this patch it spins down
   immediately. (Which is actually nicer.)

 - Still works on USB sticks etc.

 - I didn't add SCSI SYNCHRONIZE CACHE as that command failed on all my
   devices. I also don't think it's necessary as the device drivers will
   issue something like this in part of the fsync(2) call that we do
   before this.

Please test if the patch works and report back - thanks!

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to gnome-disk-utility in Ubuntu.
https://bugs.launchpad.net/bugs/1239087

Title:
  Safely remove is not working (or broken) in Gnome Disks

To manage notifications about this bug go to:
https://bugs.launchpad.net/gnome-disk-utility/+bug/1239087/+subscriptions

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs


[Bug 1239087]

2014-01-30 Thread Zeuthen
Thanks for testing. I'll look into making udisks2 sending SYNCHRONIZE
CACHE and START/STOP UNIT commands. Stay tuned.

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to gnome-disk-utility in Ubuntu.
https://bugs.launchpad.net/bugs/1239087

Title:
  Safely remove is not working (or broken) in Gnome Disks

To manage notifications about this bug go to:
https://bugs.launchpad.net/gnome-disk-utility/+bug/1239087/+subscriptions

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs


[Bug 1239087]

2014-01-30 Thread Zeuthen
 command “sg_start --stop /dev/sdX” really spin-downs my drive (sometimes
 on 2nd or 3rd attempt - I don’t know why), device remains in system and
 spin-up again only on my demand.

Btw, this is because the sg_start command opens the device node with
O_RDWR which causes an uevent 'change' event to fire when the command
completes. This in turn causes udev rules to fire which accesses the
disk which causes it to spin up again. In the patch I committed to
udisks to do this, we use O_RDONLY to avoid this.

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to gnome-disk-utility in Ubuntu.
https://bugs.launchpad.net/bugs/1239087

Title:
  Safely remove is not working (or broken) in Gnome Disks

To manage notifications about this bug go to:
https://bugs.launchpad.net/gnome-disk-utility/+bug/1239087/+subscriptions

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs

[Bug 1239087]

2014-01-24 Thread Zeuthen
The reason that

 $ udisks --detach /dev/sdX

spins down the disk properly but clicking the Power off menu item in
the GNOME Disks application doesn't has to do with the fact that the
udisks program is from udisks version 1 and was rewritten in udisks
version 2.

udisks v1: http://cgit.freedesktop.org/udisks/tree/src/helpers/job-
drive-detach.c?id=1.0.4

udisks v2:
http://cgit.freedesktop.org/udisks/tree/src/udiskslinuxdrive.c?id=2.1.2#n1195

As you can see, both v1 and v2 does this by writing a '1' to the
'remove' sysfs attribute on the parent USB device, as per

http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=253e05724f9230910344357b1142ad8642ff9f5a

and this makes most USB-attached disk drives actually power down - at
least all the different devices that I've tested with.

However, what's missing in v2 (and present in v1) is the following steps

 1. sending the SCSI SYNCHRONIZE CACHE command
 2. sending START/STOP UNIT command
 3. unbinding the USB Mass Storage kernel driver

Notably, there's actually a TODO item in v2 for doing this:

 /* TODO: Send the eject? Send SCSI START STOP UNIT? */

Now, I don't think that 3. is necessary as it happens as part of writing
to the 'remove' sysfs file. That leaves 1. and 2.

Here's what I'd like to you try. Does

 sg_start --stop /dev/sdX

do what you want? If so, we should add 1. and 2. to v2.

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to gnome-disk-utility in Ubuntu.
https://bugs.launchpad.net/bugs/1239087

Title:
  Safely remove is not working (or broken) in Gnome Disks

To manage notifications about this bug go to:
https://bugs.launchpad.net/gnome-disk-utility/+bug/1239087/+subscriptions

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs


[Bug 1067876]

2013-02-10 Thread Zeuthen
You got it somewhat wrong

 - udisks does not provide any UI = it's not the right place to report this bug
 - there was some confusion in the UI between Eject and Safely Remove Drive 
- the feature was deemed confusing and removed from the UI
 - the feature will be back in the upcoming udisks 2.1 and gnome 3.8 releases, 
see
   - 
http://git.gnome.org/browse/gvfs/commit/monitor/udisks2/gvfsudisks2drive.c?id=b3f72baca687f81e7618d4b829ade2df2b59d2b8
   - 
http://cgit.freedesktop.org/udisks/commit/?id=81dcb6eeaeceb6c6faae1a40a5b34a65cd5af653

Either way, udisks is the wrong component to report bugs on this so
closing NOTOURBUG.

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to gvfs in Ubuntu.
https://bugs.launchpad.net/bugs/1067876

Title:
  [quantal] Missing Safely Remove Drive and Eject options from
  Quicklists. Only have Unmount.

To manage notifications about this bug go to:
https://bugs.launchpad.net/gvfs/+bug/1067876/+subscriptions

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs


[Bug 1020759]

2013-01-15 Thread Zeuthen
(For the second commit link I ofcourse meant

http://cgit.freedesktop.org/udisks/commit/?id=aa02e5fc53efdeaf66047d2ad437ed543178965b

instead. Sorry for the confusion.)

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1020759

Title:
  /run/media is an unnecessary divergence from the FHS

To manage notifications about this bug go to:
https://bugs.launchpad.net/udisks/+bug/1020759/+subscriptions

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs


[Bug 1020759]

2013-01-15 Thread Zeuthen
(In reply to comment #1)
 As for the /media - /run/media change, I presume this was done to avoid 
 having
 to clean up stale mount point directories after reboot?

Well, yeah, kinda - the idea is that such temporary mounts really are
non-persistent = they belong somewhere in /run instead of a top-level
like /media (although on Fedora, /media was already on tmpfs since F15
or so).

Just for the record I also don't think that having a standard mandate
where removable media is mounted is in any way useful for users or
distributors.

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1020759

Title:
  /run/media is an unnecessary divergence from the FHS

To manage notifications about this bug go to:
https://bugs.launchpad.net/udisks/+bug/1020759/+subscriptions

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs


[Bug 1020759]

2013-01-15 Thread Zeuthen
No. What the FHS says about removable media is not in any way useful (it
was written a long time ago too, last revision is 2004). And using big
words like violate or mandate is not going to change any of that,
sorry. You really should know better...

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1020759

Title:
  /run/media is an unnecessary divergence from the FHS

To manage notifications about this bug go to:
https://bugs.launchpad.net/udisks/+bug/1020759/+subscriptions

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs


[Bug 1020759]

2013-01-15 Thread Zeuthen
The motivation for moving out of /media was that with /media any user
can access the filesystem that your user mounts. Which obviously is
highly undesirable on multi-user systems. Originally we wanted to use
$XDG_USER_RUNTIME_DIR and for a while we did that, see

http://cgit.freedesktop.org/udisks/commit/?id=502fb5b7810afb50e48354e6b4d1781d07f79e10

but shortly determined that it was racy (it's never a good idea for a
system daemon to write to a directory controlled by untrusted users) so
we ended up using /run/media instead:

http://cgit.freedesktop.org/udisks/commit/?id=502fb5b7810afb50e48354e6b4d1781d07f79e10

(OTOH, if you really want all users to access a device, you simply just
add an /etc/fstab entry. We now have API in udisks and UI in GNOME Disks
for this.)

 violating the expectations of experienced users and possibly
 breaking user scripts / symlinks.

Just FYI, it's pretty fragily to rely on udisks just this or that name
in /media in the first place so I don't think any experienced user
would do this. If you need a predictable mount point, you need to use
/etc/fstab or mount the device yourself through another mechanism. Or,
better, fix your software and/or scripts to figure out the mount point
itself by looking at things like /proc/self/mountinfo use lsblk(8) or
whatever.

 Please fix udisks to move its mounts back to /media.

There is nothing to fix here so closing NOTABUG.

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1020759

Title:
  /run/media is an unnecessary divergence from the FHS

To manage notifications about this bug go to:
https://bugs.launchpad.net/udisks/+bug/1020759/+subscriptions

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs


[Bug 571038]

2012-10-04 Thread Zeuthen
In udisks 2.0 this is now handled by libblkid through invocation from
udev so I'm closing this NOTOURBUG.

That said, if you don't mind, please test if it's the problem also
exists with that codebase (it's completely different from udisks-part-
id). Thanks!

-- 
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is subscribed to gnome-disk-utility in Ubuntu.
https://bugs.launchpad.net/bugs/571038

Title:
  palimpsest crash with libgdu:ERROR:gdu-pool.c:2369:device_recurse:
  assertion failed: (depth  100)

To manage notifications about this bug go to:
https://bugs.launchpad.net/gnome-disk-utility/+bug/571038/+subscriptions

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs