Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 308197 - Can't zero superblocks with sys-fs/mdadm-3.1.1
Summary: Can't zero superblocks with sys-fs/mdadm-3.1.1
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-07 12:33 UTC by Juergen Rose
Modified: 2010-06-03 01:33 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Juergen Rose 2010-03-07 12:33:43 UTC
I have here a raid md4 with 1.0 superblock consisting of sda3 and sdb3 which I want to convert to 0.9X superblocks. As the first step I wanted to zero the old superblock:

root@sidux:~# cat /proc/mdstat 
Personalities : [raid1] 
...
      
md4 : active raid1 sda3[0] sdb3[1]
      2008112 blocks super 1.0 [2/2] [UU]
 ...
root@sidux:~# mdadm --stop /dev/md4
mdadm: stopped /dev/md4
mdadm: Couldn't open /dev/md4 for write - not zeroing
root@sidux:~# ll /dev/md4
ls: cannot access /dev/md4: No such file or directory
root@sidux:~# ll /dev/md/4
lrwxrwxrwx 1 root root 6 2010-03-07 00:42 /dev/md/4 -> ../md4
root@sidux:~# ll /dev/md
md/  md0  md1  md2  md3  md5  
root@sidux:~# ll -d /dev/md*
drwxr-xr-x 2 root root  100 2010-03-07 00:42 /dev/md
brw-rw---- 1 root disk 9, 0 2010-03-07 00:42 /dev/md0
brw-rw---- 1 root disk 9, 1 2010-03-07 00:42 /dev/md1
brw-rw---- 1 root disk 9, 2 2010-03-07 11:36 /dev/md2
brw-rw---- 1 root disk 9, 3 2010-03-07 00:42 /dev/md3
brw-rw---- 1 root disk 9, 5 2010-03-07 00:42 /dev/md5
root@sidux:~# mknod /dev/md4 b 9 4
root@sidux:~# ll -d /dev/md*
drwxr-xr-x 2 root root  100 2010-03-07 00:42 /dev/md
brw-rw---- 1 root disk 9, 0 2010-03-07 00:42 /dev/md0
brw-rw---- 1 root disk 9, 1 2010-03-07 00:42 /dev/md1
brw-rw---- 1 root disk 9, 2 2010-03-07 11:36 /dev/md2
brw-rw---- 1 root disk 9, 3 2010-03-07 00:42 /dev/md3
brw-r--r-- 1 root root 9, 4 2010-03-07 13:23 /dev/md4
brw-rw---- 1 root disk 9, 5 2010-03-07 00:42 /dev/md5
root@sidux:~# mdadm --zero-superblock /dev/md4
mdadm: Unrecognised md component device - /dev/md4

Any hint is appreciated.


Reproducible: Always
Comment 1 Juergen Rose 2010-03-07 12:40:24 UTC
root@sidux:~# mdadm --zero-superblock /dev/sda3
root@sidux:~# mdadm --zero-superblock /dev/sdb3

root@sidux:~# mdadm --create /dev/md4 --level=1 --raid-devices=2 --metadata=0.90 /dev/sda3 /dev/sdb3
mdadm: /dev/sda3 appears to contain an ext2fs file system
    size=2008112K  mtime=Sun Mar  7 11:35:36 2010
mdadm: /dev/sdb3 appears to contain an ext2fs file system
    size=2008112K  mtime=Sun Mar  7 11:35:36 2010
Continue creating array? y
mdadm: array /dev/md4 started.

seems to work.
Comment 2 Matti Bickel (RETIRED) gentoo-dev 2010-03-23 20:26:08 UTC
Thanks for reporting this.

Assigning to base-system for further investigation.
Comment 3 SpanKY gentoo-dev 2010-06-03 01:33:37 UTC
i think the behavior you show is correct.  dont superblocks exist on individual pieces and not the assembled device ?

the error message you showed:
mdadm: Unrecognised md component device - /dev/md4
and that's because /dev/md# is not a component device

when you used the option on an actual component device, it seems to have worked fine