Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
I'm trying to get my system RAID1. I'm following the Root Raid Doc How-TO for this. 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 fired her up again, issued mount. md0 was not there in the list. Here's the list:
/dev/hda1 on / type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw, gid=5, mode=620)
tmpfs on /dev/shm type tmpfs (rw)
usbfs on /proc/bus/usb type usbfs (rw)
(perhaps anything unusual in here?)
I can succesfully cd /mnt/md0
If I do ls in here, there are no files.
When I did mount /dev/md0 /mnt/md0 yesterday, it gave nothing so I figured it worked.
When I do the same just now (but it's already mounted right?) it says:
/dev/md0: Invalid argument
mount: you must specify the filesystem type
Well, after each restart or whatever you need to issue the mount command again. A simple cd would never show the contents as it does not mount. If you do mount /dev/md0 /mnt/md0 and then cd /mnt/md0 and ls I am sure all will be fine.
If it is fine, you can add a line in your fstab file. Get back if it does or does not work
When I go back a few steps in the How-To (after undoing some (stopping md0, zero the superblock)) and redo those (reset partition type to fd (linux raid auto), create raid device and format it (ext3)), it seems to go fine. Mounting it and copying hda to it all go fine (or so it seems, judging from all the harddisk activity). I've added a line to fstab to mount md0 at startup and reboot.
The same thing happens after reboot. Mount doesn't show md0 mounted. When I do mount, it says same as in previous post (invalid argument, must specify filytype) but it didn't say that when I mounted it before reboot.
I'm stuck now. Did I declare something wrong? Partitioned it incorrectly? Something else????
This is wierd. Now we are sure that the device is actually /dev/md0 'coz you successfully mounted it the other day. And we also know that you have created a directory named mdo under /mnt.
So I am as perplexed as you are. How about trying the following command
mount /dev/md0 /mnt/floppy
Hi LinuxLala. Sorry for the slow reply. Had a really busy day+evening...
This is strange. I boot the machine, then do mount /dev/md0 and it says this: 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?)
If I do mount /dev/md0 /mnt/floppy it says: /dev/md0: invalid argument mount: you must specify the filesystem type
In other words, the same error as trying to mount it to /mnt/md0!
The bad superblock has got something to do with it perhaps?
This sounds silly. I'll ask at my LUG about this too and then I'll get back, but I believe somethings gone bad during setup. I am sorry to say this but I think you should try this again from scratch.
Right, well I think I'm going to try to redo the whole procedure then: stopping the md0, and start from repartitioning the device (hdc)... If you could ask your LUG (what is LUG?) and get back, that'd be great. Thanks
All cities have their own LUG. Check out the Linux Users Group forum here at LQ so that you can find a LUG in your city. If you can't find one, make a post titled Any LUG in Amsterdam or whatever.
Thanx for explaining LinuxLala.
Well, the waiting is not so bad as I am heading to Belgium for a seminar and won't return until sunday. When I return I will check the forum here ofcourse
AND I will retry the whole routine. From scratch. See if that gives any different results.
Speak to you soon.
back! Linuxlala, 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 5), 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?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.