mdadm create size problem
Red Hat AS 2.1 mdadm 1.11
I have two devices that used to be part of a now corrupt RAID10 configuration. When I try to reuse them to create a RAID1, it only uses about 1 third of the diskspace available.
# fdisk -l /dev/sdg
Disk /dev/sdg: 255 heads, 63 sectors, 8924 cylinders Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System /dev/sdg1 1 8924 71681998+ fd Linux raid autodetect
# fdisk -l /dev/sdn
Disk /dev/sdn: 255 heads, 63 sectors, 8924 cylinders Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System /dev/sdn1 1 8924 71681998+ fd Linux raid autodetect
# mdadm --create --verbose /dev/md5 --level=1 --raid-devices=2 /dev/sdg /dev/sdn
mdadm: /dev/sdg appears to contain an ext2fs file system
size=419520K mtime=Mon May 2 17:04:04 2005
mdadm: /dev/sdn appears to contain an ext2fs file system
size=419520K mtime=Mon May 2 17:04:04 2005
mdadm: size set to 139904K
Continue creating array? nIf I try to add the --size option, even a size that is 139904K or less, it tells me the size is invalid:
# mdadm --create --verbose /dev/md5 --level=1 --raid-devices=2 /dev/sdg /dev/sdn --size=139904K mdadm: invalid size: 139904K
I did reboot the system after fdisk'ing the devices.
Do I need to low-level format these devices to be able to reuse them?
Kind regards,
Herta
Signature · 9 lines
Herta Van den Eynde -=- Toledo system management
K.U. Leuven - Ludit -=- phone: +32 (0)16 322 166
-=- 50°51'27" N 004°40'39" E
"I wish I were two little cats. Then I could play together."
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.htmlOK, there's definitely something wrong here. I ran a
# mdadm --zero-superblock --force /dev/sdX followed by # dd if=/dev/zero of=/dev/sdX bs=64k where X=[g-in-p], and when I try to create a RAID 1 using two of these devices, it still sets the size to 139904K. When I create a RAID 0 using the same devices, mdadm does set the size correctly.
# mdadm --create --verbose /dev/md6 --level=1 --raid-devices=2 /dev/sdh /dev/sdo mdadm: size set to 139904K mdadm: array /dev/md6 started.
# mdadm --create --verbose /dev/md6 --level=0 --raid-devices=2 /dev/sdh /dev/sdo mdadm: chunk size defaults to 64K mdadm: array /dev/md6 started. # mke2fs -j -v /dev/md6 (...) # mount /dev/md6 /mnt; df /mnt Filesystem 1k-blocks Used Available Use% Mounted on /dev/md6 141124600 32828 133923052 1% /mnt
Is this a bug, or am I overlooking something?
Herta
Quoted 39 lines · Herta Van den Eynde
Red Hat AS 2.1 mdadm 1.11
I have two devices that used to be part of a now corrupt RAID10 configuration. When I try to reuse them to create a RAID1, it only uses about 1 third of the diskspace available.# fdisk -l /dev/sdgDisk
/dev/sdg: 255 heads, 63 sectors, 8924 cylinders Units = cylinders of 16065 * 512 bytesDevice Boot Start End Blocks Id System /dev/sdg1 1 8924 71681998+ fd Linux raid autodetect# fdisk -l /dev/sdnDisk
/dev/sdn: 255 heads, 63 sectors, 8924 cylinders Units = cylinders of 16065 * 512 bytesDevice Boot Start End Blocks Id System /dev/sdn1 1 8924 71681998+ fd Linux raid autodetect# mdadm --create --verbose /dev/md5 --level=1 --raid-devices=2 /dev/sdg /dev/sdn mdadm: /dev/sdg appears to contain an ext2fs file system size=419520K mtime=Mon May 2 17:04:04 2005 mdadm: /dev/sdn appears to contain an ext2fs file system size=419520K mtime=Mon May 2 17:04:04 2005 mdadm: size set to 139904K Continue creating array? nIf I try to add the --size option, even a size that is 139904K or less, it tells me the size is invalid:
# mdadm --create --verbose /dev/md5 --level=1 --raid-devices=2 /dev/sdg /dev/sdn --size=139904K mdadm: invalid size: 139904KI did reboot the system after fdisk'ing the devices.
Do I need to low-level format these devices to be able to reuse them?
Kind regards,
Herta
Signature · 10 lines
Herta Van den Eynde -=- Toledo system management
K.U. Leuven - Ludit -=- phone: +32 (0)16 322 166
-=- 50°51'27" N 004°40'39" E
"I wish I were two little cats. Then I could play together."
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.htmlFWIIW, I reverted to mdadm-1.4.0-1, and that version creates the RAID1+0 just fine.
Herta
Quoted 70 lines · Herta Van den Eynde
OK, there's definitely something wrong here. I ran a
# mdadm --zero-superblock --force /dev/sdX followed by # dd if=/dev/zero of=/dev/sdX bs=64k where X=[g-in-p], and when I try to create a RAID 1 using two of these devices, it still sets the size to 139904K. When I create a RAID 0 using the same devices, mdadm does set the size correctly.# mdadm --create --verbose /dev/md6 --level=1 --raid-devices=2 /dev/sdh /dev/sdo mdadm: size set to 139904K mdadm: array /dev/md6 started.# mdadm --create --verbose /dev/md6 --level=0 --raid-devices=2 /dev/sdh /dev/sdo mdadm: chunk size defaults to 64K mdadm: array /dev/md6 started. # mke2fs -j -v /dev/md6 (...) # mount /dev/md6 /mnt; df /mnt Filesystem 1k-blocks Used Available Use% Mounted on /dev/md6 141124600 32828 133923052 1% /mntIs this a bug, or am I overlooking something?
Herta
Quoted 39 lines · Herta Van den Eynde
Red Hat AS 2.1 mdadm 1.11
I have two devices that used to be part of a now corrupt RAID10 configuration. When I try to reuse them to create a RAID1, it only uses about 1 third of the diskspace available.# fdisk -l /dev/sdgDisk
/dev/sdg: 255 heads, 63 sectors, 8924 cylinders Units = cylinders of 16065 * 512 bytesDevice Boot Start End Blocks Id System /dev/sdg1 1 8924 71681998+ fd Linux raid autodetect# fdisk -l /dev/sdnDisk
/dev/sdn: 255 heads, 63 sectors, 8924 cylinders Units = cylinders of 16065 * 512 bytesDevice Boot Start End Blocks Id System /dev/sdn1 1 8924 71681998+ fd Linux raid autodetect# mdadm --create --verbose /dev/md5 --level=1 --raid-devices=2 /dev/sdg /dev/sdn mdadm: /dev/sdg appears to contain an ext2fs file system size=419520K mtime=Mon May 2 17:04:04 2005 mdadm: /dev/sdn appears to contain an ext2fs file system size=419520K mtime=Mon May 2 17:04:04 2005 mdadm: size set to 139904K Continue creating array? nIf I try to add the --size option, even a size that is 139904K or less, it tells me the size is invalid:
# mdadm --create --verbose /dev/md5 --level=1 --raid-devices=2 /dev/sdg /dev/sdn --size=139904K mdadm: invalid size: 139904KI did reboot the system after fdisk'ing the devices.
Do I need to low-level format these devices to be able to reuse them?
Kind regards,
Herta
Signature · 9 lines
Herta Van den Eynde -=- Toledo system management
K.U. Leuven - Ludit -=- phone: +32 (0)16 322 166
-=- 50°51'27" N 004°40'39" E
"I wish I were two little cats. Then I could play together."
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.htmlWhat version were you trying? 1.9.0 and 1.11.0 are considered the latest stable versions i believe.
Regards,
Tyler.
Quoted 75 lines · Herta Van den Eynde
FWIIW, I reverted to mdadm-1.4.0-1, and that version creates the RAID1+0 just fine.
Herta
Quoted 69 lines · Herta Van den Eynde
OK, there's definitely something wrong here. I ran a
# mdadm --zero-superblock --force /dev/sdX followed by # dd if=/dev/zero of=/dev/sdX bs=64k where X=[g-in-p], and when I try to create a RAID 1 using two of these devices, it still sets the size to 139904K. When I create a RAID 0 using the same devices, mdadm does set the size correctly.# mdadm --create --verbose /dev/md6 --level=1 --raid-devices=2 /dev/sdh /dev/sdo mdadm: size set to 139904K mdadm: array /dev/md6 started.# mdadm --create --verbose /dev/md6 --level=0 --raid-devices=2 /dev/sdh /dev/sdo mdadm: chunk size defaults to 64K mdadm: array /dev/md6 started. # mke2fs -j -v /dev/md6 (...) # mount /dev/md6 /mnt; df /mnt Filesystem 1k-blocks Used Available Use% Mounted on /dev/md6 141124600 32828 133923052 1% /mntIs this a bug, or am I overlooking something?
Herta
Quoted 38 lines · Herta Van den Eynde
Red Hat AS 2.1 mdadm 1.11
I have two devices that used to be part of a now corrupt RAID10 configuration. When I try to reuse them to create a RAID1, it only uses about 1 third of the diskspace available.# fdisk -l /dev/sdgDisk
/dev/sdg: 255 heads, 63 sectors, 8924 cylinders Units = cylinders of 16065 * 512 bytesDevice Boot Start End Blocks Id System /dev/sdg1 1 8924 71681998+ fd Linux raid autodetect# fdisk -l /dev/sdnDisk
/dev/sdn: 255 heads, 63 sectors, 8924 cylinders Units = cylinders of 16065 * 512 bytesDevice Boot Start End Blocks Id System /dev/sdn1 1 8924 71681998+ fd Linux raid autodetect# mdadm --create --verbose /dev/md5 --level=1 --raid-devices=2 /dev/sdg /dev/sdn mdadm: /dev/sdg appears to contain an ext2fs file system size=419520K mtime=Mon May 2 17:04:04 2005 mdadm: /dev/sdn appears to contain an ext2fs file system size=419520K mtime=Mon May 2 17:04:04 2005 mdadm: size set to 139904K Continue creating array? nIf I try to add the --size option, even a size that is 139904K or less, it tells me the size is invalid:
# mdadm --create --verbose /dev/md5 --level=1 --raid-devices=2 /dev/sdg /dev/sdn --size=139904K mdadm: invalid size: 139904KI did reboot the system after fdisk'ing the devices.
Do I need to low-level format these devices to be able to reuse them?
Kind regards,
Herta
I was trying mdadm-1.11.0 which I picked up from
http://www.be.kernel.org/pub/linux/utils/raid/mdadm/mdadm-1.11.0.tar.gz
on Red Hat Advanced Server 2.1 most recent kernel update:
# cat /proc/version Linux version 2.4.9-e.62enterprise ([email protected]) (gcc version 2.96 20000731 (Red Hat Linux 7.2 2.96-129.7.2)) #1 SMP Fri Apr 8 18:46:17 EDT 2005
Kind regards,
Herta
Quoted 88 lines · Tyler
What version were you trying? 1.9.0 and 1.11.0 are considered the latest stable versions i believe.
Regards,
Tyler.Quoted 76 lines · Herta Van den Eynde
FWIIW, I reverted to mdadm-1.4.0-1, and that version creates the RAID1+0 just fine.
Herta
Quoted 70 lines · Herta Van den Eynde
OK, there's definitely something wrong here. I ran a
# mdadm --zero-superblock --force /dev/sdX followed by # dd if=/dev/zero of=/dev/sdX bs=64k where X=[g-in-p], and when I try to create a RAID 1 using two of these devices, it still sets the size to 139904K. When I create a RAID 0 using the same devices, mdadm does set the size correctly.# mdadm --create --verbose /dev/md6 --level=1 --raid-devices=2 /dev/sdh /dev/sdo mdadm: size set to 139904K mdadm: array /dev/md6 started.# mdadm --create --verbose /dev/md6 --level=0 --raid-devices=2 /dev/sdh /dev/sdo mdadm: chunk size defaults to 64K mdadm: array /dev/md6 started. # mke2fs -j -v /dev/md6 (...) # mount /dev/md6 /mnt; df /mnt Filesystem 1k-blocks Used Available Use% Mounted on /dev/md6 141124600 32828 133923052 1% /mntIs this a bug, or am I overlooking something?
Herta
Quoted 38 lines · Herta Van den Eynde
Red Hat AS 2.1 mdadm 1.11
I have two devices that used to be part of a now corrupt RAID10 configuration. When I try to reuse them to create a RAID1, it only uses about 1 third of the diskspace available.# fdisk -l /dev/sdgDisk
/dev/sdg: 255 heads, 63 sectors, 8924 cylinders Units = cylinders of 16065 * 512 bytesDevice Boot Start End Blocks Id System /dev/sdg1 1 8924 71681998+ fd Linux raid autodetect# fdisk -l /dev/sdnDisk
/dev/sdn: 255 heads, 63 sectors, 8924 cylinders Units = cylinders of 16065 * 512 bytesDevice Boot Start End Blocks Id System /dev/sdn1 1 8924 71681998+ fd Linux raid autodetect# mdadm --create --verbose /dev/md5 --level=1 --raid-devices=2 /dev/sdg /dev/sdn mdadm: /dev/sdg appears to contain an ext2fs file system size=419520K mtime=Mon May 2 17:04:04 2005 mdadm: /dev/sdn appears to contain an ext2fs file system size=419520K mtime=Mon May 2 17:04:04 2005 mdadm: size set to 139904K Continue creating array? nIf I try to add the --size option, even a size that is 139904K or less, it tells me the size is invalid:
# mdadm --create --verbose /dev/md5 --level=1 --raid-devices=2 /dev/sdg /dev/sdn --size=139904K mdadm: invalid size: 139904KI did reboot the system after fdisk'ing the devices.
Do I need to low-level format these devices to be able to reuse them?
Kind regards,
Herta
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 9 lines
Herta Van den Eynde -=- Toledo system management
K.U. Leuven - Ludit -=- phone: +32 (0)16 322 166
-=- 50°51'27" N 004°40'39" E
"I wish I were two little cats. Then I could play together."
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.htmlOn Tuesday May 3, [email protected] wrote:
(sorry for the delay in looking at this).
Quoted 8 lines
Red Hat AS 2.1 mdadm 1.11
I have two devices that used to be part of a now corrupt RAID10 configuration. When I try to reuse them to create a RAID1, it only uses about 1 third of the diskspace available.# fdisk -l /dev/sdgDisk
/dev/sdg: 255 heads, 63 sectors, 8924 cylinders Units = cylinders of 16065 * 512 bytes
...
Quoted 2 lines
mdadm: size set to 139904K
Continue creating array? n
Yep, there is a bug in 1.11.0.
In Create.c, line 209,
else {
ldsize = dsize;
dsize <<= 9;
}
should be
else {
ldsize = dsize;
ldsize <<= 9;
}It only affects systems where ioctl(BLKGETSIZE64) doesn't exist or fails.
Quoted 7 lines
If I try to add the --size option, even a size that is 139904K or less, it tells me the size is invalid:
# mdadm --create --verbose /dev/md5 --level=1 --raid-devices=2 /dev/sdg /dev/sdn --size=139904K mdadm: invalid size: 139904K
size should be a simple integer, no suffix, and it wouldn't let you create an array using more space than it thinks exists anyway.
I guess it is time for a 1.12 ??
NeilBrown
Quoted 2 lines · Neil Brown
I guess it is time for a 1.12 ??
in this case please recheck the ordering issue, since mdadm -Ss does not yet work properly.
L.
Signature · 6 lines
Luca Berra -- [email protected] Communication Media & Services S.r.l. /"\ \ / ASCII RIBBON CAMPAIGN X AGAINST HTML MAIL / \
Quoted 5 lines · On Tuesday May 24, [email protected] wrote:
Quoted 2 lines · Neil Brown
I guess it is time for a 1.12 ??
in this case please recheck the ordering issue, since mdadm -Ss does not yet work properly.
Thanks for the reminder.
I think I'll just do it as a mutli-pass.
i.e. try to stop everything quietly in any order and as long as something succeeded and something failed, try again.
Then one last try in non-quite mode to get the right error messages.
NeilBrown
Quoted 4 lines · Neil Brown
Quoted 3 lines · On Tuesday May 24, [email protected] wrote:
Quoted 2 lines · Neil Brown
I guess it is time for a 1.12 ??
Quoted 9 lines
Quoted 2 lines
in this case please recheck the ordering issue, since mdadm -Ss does not yet work properly.
Thanks for the reminder.
I think I'll just do it as a mutli-pass.
i.e. try to stop everything quietly in any order and as long as something succeeded and something failed, try again.
Then one last try in non-quite mode to get the right error messages.
this is a good idea, i'd do the same for start, so we do not depend on correct ordering in /etc/mdadm.conf
L.
Signature · 6 lines
Luca Berra -- [email protected] Communication Media & Services S.r.l. /"\ \ / ASCII RIBBON CAMPAIGN X AGAINST HTML MAIL / \