LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] ATA-over-Ethernet and udev/hald/g-v-m

[ILUG] ATA-over-Ethernet and udev/hald/g-v-m

Ivan Griffin ivan at skynet.ie
Mon Dec 3 11:11:51 GMT 2007


Hi,

I'm messing with AoE (for no particular purpose), and so far 
I've managed to share disks from my NSLU2 slug to my desktop without 
issue.  (AoE seems significantly faster than either SMB, or NFS -- albeit 
with the loss of routability, client locking & consistency, and of course any 
notion of the most basic security/authentication concepts.  Perfect for me 
on my little LAN).

I thought it would be interesting to see if I could have the 
gnome-volume-manager auto-discover and auto-mount all AoE shares on my 
LAN on the Desktop.

Unfortunately, I didn't even know of the existence of 
udev/hald/gnome-volume-manager until a day or so ago, when I tried to 
figure this stuff out - so I'm blundering about like a wild man without 
fully appreciating the architecture of how this all hangs together.  I'm 
running desktops on Fedora 8 and on Ubuntu 7.10.

Has anyone on the list tried to do something with udev/hald/g-v-m similar 
before?


Regards,
Ivan



More Details on the messing I'm up to...:

When I modprobe aoe, the driver automatically adds the available devices 
in /sys/block/etherdev*

I hacked around with udev, but it seems somehow that hald doesn't like the 
event from udev or doesn't like the entry created in sysfs...

I ran hald in debug mode, and it complained about :
23:41:27.898 [I] blockdev.c:950: Ignoring hotplug event - no parent
23:41:27.898 [W] blockdev.c:1434: Not adding device object
23:41:28.108 [E] util.c:190: Cannot open 
'/sys/block/etherd!e0.1/etherd!e0.1p1/range'
23:41:28.109 [I] blockdev.c:950: Ignoring hotplug event - no parent
23:41:28.109 [W] blockdev.c:1434: Not adding device object

Does anyone have experience with hald, and any suggestions as to why it is 
not happy?  The sysfs entries for AoE look similar enough to any of the 
other block devices on my system...  I haven't cracked open the source 
code to hald yet to try to figure out whats going on in it - but so far 
googling hasn't been much help...

Looking at the udev records for the AoE disk, I get

$ udevinfo --query=all --path=/sys/block/etherd\!e0.1
P: /block/etherd!e0.1
N: etherd/e0.1
E: DEVTYPE=disk

Are they a bit on the short side? Or are they sufficient?  For the active 
partition (single EXT3 filesystem on the disk), I get:

$ udevinfo --query=all --path=/sys/block/etherd\!e0.1/etherd\!e0.1p1
P: /block/etherd!e0.1/etherd!e0.1p1
N: etherd/e0.1p1
S: disk/by-uuid/a7f2f604-8202-48a8-a988-bd369aed0a43
S: disk/by-label/Storage
E: DEVTYPE=partition
E: ID_FS_USAGE=filesystem
E: ID_FS_TYPE=ext3
E: ID_FS_VERSION=1.0
E: ID_FS_UUID=a7f2f604-8202-48a8-a988-bd369aed0a43
E: ID_FS_UUID_ENC=a7f2f604-8202-48a8-a988-bd369aed0a43
E: ID_FS_LABEL=Storage
E: ID_FS_LABEL_ENC=Storage
E: ID_FS_LABEL_SAFE=Storage

I run "/lib/udev/vol_id --export" on the device to fill out most of the 
ID_FS_XXXX stuff.  I'm guessing that is more for a RAID device, but since 
there isn't an equivalent aoe_id type utility. Are these udev records 
okay/suitable?

Anyhoo, I've hacked around this for now by using udev to do the hardwork:
KERNEL=="etherd/e[0-9].[0-9]p[0-9]", ACTION=="add", 
RUN+="/usr/local/bin/mount_my_aoe.sh"
KERNEL=="etherd/e[0-9].[0-9]p[0-9]", ACTION=="remove", 
RUN+="/usr/local/bin/umount_my_aoe.sh"

And this creates my entries in /media for me, but obviously g-v-m isn't 
aware of them, so I don't get the swishy icons on my desktop.



More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell