Fix Linux RAID detection
PATCH 1/1 Fix Linux RAID detection
After upgrading to udev 128, the devices of my RAID array stopped being detected as such by vol_id. The reason is that libvolume_id lacks large file support, so it couldn't seek to the end of my 500GB devices to find the RAID magic. This patch simply #includes config.h in util.c so that the proper macros are defined, bringing in a 64-bit lseek(). If any other backends apart from Linux RAID require a volume_id_get_buffer() that has 64-bit support, they will obviously be fixed by this as well.
extras/volume_id/lib/util.c +1 -0
@@ -21,6 +21,7 @@#define _GNU_SOURCE 1#endif +#include <config.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h>
Quoted 12 lines · Chris Spiegel
After upgrading to udev 128, the devices of my RAID array stopped being detected as such by
vol_id. The reason is thatlibvolume_idlacks large file support, so it couldn't seek to the end of my 500GB devices to find the RAID magic. This patch simply #includesconfig.hinutil.cso that the proper macros are defined, bringing in a 64-bitlseek(). If any other backends apart from Linux RAID require avolume_id_get_buffer()that has 64-bit support, they will obviously be fixed by this as well.diff -ru
udev-128/extras/volume_id/lib/util.cudev-128.new/extras/volume_id/lib/util.c
extras/volume_id/lib/util.c 2008-09-30 15:55:19.402775372 -0700 line 27
Quoted 7 lines
extras/volume_id/lib/util.c 2008-09-30 15:55:19.402775372 -0700 renamed from extras/volume_id/lib/util.c 2008-09-09 17:37:38.000000000 -0700 +1
-0@@ -21,6 +21,7 @@ #define _GNU_SOURCE 1 #endif +#include <config.h> #include <stdio.h> #include <stdlib.h> #include <unistd.h>
I hope this already fixed it:
http://git.kernel.org/?p=linux/hotplug/udev.git;a=commitdiff;h8f27948cdafd8a4b90a6b4f1f54b89891983506
Thanks,
Kay
Quoted 9 lines · Kay Sievers
Quoted 8 lines · Chris Spiegel
After upgrading to udev 128, the devices of my RAID array stopped being detected as such by
vol_id. The reason is thatlibvolume_idlacks large file support, so it couldn't seek to the end of my 500GB devices to find the RAID magic. This patch simply #includesconfig.hinutil.cso that the proper macros are defined, bringing in a 64-bitlseek(). If any other backends apart from Linux RAID require avolume_id_get_buffer()that has 64-bit support, they will obviously be fixed by this as well.
[patch snipped]
Quoted 2 lines
I hope this already fixed it:
http://git.kernel.org/?p=linux/hotplug/udev.git;a=commitdiff;h8f27948cdafd8a4b90a6b4f1f54b89891983506
I just grabbed the latest git source and the problem remained; the fix is easy, though. extras/volume_id/lib/Makefile.am is missing the following:
include $(top_srcdir)/Makefile.am.inc
When I added that and rebuilt, vol_id correctly identified my RAID devices.
Chris
Quoted 11 lines · Chris Spiegel
Quoted 9 lines · Kay Sievers
Quoted 8 lines · Chris Spiegel
After upgrading to udev 128, the devices of my RAID array stopped being detected as such by
vol_id. The reason is thatlibvolume_idlacks large file support, so it couldn't seek to the end of my 500GB devices to find the RAID magic. This patch simply #includesconfig.hinutil.cso that the proper macros are defined, bringing in a 64-bitlseek(). If any other backends apart from Linux RAID require avolume_id_get_buffer()that has 64-bit support, they will obviously be fixed by this as well.[patch snipped]
Quoted 8 lines
Quoted 2 lines
I hope this already fixed it:
http://git.kernel.org/?p=linux/hotplug/udev.git;a=commitdiff;h8f27948cdafd8a4b90a6b4f1f54b89891983506I just grabbed the latest git source and the problem remained; the fix is easy, though. extras/volume_id/lib/Makefile.am is missing the following:
include $(top_srcdir)/Makefile.am.inc
Oops, sorry. Hopefully fixed now. :) Thanks for your patience.
Kay