devid && devid+hostid

Delfim Machado dbcm at co.sapo.pt
Wed Aug 16 11:19:20 UTC 2006


Why devid isn't (always) associated with hostid?

Having in each host the devid1..devmany it's easy do manage than  
dev10,dev30,devzbr

Imagine you have 10 machines with 15 devices, your last machine will  
have devices ID 149..150 (if you add then at one time), not devid 1..10.

The solution for now is to add two (not more then 99 mogstored)  
digits from the devid to hostid and other two(not more then 99  
devices in one machine) for devid, something like this:
hostid 1: devid (0)101..110
hostid10: devid1001..1010


 From table device:
   PRIMARY KEY  (`devid`),
should be
   PRIMARY KEY  (`devid`, `hostid`),

 From mogadm, devices sub shouldn't return an hash in which devid is  
the key, but and array.

I haven't looked in the core.

Maybe it's hard to change or not, what do you think about it?

--
Delfim Machado

SMTP: delfim.c.machado at co.sapo.pt
XMPP: delfim.c.machado at sapo.pt

SPAM: ******.*.*******@**.****.**


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.danga.com/pipermail/mogilefs/attachments/20060816/eb6d6489/attachment.htm


More information about the mogilefs mailing list