PDA

View Full Version : /usr/share/hal/fdi/policy/10osvendor/99-redhat-storage-policy-fixed-drives.fdi



Anniedog
25th November 2007, 11:48 AM
Following the post http://forums.fedoraforum.org/forum/showthread.php?t=171454&page=1&pp=15 but in a new form Having this file below at the above location, from what I have read stops the automounting of partitions.

?xml version="1.0" encoding="UTF-8"?> <!-- -*- SGML -*- -->

<deviceinfo version="0.2">
<device>
<match key="@block.storage_device:storage.hotpluggable" bool="false">
<match key="@block.storage_device:storage.removable" bool="false">
<merge key="volume.ignore" type="bool">true</merge><merge key="volume.ignore" type="bool">true</merge>
</match>
</match>
</device>
</deviceinfo>

From my limited knowledge I would assume the line:
<merge key="volume.ignore" type="bool">true</merge>
is the controling line.

My question:
Does anyone know if it possible to expand on this to explicitly allow/disallow specific volumes/partitions ?

I do not know the syntax or if it is acceptable but I was wondering whether lines like

<merge key="volume(sda1).ignore" type="bool">false</merge>
<merge key="volume(sda0).ignore" type="bool">true</merge>

May enable me to control the partitions that are automounted. Obiviously if possible it would be nice to have an argument that would allow all partitions except the ones you did not want.

Dies
25th November 2007, 04:12 PM
Anniedog, this file doesn't actually stop anything aside from fstab mounted filesystems showing on your desktop.

And yes, you can specify specific drives by using labels in those policies, though the syntax in your example will not work.


If you could go into a little more detail regarding exactly what you want to do I think someone might be able to help more effectively... or maybe not. :D

Anniedog
25th November 2007, 06:04 PM
Right all it boils down to is that by default on my F8 install, the desktop was full of partitions. In fact every partition except /swap was mounted.

I have sorted my desktop out the long way around so no sweat. It was only when I read through again the thread above I saw that adding this file would prevent this action completely.

I love the fact that I can get to my partitions from the desktop. but I was wondering if by editing this file I would have saved myself all the editing with gconf and found away to control this behaviour in Gnome. I have not as yet found any simple way around, so it was just a thought and if it were possible something I would like to play around with.

I knew my syntax would be wrong, but if anyone can point me in the right direction I dont have a problem with learning.

My point was more to do with whether it is possible at a fairly simple level and more to the point is it possible to specify the partitions, if so where would I find the correct identifyer. Would I drop the volume and just use sda(0). It is clear that /etc/fstab is not used to mount these partitions so I have no idea of the correct way to do this.

Dies
25th November 2007, 07:36 PM
Hmm... yeah you're right, I don't think I wrote what I meant in my first post, too early. :D

Most of us just want all our fstab mounted stuff to not show but if I understand correctly you want most stuff to show up and only blacklist a couple of partitions, right?

Well, I'm no expert, by far, but I don't think you can use device names in those policies, you'll need to label your partitions or use uuid to identify them. For example to label an ext3 partition you would use e2label, see "man e2label" for usage.

As for the exact syntax, I'll post back with an example, a working one hopefully. You can always look through the standard policies to see how you can match volumes by label.

Anniedog
26th November 2007, 11:19 AM
Well you got it I just have to the odd ball. It was more to do with the fact that I would normally have had to do the fstab and mount to have my windows partitons mounted. This change in f8 has saved me that trouble.
However I have , due to a kernel bug a problem with installing f8 with my motherboard and sata drives,fc6 boot and partitions on the xp drive. I do not want to get rid of these in case I have a problem, but having a desktop full of partitions was a little bit of over kill. As I have two hard drives one for the XP/fc6 the other for f8 it is great to be able to just copy over data for backup purposes. I have partitions for music/ video/photo etc. This was just for me a thought and I was bugged that such a usefull feature in f8 could not be easily controlled. When I saw that if it was possible to stop this, then I just wondered if it would be possible to use this file in a less brutal way.Anyway I needed something to play around with as the set up for me has gone to easy.

Dies
27th November 2007, 12:34 AM
Well you got it I just have to the odd ball. It was more to do with the fact that I would normally have had to do the fstab and mount to have my windows partitons mounted. This change in f8 has saved me that trouble.
However I have , due to a kernel bug a problem with installing f8 with my motherboard and sata drives,fc6 boot and partitions on the xp drive. I do not want to get rid of these in case I have a problem, but having a desktop full of partitions was a little bit of over kill. As I have two hard drives one for the XP/fc6 the other for f8 it is great to be able to just copy over data for backup purposes. I have partitions for music/ video/photo etc. This was just for me a thought and I was bugged that such a usefull feature in f8 could not be easily controlled. When I saw that if it was possible to stop this, then I just wondered if it would be possible to use this file in a less brutal way.Anyway I needed something to play around with as the set up for me has gone to easy.

Hey it's all personal preference, it's about choice.

BTW if you look in the old thread on the last page, someone posted a perfect example of doing just what you want. So you see you aren't alone, all you need to do is label your partitions and tweak the example to suit your needs.

Anniedog
27th November 2007, 01:24 PM
Cheers thats a b------- I wanted to be special. ha ha. Seriously many thanks for the pointer. Wouldnt have thought to check back on the thread.