Giter VIP home page Giter VIP logo

Comments (6)

coldfix avatar coldfix commented on June 12, 2024

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.

alejandro-perez avatar alejandro-perez commented on June 12, 2024

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.

coldfix avatar coldfix commented on June 12, 2024

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.

alejandro-perez avatar alejandro-perez commented on June 12, 2024

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.

coldfix avatar coldfix commented on June 12, 2024

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.

alejandro-perez avatar alejandro-perez commented on June 12, 2024

Great, thanks!

from udiskie.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.