mdadm RAID5 Grow
I have been trying to run:
mdadm --grow /dev/md0 --raid-devices=6 --backup-file /backup_raid_grow I get:
mdadm: Need to backup 1280K of critical section..
mdadm: /dev/md0: Cannot get array details from sysfs
Software versions:
mdadm version 2.5.3, kernel 2.6.17.13
Note that /dev/md0 does in fact have 6 drives, with 4+2 spares:
linux-nas:~/source/mdadm-2.5.3 # mdadm -D /dev/md0 /dev/md0:
Version : 00.90.03
Creation Time : Mon Dec 31 20:20:05 2001
Raid Level : raid5
Array Size : 937681536 (894.24 GiB 960.19 GB)
Device Size : 312560512 (298.08 GiB 320.06 GB) Raid Devices : 4
Total Devices : 6
Preferred Minor : 0
Persistence : Superblock is persistent
Update Time : Thu Oct 5 00:24:18 2006
State : clean
Active Devices : 4
Working Devices : 6
Failed Devices : 0
Spare Devices : 2
Layout : left-symmetric
Chunk Size : 128K
UUID : 0d4e2bae:95de9dc6:4bf9f695:9e1a48be
Events : 0.988859
Number Major Minor RaidDevice State
0 8 209 0 active sync /dev/sdn1
1 8 145 1 active sync /dev/sdj1
2 8 129 2 active sync /dev/sdi1
3 8 161 3 active sync /dev/sdk1
4 8 192 - spare /dev/sdm
5 8 176 - spare /dev/sdl
As I said, I am getting an error resizing the array.
Would it need to be unmounted to work properly (It is currently mounted under lvm)?
Thank you in advance,
mickg
Signature · 2 lines
View this message in context: http://www.nabble.com/mdadm-RAID5-Grow-tf2386446.html#a6652499 Sent from the linux-raid mailing list archive at Nabble.com.
Quoted 6 lines · On Wednesday October 4, [email protected] wrote:
I have been trying to run:
mdadm --grow/dev/md0--raid-devices=6 --backup-file /backup_raid_grow I get:
mdadm: Need to backup 1280K of critical section..
mdadm:/dev/md0: Cannot get array details from sysfs
It shouldn't do that....
Can you
strace -o /tmp/trace -s 300 mdadm --grow .....
and send a copy of /tmp/trace. I'd like to see how far it gets at reading information from sysfs.
Quoted 3 lines
Would it need to be unmounted to work properly (It is currently mounted under lvm)?
No. unmounting isn't needed and won't make any difference.
NeilBrown
Quoted 15 lines · Neil Brown
Quoted 4 lines · On Wednesday October 4, [email protected] wrote:
I have been trying to run: mdadm --grow
/dev/md0--raid-devices=6 --backup-file /backup_raid_grow I get:
mdadm: Need to backup 1280K of critical section..
mdadm:/dev/md0: Cannot get array details from sysfsIt shouldn't do that.... Can you
strace -o/tmp/trace-s 300 mdadm --grow .....and send a copy of
/tmp/trace. I'd like to see how far it gets at reading information from sysfs.Quoted 2 lines
Would it need to be unmounted to work properly (It is currently mounted under lvm)?
Quoted 7 lines
No. unmounting isn't needed and won't make any difference.
NeilBrown
-
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
strace mdadm --grow /dev/md0 --raid-devices=6 --backup-file /backup_raid_grow
execve("/sbin/mdadm", ["mdadm", "--grow", "/dev/md0", "--raid-devices=6", "--backup-file", "/backup_raid_grow"], [/* 68 vars */]) = 0
brk(0) = 0x8076000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3fstat64(3, {st_mode=S_IFREG|0644, st_size=107351, ...}) = 0mmap2(NULL, 107351, PROT_READ, MAP_PRIVATE, 3, 0) = 0xa7fa8000
close(3) = 0open("/lib/libc.so.6", O_RDONLY) = 3read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300Y\1"..., 512) = 512fstat64(3, {st_mode=S_IFREG|0755, st_size=1404242, ...}) = 0mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xa7fa7000mmap2(NULL, 1176988, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xa7e87000madvise(0xa7e87000, 1176988, MADV_SEQUENTIAL|0x1) = 0mmap2(0xa7fa0000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x118) = 0xa7fa0000mmap2(0xa7fa4000, 9628, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xa7fa4000
close(3) = 0mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xa7e86000
set_thread_area({entry_number:-1 -> 6, base_addr:0xa7e866b0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xa7fa0000, 8192, PROT_READ) = 0
munmap(0xa7fa8000, 107351) = 0
time(NULL) = 1160052126
getpid() = 8461
brk(0) = 0x8076000
brk(0x8097000) = 0x8097000
open("/etc/mdadm.conf", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=154, ...}) = 0
mmap2(NULL, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xa7e66000
read(3, "DEVICE partitions\nARRAY /dev/md0"..., 131072) = 154
read(3, "", 131072) = 0
read(3, "", 131072) = 0
close(3) = 0
munmap(0xa7e66000, 131072) = 0
open("/dev/md0", O_RDWR) = 3fstat64(3, {st_mode=S_IFBLK|0640, st_rdev=makedev(9, 0), ...}) = 0ioctl(3, 0x800c0910, 0xafc4a024) = 0ioctl(3, 0x80480911, 0xafc4a0a8) = 0fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 3), ...}) = 0mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xa7fc2000 write(1, "mdadm: Need to backup 1280K of c"..., 50mdadm: Need to backup 1280K of critical section.. ) = 50fstat64(3, {st_mode=S_IFBLK|0640, st_rdev=makedev(9, 0), ...}) = 0 open("/sys/block/md0/md/component_size", O_RDONLY) = -1 ENOENT (No such file or directory) write(2, "mdadm: /dev/md0: Cannot get arra"..., 53mdadm: /dev/md0: Cannot get array details from sysfs ) = 53exit_group(1) = ?
Process 8461 detached
Quoted 11 lines · On Thursday October 5, [email protected] wrote:
Quoted 10 lines · Neil Brown
Quoted 5 lines · On Wednesday October 4, [email protected] wrote:
I have been trying to run:
mdadm --grow/dev/md0--raid-devices=6 --backup-file /backup_raid_grow I get:
mdadm: Need to backup 1280K of critical section..
mdadm:/dev/md0: Cannot get array details from sysfsIt shouldn't do that....
Can you
strace -o/tmp/trace-s 300 mdadm --grow .....
...
Quoted 1 line
open("/sys/block/md0/md/component_size", O_RDONLY)= -1 ENOENT (No such file or directory)
So it couldn't open .../component_size. That was added prior to the release of 2.6.16, and you are running 2.6.17.13 so the kernel certainly supports it.
Most likely explanation is that /sys isn't mounted.
Do you have a "/sys"?
Is it mounted?
Can you "ls -l /sys/block/md0/md" ??
Maybe you need to
mkdir /sys
mount -t sysfs sysfs /sys
and try again.
NeilBrown
Quoted 19 lines · Neil Brown
Quoted 8 lines · On Thursday October 5, [email protected] wrote:
Quoted 7 lines · Neil Brown
Quoted 4 lines · On Wednesday October 4, [email protected] wrote:
I have been trying to run: mdadm --grow
/dev/md0--raid-devices=6 --backup-file /backup_raid_grow I get:
mdadm: Need to backup 1280K of critical section..
mdadm:/dev/md0: Cannot get array details from sysfsIt shouldn't do that.... Can you
strace -o/tmp/trace-s 300 mdadm --grow ........
Quoted 1 line
open("/sys/block/md0/md/component_size", O_RDONLY)= -1 ENOENT (No such file or directory)So it couldn't open .../component_size. That was added prior to the release of 2.6.16, and you are running 2.6.17.13 so the kernel certainly supports it. Most likely explanation is that /sys isn't mounted. Do you have a "/sys"?
Is it mounted?
Can you "ls -l/sys/block/md0/md" ??
Quoted 6 lines
Maybe you need to
mkdir /sys
mount -t sysfs sysfs /sysand try again.
Worked like a charm!
Thank you!
There is a
sysfs /sys sysfs noauto 0 0
line in /etc/fstab
I am assuming noauto is the culprit?
Should it be made to automount ?
mickg
Quoted 5 lines
NeilBrown
-
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
Quoted 7 lines · On Thursday October 5, [email protected] wrote:
There is a
sysfs /sys sysfs noauto 0 0
line in/etc/fstab
I am assuming noauto is the culprit?Should it be made to automount ?
Maybe. You could try and see...
But I suggest checking with someone who knows about these details in your particular distro.
Maybe there is some init.d script that is meant to "mount /sys" and some appropriate time. Quite possibly it is mean to be mounted *before* other 'auto' filesystems in fstab.
NeilBrown
Quoted 30 lines · mickg
Quoted 19 lines · Neil Brown
Quoted 8 lines · On Thursday October 5, [email protected] wrote:
Quoted 7 lines · Neil Brown
Quoted 5 lines · On Wednesday October 4, [email protected] wrote:
I have been trying to run: mdadm --grow
/dev/md0--raid-devices=6 --backup-file /backup_raid_grow
I get:
mdadm: Need to backup 1280K of critical section..
mdadm:/dev/md0: Cannot get array details from sysfsIt shouldn't do that.... Can you strace -o
/tmp/trace-s 300 mdadm --grow ........
Quoted 1 line
open("/sys/block/md0/md/component_size", O_RDONLY)= -1 ENOENT (No such file or directory)So it couldn't open .../component_size. That was added prior to the release of 2.6.16, and you are running 2.6.17.13 so the kernel certainly supports it. Most likely explanation is that /sys isn't mounted. Do you have a "/sys"?
Is it mounted?
Can you "ls -l/sys/block/md0/md" ??Quoted 6 lines
Maybe you need to
mkdir /sys
mount -t sysfs sysfs /sysand try again.
Worked like a charm!
Thank you!
Quoted 8 lines
There is a
sysfs /sys sysfs noauto 0 0
line in/etc/fstab
I am assuming noauto is the culprit?Should it be made to automount ?
mickg
I will belatedly add that experience shows that /proc and /sys are optional (and can in theory be mounted other places), in practice a lot of software depends on them being present and in the usual place.
Signature · 3 lines
bill davidsen <[email protected]> CTO TMR Associates, Inc Doing interesting things with small computers since 1979