Специально для Ъ
Some days ago a guy asked in the kde-hardware-devel mailing list how to make disks connected to an e-sata port to behave like removable disk in KDE. I have a notebook with e-sata port and had this problem too, but have never tried to fix that, until now. I think what I have found can help other people too so I am writing this post.
After some tries I found a way to tell hald that my disks' partitions come from a removable disk. That works but have an inconvinience, I needed to create one configuration file per partition. Some more tries and finally I got to configure hald to treat all disks connected to my e-sata controller as removable:
1. Add this file to your system:
File /etc/hal/fdi/policy/40-e-sata.fdi
<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
<device>
<match key="linux.sysfs_path" contains="/sys/devices/pci0000:00/0000:00:1f.2/host4/">
<merge key="volume.ignore" type="bool">false</merge>
<merge key="@block.storage_device:storage.removable" type="bool">true</merge>
</match>
</device>
</deviceinfo>
2. Change the contains part to match your e-sata controller's. You can find it using the command:
evolucao ~ # find /sys/devices/ -name sdb
/sys/devices/pci0000:00/0000:00:1f.2/host4/target4:0:0/4:0:0:0/block/sdb
3. Restart hald: /etc/init.d/hald restart 4. That's it :-)
The strange thing is that the file /sys/class/block/sdb/removable contains 0, it should contains 1 since the disk is removable. Maybe it is a kernel bug.
Hal is deprecated for some years now, KDE SC, more precisely Solid, is the only desktop/library that uses it extensively. When we, Solid metal-workers, finish Solid transition to udisk and upower probably hal is gonna vanish for ever.
In less than two weeks there will a Solid Sprint in Madri (Spain), I will be there :-), and we are going to discuss how far we are from the end of this transition. Honestly I like hal, it is flexible from users point of view. I have never used udisk and I do not know if it possible to workaround a problem in the kernel such as this one about disks connected to a e-sata controller using udisk. I hope it is.
Скопипащено с http://lamarque-lvs.blogspot.com/2010/09/e-sata-and-solid.html
Такие дела!