DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
All the steps seem to go nicely until step 4.4 Edit /etc/fstab so that you mount your new RAID partition on boot up. I've added the suggested line in /etc/fstab and rebooted. However, when I run mount it does NOT give a line showing /dev/md0 is mounted on /mnt/md0. What gives?
I've gone back a few steps, stopping md0 and recreated partition type signatures, created the raid device and formatted it. Created mount point, mounted md0. Then copied my root system (on hda1) to md0, edited fstab again and rebooted. Again, no line showing md0 is mounted when issuing "mount".
Does this have to do with the FAM (File Alteration Monitor) I am running? (Tripwire I think the package is called?) What could be wrong?
I wouldn't trust to the output of mount. It gathers it from /etc/mtab and the root partition might have been readonly at the moment those drives are mounted.
Check if you see that mount in /proc/mounts. If not, can you manually mount that,
eg. "mount /mnt/md0". If not, what is the error?
Thanks for your reply Toni T. Here are some results of your suggestions:
ls /proc shows a link mounts to self/mounts
mount /dev/md0 gives:
Code:
EXT3-fs: unable to read superblock
mount: wrong fs type, bad option, bad superblock on /dev/md0, or too many mounted file systems
(could this be the IDE device where you in fact use ide-scsi so that sr0 or sda or so is needed?)
I am puzzled, as I thought I had manually cleared the superblock before formatting it ext3?!
Your suggestions are very welcome!
For your information: I made a similar post in the General forums. Go here to read it.
Hi ToniT, I have tried it again from scratch... Steps 1-9 worked ok, but I listed them so you can see what I have done exactly. It went wrong at 10... This time I have zero-ed the superblock before creating the raid md0. In the appendix XII of the how-to recommends doing this always before creating a raid (no word of this in the step-by-step how-to (before 3.3)). Let's see if this makes a difference... So here's what I've been doing:
1. cat /proc/mdstat shows that raid is built into my kernel (its got different raid personalities)
2. I copied the partitions from hda to hdc: sfdisk -d /dev/hda | sfdisk /dev/hdc
3. Using cfdisk /dev/hdc I changed the partition type to Linux Raid autodetect.
4. Rebooted and rechecked partition type (ok).
5. before creating the raid device, I zero-ed the superblock: mdadm --zero-superblock /dev/hdc1
6. Created the raid device: mdadm --create /dev/md0 --level=1 --raid-disks=2 missing /dev/hdc1
7. Formatted the raid device. It autodetected it as ext2, but I want it ext3, so: mkfs.ext3 /dev/md0
8. Created a mount point: mkdir /mnt/md0
9. Mounted the raid device: mount /dev/md0 /mnt/md0
So far so good, it mounts! Hurrah!
cat /proc/mounts lists a line "/dev/md0 /mnt/md0 ext3 rw 0 0"
10. Now, before copying all the data, I added "/dev/md0 /mnt/md0 ext3 rw 0 0" to fstab. To check if md0 gets mounted after reboot.
This is where things go wrong:
when I reboot it does NOT mount! In /var/log/dmesg I find a (disturbing) line "EXT3-fs: unable to read superblock". This I do not understand. When I formatted md0 to ext3 (see step 7), it wrote all superblocks nicely and started the fs without problems. Now cat /proc/mdstat doesn't show any md0 devices running.
And we're back at the point of all the errors mentioned above. Any idea what could be wrong?
ok, what seems to be the problem is that MD device doesn't get running automaticly.
What happens when you run command "mdrun"?
Do you get /dev/md0 manually running by using mdstat with --assemble parameter?
If later, but not first. There is some problem with mdrun script.
Also, have you changed the type of /dev/hda1 to raid autodetect? If not, you have to explicityl help mdrun (eg. by using some conffile of mdadm) to make it scan also that device.
Thanks for responding so quickly. Took me a while before I noticed, because it didn't show in my User CP... Thought I was subcribed to my own thread but guess I was wrong? (How do I subscribe to this thread?)
Anyway: mdrun gave this:
md: md0 stopped
md: could not lock hda1
md: md_import_device returned -16
mdadm: failed to add /dev/hda1 to /dev/md0: device or resource busy
md: bug in file drivers/md/md.c, line 1513
md: o **********************************
md: Complete raid state printout
md: o **********************************
md0:
md: o **********************************
mdadm: failed to RUN_ARRAY /dev/md0: invalid argument
About mdstat, what would I have to issue specifically?
The partition-type is set to (fd): Linux Raid autodetect
I´m new to mdadm, mdrun, mdstat. I apologise for my ignorance here.
Quick note: mdadm --assemble --scan gives "mdadm: no arrays found in config file"
The suggested config file (according to the man pages) /etc/mdadm/mdadm.conf does not exist.
There is however a /etc/mdadm/debian.conf, here´s its contents:
START_DEAMON=true
MAIL_TO="root"
AUTOSTART=false
mdadm --assemble /dev/md0 --run /dev/hdc1
md: md0 stopped.
mdadm: no RAID superblock on /dev/hdc1
mdadm: /dev/hdc1 has no superblock - assembly aborted
Now where have we seen that before?
post#8:"...In /var/log/dmesg I find a (disturbing) line "EXT3-fs: unable to read superblock". This I do not understand. When I formatted md0 to ext3 (see step 7), it wrote all superblocks nicely and started the fs without problems....
In post #8, the EXT3 driver can't read the superblock of the filesystem[A block that describes information like: fs label, location of root directory, size of the filesystem, block-count, location of journal, etc..] (inside the md0 "partition").
In your last post, the problem is, that the md driver can't read/locate superblock of the raid-device [A block that describes information like: How many partitions are in this raid device, which one is this, what are sizes and id:s of other partitions] (in the start of /dev/hdc1).
But now I don't understand what is exactly wrong with my system. Why can't I get a raid-array running after reboot?
When I follow the steps in the How-To I mentioned, it seems to start and mount md0 fine. Then when I reboot, things go wrong and I get those error messages. I don't understand where the problem lies precisely. Can you tell me, please?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.