New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multipath plugin #40
Multipath plugin #40
Conversation
* On old gcc which is not using c99 as default, will got compile error:
storagedlinuxdriveobject.c: In function 'storaged_linux_drive_object_get_device':
storagedlinuxdriveobject.c:427:3: error: 'for' loop initial declarations are only allowed in C99 mode
for (GList *devices = object->devices; devices; devices = devices->next)
^
storagedlinuxdriveobject.c:427:3: note: use option -std=c99 or -std=gnu99 to compile your code
* Fixed by initialize before use.
Signed-off-by: Gris Ge <fge@redhat.com>
Issue:
The object path of org.storaged.Storaged.Drive for all multipath device
is incorrect set as:
/org/storaged/Storaged/drives/drive_1
Root cause:
src/storagedlinuxdriveobject.c
1. storaged_linux_drive_object_should_include_device() return TRUE
on multipath device.
2. storaged_linux_drive_object_constructed() failed to retrieve
<VENDOR>_<MODEL>_<SERIAL> from mpath device-mapper udev device.
3. storaged_linux_drive_update() failed to set vendor, model and etc
property as `device->udev_device` does not has those property for dm
multipath device.
Fix:
* Move static method `is_dm_multipath()` to public:
storaged_linux_device_is_multipath ()
* New public method:
storaged_linux_device_get_udev ()
When provided StoragedLinuxDevice is a multipath device-mapper
device, return its first slave device's GUdevDevice.
* Fix storaged_linux_drive_update() to use udev device retrieved from
storaged_linux_device_get_udev() instead of 'device->udev_device'.
Signed-off-by: Gris Ge <fge@redhat.com>
* The return of g_dbus_object_get_interface() should be freed. Signed-off-by: Gris Ge <fge@redhat.com>
69e0d7b
to
4862950
Compare
DONE:
* Compile and test pass.
* Documentation.
TODO:
* Review code and add more debug messages.
==== real commit message goes below ===
Features:
* Zero changes to existing codes.
* Using existing libmultipath codes.
* Auto generated manpage for every public function.
Usage:
make -j5
sudo make install \
bindir=/usr/sbin/ \
syslibdir=/usr/lib64/ \
libdir=/usr/lib64/multipath \
rcdir=/etc/rc.d/init.d \
unitdir=/usr/lib/systemd/system \
includedir=/usr/include
man libdmmp.h
man dmmp_mpath_array_get
man <dmmp function name>
User case:
Storaged multipath plugin:
storaged-project/udisks#40
FAQ:
1. Why not use better approach like wrapping multipathd IPC output?
That often means a lot changes to existing code which might be
rejected.
I would like to create a stable set of API, while its internal
implementation could be changed without breaking binary
compatibility.
2. Why not build on existing libmultipath internal library?
The libmultipath has too many public symbols which seems a bad
design of public library. Yes, we still expose some internal symbols
via libdmmp currently, that's because we are depending on
libmultipath right now, to fix that we need to change libmultipath
which I intend to avoid at this initial path set.
3. Any code style and rules?
Following Linux kernel code style and libabc guideline.
Other rules are recorded in 'libdmmp/DEV_NOTES'
4. Can the library be licensed as LGPL?
Nope. LGPL library cannot link to any GPL code, while libmultipath
is GPL. You could create some D-BUS API use libdmmp if license
concerns. We might able to license libdmmp to LGPL when some day we
change our implementation to wrap multipathd IPC output.
5. Why not expose all properties out?
Let's do this step by step. This commit only contains minimum API
set required to create the initial storaged multipath plugin.
Signed-off-by: Gris Ge <cnfourt@gmail.com>
DONE:
* Compile and test pass.
* Documentation.
TODO:
* Review code and add more debug messages.
==== real commit message goes below ===
Features:
* Zero changes to existing codes.
* Using existing libmultipath codes.
* Auto generated manpage for every public function.
Usage:
make -j5
sudo make install \
bindir=/usr/sbin/ \
syslibdir=/usr/lib64/ \
libdir=/usr/lib64/multipath \
rcdir=/etc/rc.d/init.d \
unitdir=/usr/lib/systemd/system \
includedir=/usr/include
make libdmmp_check
man libdmmp.h
man dmmp_mpath_array_get
man <dmmp function name>
User case:
Storaged multipath plugin:
storaged-project/udisks#40
FAQ:
1. Why not use better approach like wrapping multipathd IPC output?
That often means a lot changes to existing code which might be
rejected.
I would like to create a stable set of API, while its internal
implementation could be changed without breaking binary
compatibility.
2. Why not build on existing libmultipath internal library?
The libmultipath has too many public symbols which seems a bad
design of public library. Yes, we still expose some internal symbols
via libdmmp currently, that's because we are depending on
libmultipath right now, to fix that we need to change libmultipath
which I intend to avoid at this initial path set.
3. Any code style and rules?
Following Linux kernel code style and libabc guideline.
Other rules are recorded in 'libdmmp/DEV_NOTES'
4. Can the library be licensed as LGPL?
Nope. LGPL library cannot link to any GPL code, while libmultipath
is GPL. You could create some D-BUS API use libdmmp if license
concerns. We might able to license libdmmp to LGPL when some day we
change our implementation to wrap multipathd IPC output.
5. Why not expose all properties out?
Let's do this step by step. This commit only contains minimum API
set required to create the initial storaged multipath plugin.
Signed-off-by: Gris Ge <cnfourt@gmail.com>
Features:
* Zero changes to existing codes.
* Using existing libmultipath codes.
* Auto generated manpage for every public function.
Usage:
make -j5
sudo make install \
bindir=/usr/sbin/ \
syslibdir=/usr/lib64/ \
libdir=/usr/lib64/multipath \
rcdir=/etc/rc.d/init.d \
unitdir=/usr/lib/systemd/system \
includedir=/usr/include
make libdmmp_check
man libdmmp.h
man dmmp_mpath_array_get
man <dmmp function name>
User case:
Storaged multipath plugin:
storaged-project/udisks#40
FAQ:
1. Why not use better approach like wrapping multipathd IPC output?
That often means a lot changes to existing code which might be
rejected.
I would like to create a stable set of API, while its internal
implementation could be changed without breaking binary
compatibility.
2. Why not build on existing libmultipath internal library?
The libmultipath has too many public symbols which seems a bad
design of public library. Yes, we still expose some internal symbols
via libdmmp currently, that's because we are depending on
libmultipath right now, to fix that we need to change libmultipath
which I intend to avoid at this initial path set.
3. Any code style and rules?
Following Linux kernel code style and libabc guideline.
Other rules are recorded in 'libdmmp/DEV_NOTES'
4. Can the library be licensed as LGPL?
Nope. LGPL library cannot link to any GPL code, while libmultipath
is GPL. You could create some D-BUS API use libdmmp if license
concerns. We might able to license libdmmp to LGPL when some day we
change our implementation to wrap multipathd IPC output.
5. Why not expose all properties out?
Let's do this step by step. This commit only contains minimum API
set required to create the initial storaged multipath plugin.
Signed-off-by: Gris Ge <cnfourt@gmail.com>
Features:
* Zero changes to existing codes.
* Utilizing existing libmultipath codes.
* Library user guide is in 'man 3 libdmmp.h'.
* Every public function has its own manpage in section 3.
Usage:
make -j5
sudo make install \
bindir=/usr/sbin/ \
syslibdir=/usr/lib64/ \
libdir=/usr/lib64/multipath \
rcdir=/etc/rc.d/init.d \
unitdir=/usr/lib/systemd/system \
includedir=/usr/include
make libdmmp_check
man libdmmp.h
man dmmp_mpath_array_get
man <dmmp function name>
User case:
Storaged multipath plugin:
storaged-project/udisks#40
FAQ:
1. Why not use better approach like wrapping multipathd IPC output?
That often means a lot changes to existing code which might be
rejected.
I would like to create a stable set of API, while its internal
implementation could be changed without breaking binary
compatibility.
2. Why not build on existing libmultipath internal library?
The libmultipath has too many public symbols which seems a bad
design of public library. Yes, we still expose some internal symbols
via libdmmp currently, that's because we are depending on
libmultipath right now, to fix that we need to change libmultipath
which I intend to avoid at this initial path set.
3. Any code style and rules?
Following Linux kernel code style and libabc guideline.
Other rules are recorded in 'libdmmp/DEV_NOTES'
4. Can the library be licensed as LGPL?
Nope. LGPL library cannot link to any GPL code, while libmultipath
is GPL. You could create some D-BUS API use libdmmp if license
concerns. We might able to license libdmmp to LGPL when some day we
change our implementation to wrap multipathd IPC output.
5. Why not expose all properties out?
Let's do this step by step. This commit only contains minimum API
set required to create the initial storaged multipath plugin.
Signed-off-by: Gris Ge <cnfourt@gmail.com>
* Use libdmmp.h[1] to extend these existing interfaces:
org.storaged.Storaged.Drive
|
|
v
org.storaged.Storaged.Multipath
org.storaged.Storaged.Block (/dev/dm-2 or /dev/sdb)
^
|
v
org.storaged.Storaged.Multipath
org.storaged.Storaged.Block (/dev/sdb)
^
|
v
org.storaged.Storaged.Multipath.PathGroup.Path
* How to install:
./autogen.sh \
--libdir=/usr/lib64 --prefix=/usr --sysconfdir /etc
--disable-lvm2 --disable-dummy --disable-iscsi \
--enable-multipath
make -j5
sudo make install
sudo /usr/libexec/storaged/storaged --force-load-modules
[1]: Also in demo state:
https://github.com/cathay4t/multipath-tools/tree/c_api
Signed-off-by: Gris Ge <fge@redhat.com>
Features:
* Zero changes to existing codes.
* Utilizing existing libmultipath codes.
* Library user guide is in 'man 3 libdmmp.h'.
* Every public function has its own manpage in section 3.
Usage:
make -j5
sudo make install \
bindir=/usr/sbin/ \
syslibdir=/usr/lib64/ \
libdir=/usr/lib64/multipath \
rcdir=/etc/rc.d/init.d \
unitdir=/usr/lib/systemd/system \
includedir=/usr/include
make libdmmp_check
man libdmmp.h
man dmmp_mpath_array_get
man <dmmp function name>
User case:
Storaged multipath plugin:
storaged-project/udisks#40
FAQ:
1. Why not use better approach like wrapping multipathd IPC output?
That often means a lot changes to existing code which might be
rejected.
I would like to create a stable set of API, while its internal
implementation could be changed without breaking binary
compatibility.
2. Why not build on existing libmultipath internal library?
The libmultipath has too many public symbols which seems a bad
design of public library. Yes, we still expose some internal symbols
via libdmmp currently, that's because we are depending on
libmultipath right now, to fix that we need to change libmultipath
which I intend to avoid at this initial path set.
3. Any code style and rules?
Following Linux kernel code style and libabc guideline.
Other rules are recorded in 'libdmmp/DEV_NOTES'
4. Can the library be licensed as LGPL?
Nope. LGPL library cannot link to any GPL code, while libmultipath
is GPL. You could create some D-BUS API use libdmmp if license
concerns. We might able to license libdmmp to LGPL when some day we
change our implementation to wrap multipathd IPC output.
5. Why not expose all properties out?
Let's do this step by step. This commit only contains minimum API
set required to create the initial storaged multipath plugin.
Signed-off-by: Gris Ge <cnfourt@gmail.com>
Features:
* Use multipathd IPC command 'show xxx raw format <fmt>'
* Library user guide is in 'man 3 libdmmp.h'.
* Every public function has its own manpage in section 3
generated by linux 'kernel-doc' tool.
Usage:
make -j5
sudo make install \
bindir=/usr/sbin/ \
syslibdir=/usr/lib64/ \
libdir=/usr/lib64/multipath \
rcdir=/etc/rc.d/init.d \
unitdir=/usr/lib/systemd/system \
includedir=/usr/include
make libdmmp_check
man libdmmp.h
man dmmp_mpath_array_get
man <dmmp function name>
User case:
Storaged multipath plugin:
storaged-project/udisks#40
FAQ:
1. Why not build on existing libmultipath internal library?
The libmultipath has too many public symbols which seems a bad
design for public library.
2. Any developer notes?
Following Linux kernel code style and libabc guideline.
Others are recorded in 'libdmmp/DEV_NOTES'
3. Can the library be licensed as LGPL?
Nope. I used some socket codes from libmultipath which is GPL.
You could create some D-BUS API use libdmmp if license concerns. We
might able to license libdmmp to LGPL when some day we change our
implementation.
Signed-off-by: Gris Ge <fge@redhat.com>
TODO:
* Working on Performance issue. Compile will fail.
Features:
* Use multipathd IPC command 'show xxx raw format <fmt>'
* Library user guide is in 'man 3 libdmmp.h'.
* Every public function has its own manpage in section 3
generated by linux 'kernel-doc' tool.
Usage:
make -j5
sudo make install \
bindir=/usr/sbin/ \
syslibdir=/usr/lib64/ \
libdir=/usr/lib64/multipath \
rcdir=/etc/rc.d/init.d \
unitdir=/usr/lib/systemd/system \
includedir=/usr/include
make libdmmp_check
man libdmmp.h
man dmmp_mpath_array_get
man <dmmp function name>
User case:
Storaged multipath plugin:
storaged-project/udisks#40
FAQ:
1. Why not build on existing libmultipath internal library?
The libmultipath has too many public symbols which seems a bad
design for public library.
2. Any developer notes?
Following Linux kernel code style and libabc guideline.
Others are recorded in 'libdmmp/DEV_NOTES'
3. Can the library be licensed as LGPL?
Nope. I used some socket codes from libmultipath which is GPL.
You could create some D-BUS API use libdmmp if license concerns. We
might able to license libdmmp to LGPL when some day we change our
implementation.
Signed-off-by: Gris Ge <fge@redhat.com>
TODO:
* Working on Performance issue. Compile will fail.
Features:
* Use multipathd IPC command 'show xxx raw format <fmt>'
* Library user guide is in 'man 3 libdmmp.h'.
* Every public function has its own manpage in section 3
generated by linux 'kernel-doc' tool.
Usage:
make -j5
sudo make install \
bindir=/usr/sbin/ \
syslibdir=/usr/lib64/ \
libdir=/usr/lib64/multipath \
rcdir=/etc/rc.d/init.d \
unitdir=/usr/lib/systemd/system \
includedir=/usr/include
make libdmmp_check
man libdmmp.h
man dmmp_mpath_array_get
man <dmmp function name>
User case:
Storaged multipath plugin:
storaged-project/udisks#40
FAQ:
1. Why not build on existing libmultipath internal library?
The libmultipath has too many public symbols which seems a bad
design for public library.
2. Any developer notes?
Following Linux kernel code style and libabc guideline.
Others are recorded in 'libdmmp/DEV_NOTES'
3. Can the library be licensed as LGPL?
Nope. I used some socket codes from libmultipath which is GPL.
You could create some D-BUS API use libdmmp if license concerns. We
might able to license libdmmp to LGPL when some day we change our
implementation.
Signed-off-by: Gris Ge <fge@redhat.com>
TODO:
* Working on Performance issue. Compile will fail.
Features:
* Use multipathd IPC command 'show xxx raw format <fmt>'
* Library user guide is in 'man 3 libdmmp.h'.
* Every public function has its own manpage in section 3
generated by linux 'kernel-doc' tool.
Usage:
make -j5
sudo make install \
bindir=/usr/sbin/ \
syslibdir=/usr/lib64/ \
libdir=/usr/lib64/multipath \
rcdir=/etc/rc.d/init.d \
unitdir=/usr/lib/systemd/system \
includedir=/usr/include
make libdmmp_check
man libdmmp.h
man dmmp_mpath_array_get
man <dmmp function name>
User case:
Storaged multipath plugin:
storaged-project/udisks#40
FAQ:
1. Why not build on existing libmultipath internal library?
The libmultipath has too many public symbols which seems a bad
design for public library.
2. Any developer notes?
Following Linux kernel code style and libabc guideline.
Others are recorded in 'libdmmp/DEV_NOTES'
3. Can the library be licensed as LGPL?
Nope. I used some socket codes from libmultipath which is GPL.
You could create some D-BUS API use libdmmp if license concerns. We
might able to license libdmmp to LGPL when some day we change our
implementation.
Signed-off-by: Gris Ge <fge@redhat.com>
Features:
* Use multipathd IPC command 'show xxx raw format <fmt>'
* Library user guide is in 'man 3 libdmmp.h'.
* Every public function has its own manpage in section 3
generated by linux 'kernel-doc' tool.
Usage:
make -j5
sudo make install \
bindir=/usr/sbin/ \
syslibdir=/usr/lib64/ \
libdir=/usr/lib64/multipath \
rcdir=/etc/rc.d/init.d \
unitdir=/usr/lib/systemd/system \
includedir=/usr/include
make libdmmp_check
man libdmmp.h
man dmmp_mpath_array_get
man <dmmp function name>
Performance:
* 4k scsi_debug sdX with 2 disks per mpath (i7-3520M 4GiB RAM RHEL 7.2):
$ make -C libdmmp speed_test
Got 2000 mpath
real 0.20
user 0.03
sys 0.01
* 10k scsi_debug sdX with 2 disks per mpath (E5-2697 32GiB RAM RHEL 7.2):
$ make -C libdmmp speed_test
Got 5000 mpath
real 1.51
user 0.45
sys 0.00
User case:
Storaged multipath plugin:
storaged-project/udisks#40
FAQ:
1. Why not build on existing libmultipath internal library?
The libmultipath has too many public symbols which seems a bad
design for public library.
2. Any developer notes?
Following Linux kernel code style and libabc guideline.
Others are recorded in 'libdmmp/DEV_NOTES'
3. Can the library be licensed as LGPL?
Nope. I used some socket codes from libmultipath which is GPL.
You could create some D-BUS API use libdmmp if license concerns. We
might able to license libdmmp to LGPL when some day we change our
implementation.
Signed-off-by: Gris Ge <fge@redhat.com>
Features:
* Use multipathd IPC command 'show xxx raw format <fmt>'
* Library user guide is in 'man 3 libdmmp.h'.
* Every public function has its own manpage in section 3
generated by linux 'kernel-doc' tool.
Usage:
make -j5
sudo make install \
bindir=/usr/sbin/ \
syslibdir=/usr/lib64/ \
libdir=/usr/lib64/multipath \
rcdir=/etc/rc.d/init.d \
unitdir=/usr/lib/systemd/system \
includedir=/usr/include
make libdmmp_check
man libdmmp.h
man dmmp_mpath_array_get
man <dmmp function name>
Performance:
* 4k scsi_debug sdX with 2 disks per mpath (i7-3520M 4GiB RAM RHEL 7.2):
$ make -C libdmmp speed_test
Got 2000 mpath
real 0.20
user 0.03
sys 0.01
* 10k scsi_debug sdX with 2 disks per mpath (E5-2697 32GiB RAM RHEL 7.2):
$ make -C libdmmp speed_test
Got 5000 mpath
real 1.51
user 0.45
sys 0.00
User case:
Storaged multipath plugin:
storaged-project/udisks#40
FAQ:
1. Why not build on existing libmultipath internal library?
The libmultipath has too many public symbols which seems a bad
design for public library.
2. Any developer notes?
Following Linux kernel code style and libabc guideline.
Others are recorded in 'libdmmp/DEV_NOTES'
3. Can the library be licensed as LGPL?
Nope. I used some socket codes from libmultipath which is GPL.
You could create some D-BUS API use libdmmp if license concerns. We
might able to license libdmmp to LGPL when some day we change our
implementation.
Signed-off-by: Gris Ge <fge@redhat.com>
Features:
* Use multipathd IPC command 'show xxx raw format <fmt>'
* Library user guide is in 'man 3 libdmmp.h'.
* Every public function has its own manpage in section 3
generated by linux 'kernel-doc' tool.
Usage:
make -j5
sudo make install \
bindir=/usr/sbin/ \
syslibdir=/usr/lib64/ \
libdir=/usr/lib64/multipath \
rcdir=/etc/rc.d/init.d \
unitdir=/usr/lib/systemd/system \
includedir=/usr/include
make -C libdmmp check
man libdmmp.h
man dmmp_mpath_array_get
man <dmmp function name>
Performance:
* 4k scsi_debug sdX with 2 disks per mpath (i7-3520M 4GiB RAM RHEL 7.2):
$ make -C libdmmp speed_test
Got 2000 mpath
real 0.20
user 0.03
sys 0.01
* 10k scsi_debug sdX with 2 disks per mpath (E5-2697 32GiB RAM RHEL 7.2):
$ make -C libdmmp speed_test
Got 5000 mpath
real 1.51
user 0.45
sys 0.00
User case:
Storaged multipath plugin:
storaged-project/udisks#40
FAQ:
1. Why not build on existing libmultipath internal library?
The libmultipath has too many public symbols which seems a bad
design for public library.
2. Any developer notes?
Following Linux kernel code style and libabc guideline.
Others are recorded in 'libdmmp/DEV_NOTES'
3. Can the library be licensed as LGPL?
Nope. I used some socket codes from libmultipath which is GPL.
You could create some D-BUS API use libdmmp if license concerns. We
might able to license libdmmp to LGPL when some day we change our
implementation.
Signed-off-by: Gris Ge <fge@redhat.com>
Features:
* Use multipathd IPC command 'show xxx raw format <fmt>'
* Library user guide is in 'man 3 libdmmp.h'.
* Every public function has its own manpage in section 3
generated by linux 'kernel-doc' tool.
Usage:
make -j5
sudo make install \
bindir=/usr/sbin/ \
syslibdir=/usr/lib64/ \
libdir=/usr/lib64/multipath \
rcdir=/etc/rc.d/init.d \
unitdir=/usr/lib/systemd/system \
includedir=/usr/include
make -C libdmmp check
man libdmmp.h
man dmmp_mpath_array_get
man <dmmp function name>
Performance:
* 4k scsi_debug sdX with 2 disks per mpath (i7-3520M 4GiB RAM RHEL 7.2):
$ make -C libdmmp speed_test
Got 2000 mpath
real 0.20
user 0.03
sys 0.01
* 10k scsi_debug sdX with 2 disks per mpath (E5-2697 32GiB RAM RHEL 7.2):
$ make -C libdmmp speed_test
Got 5000 mpath
real 1.51
user 0.45
sys 0.00
User case:
Storaged multipath plugin:
storaged-project/udisks#40
FAQ:
1. Why not build on existing libmultipath internal library?
The libmultipath has too many public symbols which seems a bad
design for public library.
2. Any developer notes?
Following Linux kernel code style and libabc guideline.
Others are recorded in 'libdmmp/DEV_NOTES'
3. Can the library be licensed as LGPL?
Nope. I used some socket codes from libmultipath which is GPL.
You could create some D-BUS API use libdmmp if license concerns. We
might able to license libdmmp to LGPL when some day we change our
implementation.
Signed-off-by: Gris Ge <fge@redhat.com>
Features:
* Use three multipathd IPC commands:
* 'show maps raw format <fmt>'
* 'show groups raw format <fmt>'
* 'show paths raw format <fmt>'
# We might have inconsistent data when something changes during these
# commands. If so, DMMP_ERR_INCONSISTENT_DATA will be raised and
# suggest user to try again.
* Library user guide will be 'man 3 libdmmp.h'.
* Every public function has its own manpage in section 3
generated by linux 'kernel-doc' tool.
Usage:
make -j5
sudo make install \
bindir=/usr/sbin/ \
syslibdir=/usr/lib64/ \
libdir=/usr/lib64/multipath \
rcdir=/etc/rc.d/init.d \
unitdir=/usr/lib/systemd/system \
includedir=/usr/include
make -C libdmmp check
man libdmmp.h
man dmmp_mpath_array_get
man <dmmp function name>
Performance:
* 4k scsi_debug sdX with 2 disks per mpath (i7-3520M 4GiB RAM RHEL 7.2):
$ make -C libdmmp speed_test
Got 2000 mpath
real 0.20
user 0.03
sys 0.01
* 10k scsi_debug sdX with 2 disks per mpath (E5-2697 32GiB RAM RHEL 7.2):
$ make -C libdmmp speed_test
Got 5000 mpath
real 1.51
user 0.45
sys 0.00
User case:
Storaged multipath plugin:
storaged-project/udisks#40
FAQ:
1. Any developer notes?
Following Linux kernel code style and libabc guideline.
Others are recorded in 'libdmmp/DEV_NOTES'
2. Can the library be licensed as LGPL?
Nope. I copied some socket codes from libmultipath which is GPL.
You could create some D-BUS API use libdmmp if license concerns.
We might able to license libdmmp to LGPL after rewrite those functions.
Signed-off-by: Gris Ge <fge@redhat.com>
Features:
* Use three multipathd IPC commands:
* 'show maps raw format <fmt>'
* 'show groups raw format <fmt>'
* 'show paths raw format <fmt>'
# We might have inconsistent data when something changes during these
# commands. If so, DMMP_ERR_INCONSISTENT_DATA will be raised and
# suggest user to try again.
* Library user guide will be 'man 3 libdmmp.h'.
* Every public function has its own manpage in section 3
generated by linux 'kernel-doc' tool.
Usage:
make -j5
sudo make install \
bindir=/usr/sbin/ \
syslibdir=/usr/lib64/ \
libdir=/usr/lib64/multipath \
rcdir=/etc/rc.d/init.d \
unitdir=/usr/lib/systemd/system \
includedir=/usr/include
make -C libdmmp check
man libdmmp.h
man dmmp_mpath_array_get
man <dmmp function name>
Performance:
* 4k scsi_debug sdX with 2 disks per mpath (i7-3520M 4GiB RAM RHEL 7.2):
$ make -C libdmmp speed_test
Got 2000 mpath
real 0.20
user 0.03
sys 0.01
* 10k scsi_debug sdX with 2 disks per mpath (E5-2697 32GiB RAM RHEL 7.2):
$ make -C libdmmp speed_test
Got 5000 mpath
real 1.51
user 0.45
sys 0.00
User case:
Storaged multipath plugin:
storaged-project/udisks#40
FAQ:
1. Any developer notes?
Following Linux kernel code style and libabc guideline.
Others are recorded in 'libdmmp/DEV_NOTES'
2. Can the library be licensed as LGPL?
Nope. I copied some socket codes from libmultipath which is GPL.
You could create some D-BUS API use libdmmp if license concerns.
We might able to license libdmmp to LGPL after rewrite those functions.
Signed-off-by: Gris Ge <fge@redhat.com>
Features:
* Use three multipathd IPC commands:
* 'show maps raw format <fmt>'
* 'show groups raw format <fmt>'
* 'show paths raw format <fmt>'
# We might have inconsistent data when something changes during these
# commands. If so, DMMP_ERR_INCONSISTENT_DATA will be raised and
# suggest user to try again.
* Library user guide will be 'man 3 libdmmp.h'.
* Every public function has its own manpage in section 3
generated by linux 'kernel-doc' tool.
Usage:
make -j5
sudo make install \
bindir=/usr/sbin/ \
syslibdir=/usr/lib64/ \
libdir=/usr/lib64/multipath \
rcdir=/etc/rc.d/init.d \
unitdir=/usr/lib/systemd/system \
includedir=/usr/include
make -C libdmmp check
man libdmmp.h
man dmmp_mpath_array_get
man <dmmp function name>
Performance:
* 4k scsi_debug sdX with 2 disks per mpath (i7-3520M 4GiB RAM RHEL 7.2):
$ make -C libdmmp speed_test
Got 2000 mpath
real 0.20
user 0.03
sys 0.01
* 10k scsi_debug sdX with 2 disks per mpath (E5-2697 32GiB RAM RHEL 7.2):
$ make -C libdmmp speed_test
Got 5000 mpath
real 1.51
user 0.45
sys 0.00
User case:
Storaged multipath plugin:
storaged-project/udisks#40
FAQ:
1. Any developer notes?
Following Linux kernel code style and libabc guideline.
Others are recorded in 'libdmmp/DEV_NOTES'
2. Can the library be licensed as LGPL?
Nope. I copied some socket codes from libmultipath which is GPL.
You could create some D-BUS API use libdmmp if license concerns.
We might able to license libdmmp to LGPL after rewrite those functions.
Signed-off-by: Gris Ge <fge@redhat.com>
Features:
* Use three multipathd IPC commands:
* 'show maps raw format <fmt>'
* 'show groups raw format <fmt>'
* 'show paths raw format <fmt>'
# We might have inconsistent data when something changes during these
# commands. If so, DMMP_ERR_INCONSISTENT_DATA will be raised and
# suggest user to try again.
* Library user guide will be 'man 3 libdmmp.h'.
* Every public function has its own manpage in section 3
generated by linux 'kernel-doc' tool.
Usage:
make -j5
sudo make install \
bindir=/usr/sbin/ \
syslibdir=/usr/lib64/ \
libdir=/usr/lib64/multipath \
rcdir=/etc/rc.d/init.d \
unitdir=/usr/lib/systemd/system \
includedir=/usr/include
make -C libdmmp check
man libdmmp.h
man dmmp_mpath_array_get
man <dmmp function name>
Performance:
* 4k scsi_debug sdX with 2 disks per mpath (i7-3520M 4GiB RAM RHEL 7.2):
$ make -C libdmmp speed_test
Got 2000 mpath
real 0.20
user 0.03
sys 0.01
* 10k scsi_debug sdX with 2 disks per mpath (E5-2697 32GiB RAM RHEL 7.2):
$ make -C libdmmp speed_test
Got 5000 mpath
real 1.51
user 0.45
sys 0.00
User case:
Storaged multipath plugin:
storaged-project/udisks#40
FAQ:
1. Any developer notes?
Following Linux kernel code style and libabc guideline.
Others are recorded in 'libdmmp/DEV_NOTES'
2. Can the library be licensed as LGPL?
Nope. I copied some socket codes from libmultipath which is GPL.
You could create some D-BUS API use libdmmp if license concerns.
We might able to license libdmmp to LGPL after rewrite those functions.
Signed-off-by: Gris Ge <fge@redhat.com>
Features:
* Use three multipathd IPC commands:
* 'show maps raw format <fmt>'
* 'show groups raw format <fmt>'
* 'show paths raw format <fmt>'
# We might have inconsistent data when something changes during these
# commands. If so, DMMP_ERR_INCONSISTENT_DATA will be raised and
# suggest user to try again.
* Library user guide will be 'man 3 libdmmp.h'.
* Every public function has its own manpage in section 3
generated by linux 'kernel-doc' tool.
Usage:
make -j5
sudo make install \
bindir=/usr/sbin/ \
syslibdir=/usr/lib64/ \
libdir=/usr/lib64/multipath \
rcdir=/etc/rc.d/init.d \
unitdir=/usr/lib/systemd/system \
includedir=/usr/include
make -C libdmmp check
man libdmmp.h
man dmmp_mpath_array_get
man <dmmp function name>
Performance:
* 4k scsi_debug sdX with 2 disks per mpath (i7-3520M 4GiB RAM RHEL 7.2):
$ make -C libdmmp speed_test
Got 2000 mpath
real 0.20
user 0.03
sys 0.01
* 10k scsi_debug sdX with 2 disks per mpath (E5-2697 32GiB RAM RHEL 7.2):
$ make -C libdmmp speed_test
Got 5000 mpath
real 1.51
user 0.45
sys 0.00
User case:
Storaged multipath plugin:
storaged-project/udisks#40
FAQ:
1. Any developer notes?
Following Linux kernel code style and libabc guideline.
Others are recorded in 'libdmmp/DEV_NOTES'
2. Can the library be licensed as LGPL?
Nope. I copied some socket codes from libmultipath which is GPL.
You could create some D-BUS API use libdmmp if license concerns.
We might able to license libdmmp to LGPL after rewrite those functions.
Signed-off-by: Gris Ge <fge@redhat.com>
Features:
* Use three multipathd IPC commands:
* 'show maps raw format <fmt>'
* 'show groups raw format <fmt>'
* 'show paths raw format <fmt>'
# We might have inconsistent data when something changes during these
# commands. If so, DMMP_ERR_INCONSISTENT_DATA will be raised and
# suggest user to try again.
* Library user guide will be 'man 3 libdmmp.h'.
* Every public function has its own manpage in section 3
generated by linux 'kernel-doc' tool.
Usage:
make -j5
sudo make install \
bindir=/usr/sbin/ \
syslibdir=/usr/lib64/ \
libdir=/usr/lib64/multipath \
rcdir=/etc/rc.d/init.d \
unitdir=/usr/lib/systemd/system \
includedir=/usr/include
make -C libdmmp check
man libdmmp.h
man dmmp_mpath_array_get
man <dmmp function name>
Performance:
* 4k scsi_debug sdX with 2 disks per mpath (i7-3520M 4GiB RAM RHEL 7.2):
$ make -C libdmmp speed_test
Got 2000 mpath
real 0.20
user 0.03
sys 0.01
* 10k scsi_debug sdX with 2 disks per mpath (E5-2697 32GiB RAM RHEL 7.2):
$ make -C libdmmp speed_test
Got 5000 mpath
real 1.51
user 0.45
sys 0.00
User case:
Storaged multipath plugin:
storaged-project/udisks#40
FAQ:
1. Any developer notes?
Following Linux kernel code style and libabc guideline.
Others are recorded in 'libdmmp/DEV_NOTES'
2. Can the library be licensed as LGPL?
Nope. I copied some socket codes from libmultipath which is GPL.
You could create some D-BUS API use libdmmp if license concerns.
We might able to license libdmmp to LGPL after rewrite those functions.
Signed-off-by: Gris Ge <fge@redhat.com>
Features:
* Use three multipathd IPC commands:
* 'show maps raw format <fmt>'
* 'show groups raw format <fmt>'
* 'show paths raw format <fmt>'
# We might have inconsistent data when something changes during these
# commands. If so, DMMP_ERR_INCONSISTENT_DATA will be raised and
# suggest user to try again.
* Library user guide will be 'man 3 libdmmp.h'.
* Every public function has its own manpage in section 3
generated by linux 'kernel-doc' tool.
Usage:
make -j5
sudo make install \
bindir=/usr/sbin/ \
syslibdir=/usr/lib64/ \
libdir=/usr/lib64/multipath \
rcdir=/etc/rc.d/init.d \
unitdir=/usr/lib/systemd/system \
includedir=/usr/include
make -C libdmmp check
man libdmmp.h
man dmmp_mpath_array_get
man <dmmp function name>
Performance:
* 4k scsi_debug sdX with 2 disks per mpath (i7-3520M 4GiB RAM RHEL 7.2):
$ make -C libdmmp speed_test
Got 2000 mpath
real 0.20
user 0.03
sys 0.01
* 10k scsi_debug sdX with 2 disks per mpath (E5-2697 32GiB RAM RHEL 7.2):
$ make -C libdmmp speed_test
Got 5000 mpath
real 1.51
user 0.45
sys 0.00
User case:
Storaged multipath plugin:
storaged-project/udisks#40
FAQ:
1. Any developer notes?
Following Linux kernel code style and libabc guideline.
Others are recorded in 'libdmmp/DEV_NOTES'
2. Can the library be licensed as LGPL?
Nope. I copied some socket codes from libmultipath which is GPL.
You could create some D-BUS API use libdmmp if license concerns.
We might able to license libdmmp to LGPL after rewrite those functions.
Signed-off-by: Gris Ge <fge@redhat.com>
|
Hi Gris, can you give me some heads up about the Multipath API? Can we merge this or do I have to wait a bit longer? Thanks |
|
@phatina Hi Peter, I am still waiting dm-devel to accept my V2 patch there. Once they commited, we could review this PR. If we need this feature badly, we could follow the plan B:
[2]: It just use multipathd IPC socket. |
|
OK, Gris. I was curious, because Todd told me, that your patches were dismissed, but now I know, that you are still in the game. Let's wait then for the review... |
|
Yeah. The V1 patch was dismissed. |
dbf8abf
to
370da0b
Compare
Features:
* Use these multipathd IPC commands:
* 'show maps raw format <fmt>'
* 'show groups raw format <fmt>'
* 'show paths raw format <fmt>'
# We might have inconsistent data when something changes during these
# commands. If so, DMMP_ERR_INCONSISTENT_DATA will be raised and
# suggest user to try again.
* Library user guide will be 'man 3 libdmmp.h'.
* Every public function has its own manpage in section 3 which is
generated by linux 'kernel-doc' tool.
Usage:
make -j5
sudo make install \
bindir=/usr/sbin/ \
syslibdir=/usr/lib64/ \
libdir=/usr/lib64/multipath \
rcdir=/etc/rc.d/init.d \
unitdir=/usr/lib/systemd/system \
includedir=/usr/include
make -C libdmmp check
man libdmmp.h
man dmmp_mpath_array_get
man <dmmp function name>
Performance:
* 4k scsi_debug sdX with 2 disks per mpath (i7-3520M 4GiB RAM RHEL 7.2):
$ make -C libdmmp speed_test
Got 2000 mpath
real 0.20
user 0.03
sys 0.01
* 10k scsi_debug sdX with 2 disks per mpath (E5-2697 32GiB RAM RHEL 7.2):
$ make -C libdmmp speed_test
Got 5000 mpath
real 1.51
user 0.45
sys 0.00
User case:
Storaged multipath plugin:
storaged-project/udisks#40
Misc:
* Developer note is libdmmp/DEV_NOTES.
Signed-off-by: Gris Ge <fge@redhat.com>
Features:
* Use mpath_cmd.h for IPC connection and use output of
this command:
* 'show maps json'
* Library user guide will be 'man 3 libdmmp.h'.
* Every public function has its own manpage in section 3 which is
generated by linux 'kernel-doc' tool.
Usage:
make -j5
sudo make install \
bindir=/usr/sbin/ \
syslibdir=/usr/lib64/ \
libdir=/usr/lib64/multipath \
rcdir=/etc/rc.d/init.d \
unitdir=/usr/lib/systemd/system \
includedir=/usr/include
make -C libdmmp check
make -C libdmmp speed_test
man libdmmp.h
man dmmp_mpath_array_get
man <dmmp function name>
Performance:
* 4k scsi_debug sdX with 2 disks per mpath (i7-3520M 4GiB RAM RHEL 7.2):
$ make -C libdmmp speed_test
Got 2000 mpath
real 0.20
user 0.03
sys 0.01
* 10k scsi_debug sdX with 2 disks per mpath (E5-2697 32GiB RAM RHEL 7.2):
$ make -C libdmmp speed_test
Got 5000 mpath
real 1.51
user 0.45
sys 0.00
User case:
Storaged multipath plugin:
storaged-project/udisks#40
Misc:
* Developer note is libdmmp/DEV_NOTES.
Signed-off-by: Gris Ge <fge@redhat.com>
Features:
* Use mpath_cmd.h for IPC connection and use output of
this command:
* 'show maps json'
* Library user guide will be 'man 3 libdmmp.h'.
* Every public function has its own manpage in section 3 which is
generated by linux 'kernel-doc' tool.
Usage:
make -j5
sudo make install \
bindir=/usr/sbin/ \
syslibdir=/usr/lib64/ \
libdir=/usr/lib64/multipath \
rcdir=/etc/rc.d/init.d \
unitdir=/usr/lib/systemd/system \
includedir=/usr/include
make -C libdmmp check
make -C libdmmp speed_test
man libdmmp.h
man dmmp_mpath_array_get
man <dmmp function name>
Performance:
* 4k scsi_debug sdX with 2 disks per mpath (i7-3520M 4GiB RAM RHEL 7.2):
$ make -C libdmmp speed_test
Got 2000 mpath
real 0.20
user 0.03
sys 0.01
* 10k scsi_debug sdX with 2 disks per mpath (E5-2697 32GiB RAM RHEL 7.2):
$ make -C libdmmp speed_test
Got 5000 mpath
real 1.51
user 0.45
sys 0.00
User case:
Storaged multipath plugin:
storaged-project/udisks#40
Misc:
* Developer note is libdmmp/DEV_NOTES.
Signed-off-by: Gris Ge <fge@redhat.com>
Features:
* Use mpath_cmd.h for IPC connection and use output of
this command:
* 'show maps json'
* Library user guide will be 'man 3 libdmmp.h'.
* Every public function has its own manpage in section 3 which is
generated by linux 'kernel-doc' tool.
Usage:
make -j5
sudo make install \
bindir=/usr/sbin/ \
syslibdir=/usr/lib64/ \
libdir=/usr/lib64/multipath \
rcdir=/etc/rc.d/init.d \
unitdir=/usr/lib/systemd/system \
includedir=/usr/include
make -C libdmmp check
make -C libdmmp speed_test
man libdmmp.h
man dmmp_mpath_array_get
man <dmmp function name>
Performance:
* 4k scsi_debug sdX with 2 disks per mpath (i7-3520M 4GiB RAM RHEL 7.2):
$ make -C libdmmp speed_test
Got 2000 mpath
real 0.20
user 0.03
sys 0.01
* 10k scsi_debug sdX with 2 disks per mpath (E5-2697 32GiB RAM RHEL 7.2):
$ make -C libdmmp speed_test
Got 5000 mpath
real 1.51
user 0.45
sys 0.00
User case:
Storaged multipath plugin:
storaged-project/udisks#40
Misc:
* Developer note is libdmmp/DEV_NOTES.
Signed-off-by: Gris Ge <fge@redhat.com>
Features:
* Use mpath_cmd.h for IPC connection and use output of
this command:
* 'show maps json'
* Library user guide will be 'man 3 libdmmp.h'.
* Every public function has its own manpage in section 3 which is
generated by linux 'kernel-doc' tool.
Usage:
make -j5
sudo make install \
bindir=/usr/sbin/ \
syslibdir=/usr/lib64/ \
libdir=/usr/lib64/multipath \
rcdir=/etc/rc.d/init.d \
unitdir=/usr/lib/systemd/system \
includedir=/usr/include
make -C libdmmp check
make -C libdmmp speed_test
man libdmmp.h
man dmmp_mpath_array_get
man <dmmp function name>
Performance:
* 4k scsi_debug sdX with 2 disks per mpath (i7-3520M 4GiB RAM RHEL 7.2):
$ make -C libdmmp speed_test
Got 2000 mpath
real 0.20
user 0.03
sys 0.01
* 10k scsi_debug sdX with 2 disks per mpath (E5-2697 32GiB RAM RHEL 7.2):
$ make -C libdmmp speed_test
Got 5000 mpath
real 1.51
user 0.45
sys 0.00
User case:
Storaged multipath plugin:
storaged-project/udisks#40
Misc:
* Developer note is libdmmp/DEV_NOTES.
Signed-off-by: Gris Ge <fge@redhat.com>
Features:
* Use mpath_cmd.h for IPC connection and use output of
this command:
* 'show maps json'
* Library user guide will be 'man 3 libdmmp.h'.
* Every public function has its own manpage in section 3 which is
generated by linux 'kernel-doc' tool.
Usage:
make -j5
sudo make install \
bindir=/usr/sbin/ \
syslibdir=/usr/lib64/ \
libdir=/usr/lib64/multipath \
rcdir=/etc/rc.d/init.d \
unitdir=/usr/lib/systemd/system \
includedir=/usr/include
make -C libdmmp check
make -C libdmmp speed_test
man libdmmp.h
man dmmp_mpath_array_get
man <dmmp function name>
Performance:
* 4k scsi_debug sdX with 2 disks per mpath (i7-3520M 4GiB RAM RHEL 7.2):
$ make -C libdmmp speed_test
Got 2000 mpath
real 0.20
user 0.03
sys 0.01
* 10k scsi_debug sdX with 2 disks per mpath (E5-2697 32GiB RAM RHEL 7.2):
$ make -C libdmmp speed_test
Got 5000 mpath
real 1.51
user 0.45
sys 0.00
User case:
Storaged multipath plugin:
storaged-project/udisks#40
Misc:
* Developer note is libdmmp/DEV_NOTES.
Signed-off-by: Gris Ge <fge@redhat.com>
Features:
* Use mpath_cmd.h for IPC connection and use output of
this command:
* 'show maps json'
* Library user guide will be 'man 3 libdmmp.h'.
* Every public function has its own manpage in section 3 which is
generated by linux 'kernel-doc' tool.
Usage:
make -j5
sudo make install \
bindir=/usr/sbin/ \
syslibdir=/usr/lib64/ \
libdir=/usr/lib64/multipath \
rcdir=/etc/rc.d/init.d \
unitdir=/usr/lib/systemd/system \
includedir=/usr/include
make -C libdmmp check
make -C libdmmp speed_test
man libdmmp.h
man dmmp_mpath_array_get
man <dmmp function name>
Performance:
* 4k scsi_debug sdX with 2 disks per mpath (i7-3520M 4GiB RAM RHEL 7.2):
$ make -C libdmmp speed_test
Got 2000 mpath
real 0.20
user 0.03
sys 0.01
* 10k scsi_debug sdX with 2 disks per mpath (E5-2697 32GiB RAM RHEL 7.2):
$ make -C libdmmp speed_test
Got 5000 mpath
real 1.51
user 0.45
sys 0.00
User case:
Storaged multipath plugin:
storaged-project/udisks#40
Misc:
* Developer note is libdmmp/DEV_NOTES.
Signed-off-by: Gris Ge <fge@redhat.com>
Do not commit yet, please wait dm-devl accept the changes about C API of multipath.