Bug#463769: Fails on files (ie disk images)

Wakko Warner wakko at animx.eu.org
Sun Feb 3 04:51:11 UTC 2008


Package: mdadm
Version: 2.6.4-1
Severity: minor
Tags: patch

I made an image of 2 disks that are part of a 2 disk raid0.  These images are
320gb in size.  I tried to use mdadm -E to give me some information about
them which resulted in:
# mdadm -E /junk/nail.md0-part1of2.img
mdadm: cannot open /junk/nail.md0-part1of2.img: File too large
# 

I modified the source to use O_LARGEFILE in open which gave me an error
stating that the "device" was not recognised.  mdadm does not stat files to
obtain the size, it only uses ioctl's.  The patch adds O_LARGEFILE and tests
to see if the device is a file and uses that information instead.

This worked for me, but I only modified for -Q and -E.  I did not attempt to
assemble the array.

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.23
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages mdadm depends on:
ii  debconf                       1.5.19     Debian configuration management sy
ii  libc6                         2.7-5      GNU C Library: Shared libraries
ii  lsb-base                      3.1-22     Linux Standard Base 3.1 init scrip
ii  makedev                       2.3.1-75   Creates device files in /dev

Versions of packages mdadm recommends:
ii  exim4-daemon-custom [mail-tra 10:4.63-10 custom exim MTA (v4) daemon with l
ii  module-init-tools             3.2.2-3    tools for managing Linux kernel mo

-- debconf information excluded
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mdadm.patch
Type: text/x-c
Size: 1887 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-mdadm-devel/attachments/20080202/96db0054/attachment.bin 


More information about the pkg-mdadm-devel mailing list