Last year I wrote about how to hack hal to recognise disks attached to an e-sata port as removable. Now that udisks is the default disk manager in Solid I will explain how to hack udisks to do the same:
- The hal hack is just a xml file that overrides disk's removable flag. With udisks things are a bit more complicated. I had to apply this patch to udisks and recompile it. The patch adds the flag UDISKS_FORCE_SYSTEM_INTERNAL, which lets us mark the disk as internal or external (AKA removable).
- Restart udisks. Just kill it and it will restart automatically: killall udisks-daemon # as root
- After that we need to add an udev rule which will actually mark the disk as removable:
- Reload udev rules: udevadm control --reload-rules
evolucao ~ # find /sys/devices/ -name sdb /sys/devices/pci0000:00/0000:00:1f.2/host4/target4:0:0/4:0:0:0/block/sdb
There is already a bug entry about the e-sata problem in udisks' bugzilla. In fact, I found the UDISKS_FORCE_SYSTEM_INTERNAL patch in that bug entry.