problems with a newly created raid partition
Hi, I'm using opensuse 10.0 and trying to create a raid partition. I'm using yast to create the partition, I can mount it and create files in it. However when I boot the partition cannot be mounted. I have to disable it in /etc/fstab and then I can boot. When I re-enable the raid definition and try to mount it, in /var/log/messages I get : udevd[2329]: get_netlink_msg: no ACTION in payload found, skip event 'umount' kernel: ReiserFS: md0: warning: sh-2006: read_super_block: bread failed (dev md0, block 2, size 4096) kernel: ReiserFS: md0: warning: sh-2006: read_super_block: bread failed (dev md0, block 16, size 4096) kernel: ReiserFS: md0: warning: sh-2021: reiserfs_fill_super: can not find reiserfs on md0 The definition in /etc/fstab is : /dev/md0 /raid0 reiserfs acl,user_xattr 1 2 and /etc/raidtab is : # autogenerated /etc/raidtab by YaST2 raiddev /dev/md0 raid-level 1 nr-raid-disks 2 nr-spare-disks 0 persistent-superblock 1 chunk-size 4 device /dev/hda6 raid-disk 0 device /dev/hdc6 raid-disk 1 Anyone able to give me a pointer or two in the right direction ? Thanks, CPH
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Friday 2005-12-30 at 01:00 -0000, Con Hennessy wrote:
I'm using opensuse 10.0 and trying to create a raid partition. I'm using yast to create the partition, I can mount it and create files in it. However when I boot the partition cannot be mounted. I have to disable it in /etc/fstab and then I can boot. When I re-enable the raid definition and try to mount it, in /var/log/messages I get :
udevd[2329]: get_netlink_msg: no ACTION in payload found, skip event 'umount' kernel: ReiserFS: md0: warning: sh-2006: read_super_block: bread failed (dev md0, block 2, size 4096) kernel: ReiserFS: md0: warning: sh-2006: read_super_block: bread failed (dev md0, block 16, size 4096) kernel: ReiserFS: md0: warning: sh-2021: reiserfs_fill_super: can not find reiserfs on md0
But those are warnings, not errors. What is the error you see when you boot and can not mount? - -- Cheers, Carlos Robinson -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFDtJnrtTMYHG2NR9URAjDSAKCB8KXs79o5xRhwEcTHOwhR+A2TYACeNn5i r+HEVCwGOlgOS2qVeElHBU0= =ygJG -----END PGP SIGNATURE-----
Carlos E. R. wrote:
udevd[2329]: get_netlink_msg: no ACTION in payload found, skip event 'umount' kernel: ReiserFS: md0: warning: sh-2006: read_super_block: bread failed (dev md0, block 2, size 4096) kernel: ReiserFS: md0: warning: sh-2006: read_super_block: bread failed (dev md0, block 16, size 4096) kernel: ReiserFS: md0: warning: sh-2021: reiserfs_fill_super: can not find reiserfs on md0
But those are warnings, not errors. What is the error you see when you boot and can not mount?
Carlos, the last line is probably key: "can not find reiserfs on md0" I'm wondering if /dev/md0 really exists on that system? /Per Jessen, Zürich
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Friday 2005-12-30 at 14:01 +0100, Per Jessen wrote:
warning: sh-2006: read_super_block: bread failed (dev md0, block 16, size 4096) kernel: ReiserFS: md0: warning: sh-2021: reiserfs_fill_super: can not find reiserfs on md0
But those are warnings, not errors. What is the error you see when you boot and can not mount?
Carlos, the last line is probably key: "can not find reiserfs on md0"
I saw it, but it is not conclusive. The thing is, a raid device (md0) can have a partition table and several partitions, or be directly formatted as reiserfs or whatever. For example, I use a raid of the second type, and I see this message: <5>ReiserFS: md0: found reiserfs format "3.5" with standard journal but if it had a partition table, the message would be different. Thus I need more information, the error messages, to decide.
I'm wondering if /dev/md0 really exists on that system?
Could be, too. Ahhh.... crystal balls are soooo expensive! :-p - -- Cheers, Carlos Robinson -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFDtc8mtTMYHG2NR9URAlUZAKCU/AwFS7Vp0zBtuG8a5pclrClUywCgibhL qUohIRlxxhwp7K8uyutCy+s= =AHE2 -----END PGP SIGNATURE-----
On Sat December 31 2005 00:21, Carlos E. R. wrote:
The Friday 2005-12-30 at 14:01 +0100, Per Jessen wrote:
warning: sh-2006: read_super_block: bread failed (dev md0, block 16, size 4096) kernel: ReiserFS: md0: warning: sh-2021: reiserfs_fill_super: can not find reiserfs on md0
But those are warnings, not errors. What is the error you see when you boot and can not mount?
Carlos, the last line is probably key: "can not find reiserfs on md0"
I saw it, but it is not conclusive. The thing is, a raid device (md0) can have a partition table and several partitions, or be directly formatted as reiserfs or whatever.
Yast2 Disk was used to make the RAID disk. It is supposed to be a reiserfs disk but I'm not sure if that means each are done independently or ... ? My partition table (create using "yast2 disk") has : Device Boot Start End Blocks Id System /dev/hda2 2469 3641 9422122+ f W95 Ext'd (LBA) /dev/hda3 * 3642 9964 50789497+ 83 Linux /dev/hda5 2469 2599 1052226 82 Linux swap / Solaris /dev/hda6 2600 3641 8369833+ fd Linux raid autodetect Device Boot Start End Blocks Id System /dev/hdc1 * 1 25 12568+ 83 Linux /dev/hdc2 75001 116336 20833344 5 Extended /dev/hdc3 26 75000 37787400 83 Linux /dev/hdc5 75001 76974 994864+ 82 Linux swap / Solaris /dev/hdc6 76975 93411 8284216+ fd Linux raid autodetect And my /etc/raidtab is : raiddev /dev/md0 raid-level 1 nr-raid-disks 2 nr-spare-disks 0 persistent-superblock 1 chunk-size 4 device /dev/hda6 raid-disk 0 device /dev/hdc6 raid-disk 1
<5>ReiserFS: md0: found reiserfs format "3.5" with standard journal
but if it had a partition table, the message would be different. Thus I need more information, the error messages, to decide.
I'm wondering if /dev/md0 really exists on that system? I'm not 100% sure what I need to do to give you the answer to this. Is the following what you want ? $ ls -l /dev/md0 brw-rw---- 1 root root 9, 0 Jan 1 18:28 /dev/md0
CP Hennessy
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Sunday 2006-01-01 at 19:15 -0000, Con Hennessy wrote:
Yast2 Disk was used to make the RAID disk. It is supposed to be a reiserfs disk but I'm not sure if that means each are done independently or ... ?
My partition table (create using "yast2 disk") has : Device Boot Start End Blocks Id System /dev/hda6 2600 3641 8369833+ fd Linux raid autodetect ... /dev/hdc6 76975 93411 8284216+ fd Linux raid autodetect
And my /etc/raidtab is :
Ok, it seems you have a raid device directly formatted as reiserfs. /dev/md0 /raid0 reiserfs acl,user_xattr 1 2 Can you mount/umount it manually? If there are problems, run a fsck on it while umounted. If the md0 has problems being activated during boot up, it could be that you need to activate some modules in initrd - but as your raid seems to be a data disk not needed for booting up, it doesn't matter, it will activate just a little bit later during boot. Then, if it will not mount automatically during boot, you can configure it "noauto" in fstab, so that you can manually mount it later. I'm just guessing, but it seems you don't have problems with the raid per se, but with the reiserfs on it. Treat it as any other reiserfs problem. - -- Cheers, Carlos Robinson -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFDuHpPtTMYHG2NR9URApZPAKCSFyJXa3ql6Jv/7NOg+9WfKhMSQQCgj5aM h5QCJlQCwIptyrkK/2ESM8Q= =p5oK -----END PGP SIGNATURE-----
On Mon January 2 2006 00:56, Carlos E. R. wrote:
The Sunday 2006-01-01 at 19:15 -0000, Con Hennessy wrote:
Yast2 Disk was used to make the RAID disk. It is supposed to be a reiserfs disk but I'm not sure if that means each are done independently or ... ?
My partition table (create using "yast2 disk") has : Device Boot Start End Blocks Id System /dev/hda6 2600 3641 8369833+ fd Linux raid autodetect
...
/dev/hdc6 76975 93411 8284216+ fd Linux raid autodetect
And my /etc/raidtab is :
Ok, it seems you have a raid device directly formatted as reiserfs.
/dev/md0 /raid0 reiserfs acl,user_xattr 1 2
Can you mount/umount it manually? No, I still get the error : # mount /raid0 mount: wrong fs type, bad option, bad superblock on /dev/md0, missing codepage or other error (could this be the IDE device where you in fact use ide-scsi so that sr0 or sda or so is needed?) In some cases useful info is found in syslog - try dmesg | tail or so And dmesg shows me : ReiserFS: md0: warning: sh-2006: read_super_block: bread failed (dev md0, block 2, size 4096) ReiserFS: md0: warning: sh-2006: read_super_block: bread failed (dev md0, block 16, size 4096) ReiserFS: md0: warning: sh-2021: reiserfs_fill_super: can not find reiserfs on md0
If there are problems, run a fsck on it while umounted. I can do this for both partitions involved in the raid, and no problems were detected. I then tried to mount one of the partitions but it failed : # mkdir /tmp/xx # mount /dev/hda6 /tmp/xx mount: /dev/hda6 already mounted or /tmp/xx busy
If the md0 has problems being activated during boot up, it could be that you need to activate some modules in initrd - but as your raid seems to be a data disk not needed for booting up, it doesn't matter, it will activate just a little bit later during boot.
Then, if it will not mount automatically during boot, you can configure it "noauto" in fstab, so that you can manually mount it later. I also tried this, but the kernel still insists on trying to mount it during boot. The only way I could find to disable that was to comment out the line in fstab :(
I'm just guessing, but it seems you don't have problems with the raid per se, but with the reiserfs on it. Treat it as any other reiserfs problem. I'm really not 100% sure about that. My /proc/mdstat shows me : Personalities : [raid1] md0 : inactive hda6[0] hdc6[1] 16653824 blocks
But when I look at the size of the partitions I see : /dev/hdc6 76975 93411 8284216+ fd Linux raid autodetect and /dev/hda6 2600 3641 8369833+ fd Linux raid autodetect From my understanding of raid, the maximum blocks shown by /proc/mdstat should be 8284216 and not nearly twice that ! Thanks Con hennessy
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Monday 2006-01-02 at 11:20 -0000, Con Hennessy wrote:
Ok, it seems you have a raid device directly formatted as reiserfs.
/dev/md0 /raid0 reiserfs acl,user_xattr 1 2
Can you mount/umount it manually? No, I still get the error : # mount /raid0 mount: wrong fs type, bad option, bad superblock on /dev/md0, missing codepage or other error (could this be the IDE device where you in fact use ide-scsi so that sr0 or sda or so is needed?) In some cases useful info is found in syslog - try dmesg | tail or so And dmesg shows me : ReiserFS: md0: warning: sh-2006: read_super_block: bread failed (dev md0, block 2, size 4096) ReiserFS: md0: warning: sh-2006: read_super_block: bread failed (dev md0, block 16, size 4096) ReiserFS: md0: warning: sh-2021: reiserfs_fill_super: can not find reiserfs on md0
It seems there is no fs. Perhaps you need to recreate the reiserfs on /dev/md0 - I trust you had no data on it yet. [...] No, keep reading.
If there are problems, run a fsck on it while umounted. I can do this for both partitions involved in the raid, and no problems were detected.
No, you have to do that on /dev/md0 directly, not the components. If you do on the components, and something is written, they get out of sync, the array is broken.
I then tried to mount one of the partitions but it failed : # mkdir /tmp/xx # mount /dev/hda6 /tmp/xx mount: /dev/hda6 already mounted or /tmp/xx busy
You can not do that while /dev/md0 is active.
If the md0 has problems being activated during boot up, it could be that you need to activate some modules in initrd - but as your raid seems to be a data disk not needed for booting up, it doesn't matter, it will activate just a little bit later during boot.
Then, if it will not mount automatically during boot, you can configure it "noauto" in fstab, so that you can manually mount it later. I also tried this, but the kernel still insists on trying to mount it during boot. The only way I could find to disable that was to comment out the line in fstab :(
I can understand the kernel activating /dev/md0, but not mounting it. What the kernel would try to do is to fsck it automatically during boot, even if it doesn't want to mount it. If you want to avoid that step, set the last digit to '0' in the fstab line. I think, on a second read of your symptoms, that that is your problem.
I'm just guessing, but it seems you don't have problems with the raid per se, but with the reiserfs on it. Treat it as any other reiserfs problem.
I'm really not 100% sure about that. My /proc/mdstat shows me : Personalities : [raid1] md0 : inactive hda6[0] hdc6[1] 16653824 blocks
Inactive? Try "mdadm --detail /dev/md0", it gives more detailed info. If it is inactive, it can not be fscked, nor mounted. You will have to activate it first, something went wrong.
But when I look at the size of the partitions I see : /dev/hdc6 76975 93411 8284216+ fd Linux raid autodetect and /dev/hda6 2600 3641 8369833+ fd Linux raid autodetect
From my understanding of raid, the maximum blocks shown by /proc/mdstat should be 8284216 and not nearly twice that !
Unless it were raid 0... or different block size, they don't have to be the same. Copy here all messages related to the raid device during boot; for example, the output of: grep -i -e "raid\|md0\|md:" /var/log/boot.msg Mine shows (suse 9.3): <6>md: md driver 0.90.1 MAX_MD_DEVS=256, MD_SB_DISKS=27 <6>md: Autodetecting RAID arrays. <6>md: autorun ... <6>md: considering hdd13 ... <6>md: adding hdd13 ... <6>md: adding hdb11 ... <6>md: adding hda11 ... <6>md: created md0 <6>md: bind<hda11> <6>md: bind<hdb11> <6>md: bind<hdd13> <6>md: running: <hdd13><hdb11><hda11> <6>md: raid1 personality registered as nr 3 <6>raid1: raid set md0 active with 2 out of 2 mirrors <6>md: ... autorun DONE. <5>ReiserFS: md0: found reiserfs format "3.5" with standard journal <5>ReiserFS: md0: using ordered data mode <5>ReiserFS: md0: journal params: device md0, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30 <5>ReiserFS: md0: checking transaction log (md0) <5>ReiserFS: md0: Using r5 hash to sort names <5>ReiserFS: md0: using 3.5.x disk format Have a read at /usr/share/doc/howto/en/txt/Software-RAID-HOWTO.gz - -- Cheers, Carlos Robinson -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFDuXz8tTMYHG2NR9URAkewAJwPbu0FV8Hi0LBecv1Ro9+LJwVKwwCffyaH 282CCOsMGLxq7hcX9mpysQY= =uCqy -----END PGP SIGNATURE-----
On Mon January 2 2006 19:20, Carlos E. R. wrote: [snip]
The only way I could find to disable that was to comment out the line in fstab :(
I can understand the kernel activating /dev/md0, but not mounting it. What the kernel would try to do is to fsck it automatically during boot, even if it doesn't want to mount it. If you want to avoid that step, set the last digit to '0' in the fstab line. I think, on a second read of your symptoms, that that is your problem.
Thanks that helped.
I'm just guessing, but it seems you don't have problems with the raid per se, but with the reiserfs on it. Treat it as any other reiserfs problem.
I'm really not 100% sure about that. My /proc/mdstat shows me : Personalities : [raid1] md0 : inactive hda6[0] hdc6[1] 16653824 blocks
Inactive?
Try "mdadm --detail /dev/md0", it gives more detailed info. If it is inactive, it can not be fscked, nor mounted. You will have to activate it first, something went wrong.
Ok, I manually did : # mdadm --stop /dev/md0 # mkraid --really-force /dev/md0 # mkreiserfs -b 4096 /dev/md0 Which all worked. I was able to mount /dev/md0, edit a file on it, unmount and remount it several times without any problems. However after a reboot it would not mount. /var/log/message contained the following : <5>Kernel command line: root=/dev/hda3 vga=0x31a selinux=0 splash=silent raid=noautodetect <6>md: md driver 0.90.2 MAX_MD_DEVS=256, MD_SB_DISKS=27 <6>md: bitmap version 3.38 <6>md: md0 stopped. <6>md: Autodetecting RAID arrays. <6>md: autorun ... <6>md: considering hdc6 ... <6>md: adding hdc6 ... <6>md: adding hda6 ... <6>md: created md0 <6>md: bind<hda6> <6>md: bind<hdc6> <6>md: running: <hdc6><hda6> <4>md: personality 3 is not loaded! <4>md: do_md_run() returned -22 <6>md: md0 stopped. <6>md: unbind<hdc6> <6>md: export_rdev(hdc6) <6>md: unbind<hda6> <6>md: export_rdev(hda6) <6>md: ... autorun DONE. <6>md: raid1 personality registered as nr 3 mdadm: no devices found for /dev/md0 Also # mdadm --detail /dev/md0 mdadm: md device /dev/md0 does not appear to be active. # mdadm -Q /dev/md0 /dev/md0: is an md device which is not active /dev/md0: is too small to be an md component. Still not getting anywhere ! Con Hennessy
Con Hennessy wrote:
# mdadm -Q /dev/md0 /dev/md0: is an md device which is not active /dev/md0: is too small to be an md component. I expect this is your problem. What size is your raided partitions? This is saying they are too small.
-- Joe Morris Registered Linux user 231871
On Tue January 3 2006 00:13, Joe Morris (NTM) wrote:
Con Hennessy wrote:
# mdadm -Q /dev/md0 /dev/md0: is an md device which is not active /dev/md0: is too small to be an md component.
I expect this is your problem. What size is your raided partitions? This is saying they are too small.
I created the raid from 2 partitions of approx 8.5 GB each. Con Hennessy
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Monday 2006-01-02 at 23:34 -0000, Con Hennessy wrote:
Inactive?
Try "mdadm --detail /dev/md0", it gives more detailed info. If it is inactive, it can not be fscked, nor mounted. You will have to activate it first, something went wrong.
Ok, I manually did : # mdadm --stop /dev/md0 # mkraid --really-force /dev/md0 # mkreiserfs -b 4096 /dev/md0
Which all worked. I was able to mount /dev/md0, edit a file on it, unmount and remount it several times without any problems.
However after a reboot it would not mount. /var/log/message contained the following : <5>Kernel command line: root=/dev/hda3 vga=0x31a selinux=0 splash=silent raid=noautodetect
But this ^^^ option means that the kernel will not autodetect and enable the raid device at start up; from '/usr/src/linux/Documentation/md.txt': | Boot time autodetection of RAID arrays | -------------------------------------- | | When md is compiled into the kernel (not as module), partitions of | type 0xfd are scanned and automatically assembled into RAID arrays. | This autodetection may be suppressed with the kernel parameter | "raid=noautodetect". As of kernel 2.6.9, only drives with a type 0 | superblock can be autodetected and run at boot time. I have 9.3, not 10.0 as you do, but mine works without that option. I'm not sure you need it :-?
<6>md: md driver 0.90.2 MAX_MD_DEVS=256, MD_SB_DISKS=27 <6>md: bitmap version 3.38 <6>md: md0 stopped. <6>md: Autodetecting RAID arrays.
But then I don't understand this.
<6>md: autorun ... <6>md: considering hdc6 ... <6>md: adding hdc6 ... <6>md: adding hda6 ... <6>md: created md0 <6>md: bind<hda6> <6>md: bind<hdc6> <6>md: running: <hdc6><hda6> <4>md: personality 3 is not loaded! <4>md: do_md_run() returned -22 <6>md: md0 stopped. <6>md: unbind<hdc6> <6>md: export_rdev(hdc6) <6>md: unbind<hda6> <6>md: export_rdev(hda6) <6>md: ... autorun DONE. <6>md: raid1 personality registered as nr 3 mdadm: no devices found for /dev/md0
Also # mdadm --detail /dev/md0 mdadm: md device /dev/md0 does not appear to be active.
Perhaps with that option in the kernel line you need to manually activate the raid device later on. I wonder what is the preferred method in SuSE 10.0 :-?
# mdadm -Q /dev/md0 /dev/md0: is an md device which is not active /dev/md0: is too small to be an md component.
Still not getting anywhere ! Con Hennessy
I'm confused. I can not test your system! ;-} - -- Cheers, Carlos Robinson -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFDucz6tTMYHG2NR9URAh2cAJsFv8juFpRj44Xszie3TKyeWiqMIwCfRqI/ YqCrOnqNx01DrWyARpTTYxw= =Kvgf -----END PGP SIGNATURE-----
Con Hennessy wrote:
Hi, I'm using opensuse 10.0 and trying to create a raid partition. I'm using yast to create the partition, I can mount it and create files in it. However when I boot the partition cannot be mounted. I have to disable it in /etc/fstab and then I can boot. When I re-enable the raid definition and try to mount it, in /var/log/messages I get :
So when you create the RAID1 drive and create a filesystem on it, you're able to mount it, and create files on it? But then you reboot, and you're no longer able to mount it? What does "cat /proc/mdstat" say? Have you tried fscking the filesystems before you attempt to mount it? It should happen automatically, but something is obviously wrong in your setup. /Per Jessen, Zürich -- http://www.spamchek.com/ - managed anti-spam and anti-virus solution. Let us analyse your spam- and virus-threat - up to 2 months for free.
participants (4)
-
Carlos E. R.
-
Con Hennessy
-
Joe Morris (NTM)
-
Per Jessen