Comments (6)
Hey,
you should enclose your code sections (YAML, log) with github flavored markdown. This is required for preformatted text so no indentation is lost and underscores are not interpreted as bold face, etc. I mention this, because in YAML files indentation is important.
The problem is that ignore_device
is expected to be a list of rules (that are tried in order). So it should be:
ignore_device:
- device_file: /dev/sdb
rather than
ignore_device:
device_file: /dev/sdb
The distinction is subtle and maybe I should make it more clear in the README or raise a proper exception.
Furthermore, I strongly recommend you use the id_uuid
rather than device_file
to identify your device! It will be more unique..
Best regards,
Thomas
from udiskie.
Hi!
First of all, thanks for the tip on including code sections, I didn't know you can do that.
Regarding the config file, now that you've mentioned it, your're right. I'm not sure why I ignored that "-", but I forgot including it. It is fairly clear, nonetheless. My bad.
Regarding id_uuid, it seems that my disk does not have any. As it is part of a LVM volume involving several disks. This is what udisksctl says about my disk:
/org/freedesktop/UDisks2/block_devices/sdb:
org.freedesktop.UDisks2.Block:
Configuration: []
CryptoBackingDevice: '/'
Device: /dev/sdb
DeviceNumber: 2064
Drive: '/org/freedesktop/UDisks2/drives/ST912082_1AS_FF9120821A0000000000005FF3E7FF'
HintAuto: true
HintIconName:
HintIgnore: false
HintName:
HintPartitionable: true
HintSymbolicIconName:
HintSystem: false
Id: by-id-usb-ST912082_1AS_FF9120821A0000000000005FF3E7FF-0:0
IdLabel:
IdType:
IdUUID:
IdUsage:
IdVersion:
MDRaid: '/'
MDRaidMember: '/'
PreferredDevice: /dev/sdb
ReadOnly: false
Size: 120034123776
Symlinks: /dev/disk/by-id/usb-ST912082_1AS_FF9120821A0000000000005FF3E7FF-0:0
/dev/disk/by-path/pci-0000:00:1d.7-usb-0:1:1.0-scsi-0:0:0:0
It does not seem to be any UUID for it.
from udiskie.
Oh, okay, I didn't know that. Maybe the Id:
field could be useful:
A unique and persistent identifier for the device or blank if no such identifier is available.
It is not yet supported by udiskie for matching, but I can change that right now.
If you are sure your device will always be /dev/sdb
, you can of course just ignore my recommendation;)
Thomas
from udiskie.
I think that would do it. Nevertheless, it is going to be /dev/sdb for ever and ever I think :) Don't make any effort covering that requirement if you don't think it is required. I'm happy with device_name nonetheless.
Regards
from udiskie.
Hey,
I think adding a device_id
property can in fact be really useful. You can now do it as
ignore_device:
- device_id: usb-ST912082_1AS_FF9120821A0000000000005FF3E7FF-0:0
Notice the missing by-id-
prefix. The name is taken from the symlink in /dev/disk/by-id/
(for compatibility between udisks1 and udisks2 I did not just take the Block.Id
property).
from udiskie.
Great, thanks!
from udiskie.
Related Issues (20)
- Automount mounts in Read only HOT 15
- Automount only specific device HOT 1
- Automatic unmounting from file manager HOT 1
- Tell daemon to pause automounting HOT 1
- Tray menu shows invalid entry on first launch and icons are hard to see HOT 1
- Unmounting Btrfs partition: Error finding object for block device
- shell completions: need to escape spaces in labels HOT 2
- Not showing "internal HDD" HOT 1
- When use together with `tomb`, it cause problem because of the loop device password prompt. HOT 1
- make appimage or static binary file HOT 1
- Not authorized to mount on Linux Mint HOT 1
- Hide unpower (at least for optical devices) HOT 2
- Fedora package is wrong name on the installation manual HOT 1
- Why does the polkit rule grants permission to users in storage group? HOT 2
- Flat menu style not working HOT 2
- python messages about dbus.py and udisks2.py HOT 6
- Kobo Libra H2O e-reader does not get auto-mounted when connected via USB HOT 8
- Wrong location for bash completions. HOT 1
- Breaks in Python 3.12 due to dependency on distutils HOT 1
- notification_command should be renamed HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from udiskie.