fernandotcl / udisks-glue Goto Github PK
View Code? Open in Web Editor NEWUtility to associate udisks events to user-defined actions
License: BSD 2-Clause "Simplified" License
Utility to associate udisks events to user-defined actions
License: BSD 2-Clause "Simplified" License
Hi,
glib2.0 has been deleted from Ubuntu's 20.04 PPA stream -- https://www.ubuntuupdates.org/package/ubuntu-desktop_ppa/focal/main/base/glib2.0
Is there any way to still use udisks-glue?
Hello,
From time to time my external USB HD just disappear for no apparent reason. And I have to start udisks-glue again.
In dmesg, I see this:
[27047.535014] usb 3-1.3.4: reset high-speed USB device number 7 using ehci_hcd
[27047.627715] usb 3-1.3.4: device firmware changed
[27047.628665] sd 8:0:0:0: Device offlined - not ready after error recovery
[27047.629401] usb 3-1.3.4: USB disconnect, device number 7
[27047.982712] usb 3-1.3.4: new high-speed USB device number 8 using ehci_hcd
[27048.076653] usb 3-1.3.4: New USB device found, idVendor=059b, idProduct=0470
[27048.076663] usb 3-1.3.4: New USB device strings: Mfr=1, Product=11, SerialNumber=5
[27048.076690] usb 3-1.3.4: Product: Storage
[27048.076695] usb 3-1.3.4: Manufacturer: JMicron
[27048.076699] usb 3-1.3.4: SerialNumber: 801130168383
[27048.079938] scsi9 : usb-storage 3-1.3.4:1.0
[27050.446683] scsi 9:0:0:0: Direct-Access ST932032 5AS PQ: 0 ANSI: 2 CCS
[27068.942897] not responding...
[27077.187535] sd 9:0:0:0: [sdd] READ CAPACITY failed
[27077.187566] sd 9:0:0:0: [sdd] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[27077.187574] sd 9:0:0:0: [sdd] Sense Key : Unit Attention [current]
[27077.187604] sd 9:0:0:0: [sdd] Add. Sense: Not ready to ready change, medium may have changed
[27079.938147] sd 9:0:0:0: [sdd] Test WP failed, assume Write Enabled
[27082.688057] sd 9:0:0:0: [sdd] Asking for cache data failed
[27082.688070] sd 9:0:0:0: [sdd] Assuming drive cache: write through
[27113.938565] not responding...
[27120.910175] CPU2: Package power limit normal
[27120.910184] CPU3: Package power limit normal
[27120.910217] CPU1: Package power limit normal
[27120.910226] CPU0: Package power limit normal
[27126.631758] sd 9:0:0:0: [sdd] 625142448 512-byte logical blocks: (320 GB/298 GiB)
[27126.636152] sd 9:0:0:0: [sdd] Attached SCSI disk
[27157.471612] usb 3-1.3.4: reset high-speed USB device number 8 using ehci_hcd
[27157.564323] usb 3-1.3.4: device firmware changed
[27157.564966] sd 9:0:0:0: Device offlined - not ready after error recovery
[27157.565007] sd 9:0:0:0: [sdd] Unhandled error code
[27157.565012] sd 9:0:0:0: [sdd] Result: hostbyte=DID_ABORT driverbyte=DRIVER_OK
[27157.565020] sd 9:0:0:0: [sdd] CDB: Read(10): 28 00 25 42 ea 00 00 00 08 00
[27157.565061] end_request: I/O error, dev sdd, sector 625142272
[27157.565092] Buffer I/O error on device sdd, logical block 78142784
[27157.565170] sd 9:0:0:0: rejecting I/O to offline device
[27157.565176] sd 9:0:0:0: killing request
[27157.565732] usb 3-1.3.4: USB disconnect, device number 8
[27157.643407] usb 3-1.3.4: new high-speed USB device number 9 using ehci_hcd
[27157.736788] usb 3-1.3.4: New USB device found, idVendor=059b, idProduct=0470
[27157.736820] usb 3-1.3.4: New USB device strings: Mfr=1, Product=11, SerialNumber=5
[27157.736826] usb 3-1.3.4: Product: Storage
[27157.736830] usb 3-1.3.4: Manufacturer: JMicron
[27157.736834] usb 3-1.3.4: SerialNumber: 5E17FFFFFFFF
[27157.738715] scsi10 : usb-storage 3-1.3.4:1.0
[27157.789744] udisks-glue[2379]: segfault at 10 ip 0000000000405174 sp 00007fff38a446d8 error 4 in udisks-glue[400000+8000]
[27158.782675] scsi 10:0:0:0: Direct-Access ST932032 5AS PQ: 0 ANSI: 2 CCS
[27158.871551] sd 10:0:0:0: [sdd] 625142448 512-byte logical blocks: (320 GB/298 GiB)
It looks like my HD is failing somehow, but udisks-glue should not:)
Don't know what information you need, here is my config:
cat ~/.config/udisks-glue/config
filter disks {
optical = false
usage = filesystem
}match disks {
automount = true
automount_options = { flush, noatime, "fmask=033", "dmask=022" }
}
Ran into a problem... Running udisk-glue within Fedora 20 with Awesome, I get this error:
; udisks-glue --config ~/.udisks-glue.conf --foreground
Unable to enumerate the devices: The name org.freedesktop.UDisks was not provided by any .service files
What am I missing?
Hi,
On archlinux, udisks-glue does not compile anymore.
The compilation fails on:
main.c: In function ‘main’:
main.c:171:5: error: ‘g_type_init’ is deprecated (declared at /usr/include/glib-2.0/gobject/gtype.h:669) [-Werror=deprecated-declarations]
g_type_init();
^
This could probably easily fixed by removing -Werror from the default flags. Or, cleaner, the call to g_type_init() could be simply removed, since gtype.h says:
Regards,
Christophe-Marie
I ran udisks-glue -f . I can see mounting regular volume:
Device file /dev/sdb1 mounted at /media/user/Kingston
... but I have LUKS encrypted volume which has device in /dev/dm-* (with symlink in /dev/mapper/). I suppose /dev/mapper/ is not monitored, is it?
Seems that you forgot to include it in the makefile :P
udisks-glue gives error 255
I don't recognize code 255, it's not registered with the mount command, at least not in the man page. Does it come from udisks-glue? If so, what does it mean?
# mount /dev/sda1 /media/SJOERD
Works fine (SJOERD is the flash drive label), however, automounting it does not:
# /usr/bin/udisks-glue -c /etc/udisks-glue.conf --foreground
Device file /dev/sda inserted
Device file /dev/mmcblk0 inserted
Device file /dev/mmcblk0p1 inserted
Trying to automount /dev/mmcblk0p1...
Failed to automount /dev/mmcblk0p1: Error mounting: mount exited with exit code 255: mount: mounting /dev/mmcblk0p1 on /media/CFAB-84EE failed: Invalid argument
Device file /dev/sda1 inserted
Trying to automount /dev/sda1...
Mount failed: Error mounting: mount exited with exit code 255: mount: mounting /dev/mmcblk0p1 on /media/CFAB-84EE failed: Invalid argument
Failed to automount /dev/sda1: Error mounting: mount exited with exit code 255: mount: mounting /dev/sda1 on /media/SJOERD failed: Invalid argument
Mount failed: Error mounting: mount exited with exit code 255: mount: mounting /dev/sda1 on /media/SJOERD failed: Invalid argument
The config file:
filter disks {
optical = false
partition_table = false
usage = filesystem
}
match disks {
automount = true
automount_options = { "ro", "noexec", "nosuid", "nodev", "noatime", "sync", "dmask=0000" }
post_insertion_command = "udisks --mount %device_file"
}
Right now on my system, I have udisks and udisks2 coexisting. I tried to remove udisks, but apparently udisks-glue uses it. Would it be possible to port it to udisks2?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.