[plug] Problems building drbd for an SMP 2.2.16 kernel

Richard Sharpe sharpe at ns.aus.com
Thu Jul 6 22:41:18 WST 2000


At 11:11 PM 7/6/00 +0800, raven wrote:
>Richard Sharpe wrote:
>
>> >> It tells me that the module was build for a 2.2.16-3 kernel, while we
are
>> >> running on a 2.2.16-3SMP kernel.
>
>That is odd since the when the RPM spec file build the package with lowercase
>smp.
>
>>
>> Doing an 'inmod -P smp drbd' fixed the problem ...
>
>Cool, I that is a relatively new option.

Yes, it was to me as well.

drbd looks great, but one thing it does not do is to allow you to query the
configuration.

So, I hacked a change into the driver to provide an IOCTL that allows you
to read back the configuration on a /dev/nb[0-9] device. After taking care
to get it right, everything seems to work, and I get the config info back,
but now I find that the original code is passing in a file descriptor for
an open device, which the driver is storing.  This descriptor is irrelevant
when another process retrieves the config ... So, I need to hack it further
to convert the file descriptor to an inode and then retrieve the device
major and minor number from the inode.  Then back in the drbdsetup utility,
I need to find some way to convert a device major and minor into
/dev/[sh]d[a-x][1-9] etc ...

Lots of fun.

Regards
-------
Richard Sharpe, sharpe at ns.aus.com
Samba (Team member, www.samba.org), Ethereal (Team member, www.zing.org)
Co-author, SAMS Teach Yourself Samba in 24 Hours
Author: First Australian 5-day, intensive, hands-on Linux SysAdmin course
Author: First Australian 2-day, intensive, hands-on Samba course




More information about the plug mailing list