LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-20-2005, 10:47 PM   #1
cruiserparts
Member
 
Registered: Jun 2005
Posts: 31

Rep: Reputation: 15
Why can't I mount this md0 raid? (mdadm and software raid)


Hi,

I am now 15hrs into trying to get raid 1 on my new server box. The past two nights were spent trying to get the mdadm procedure to work correctly (who needs sleep). I can't even mount, once, what I have now. I've read just about every manual, how-to, etc that I can find. I'm ready to give up on it. I've assembled the array and I just want to mount it so that I can then modify the fstab file.

Quick history with some linux terminal feedback. Sorry it's long, but I'm not sure what you'd need to see to figure out what's going on.
__________________________
1)mdadm --detail /dev/md0
/dev/md0:
Version : 00.90.01
Creation Time : Wed Jul 20 20:53:48 2005
Raid Level : raid1
Array Size : 156288256 (149.05 GiB 160.04 GB)
Device Size : 156288256 (149.05 GiB 160.04 GB)
Raid Devices : 2
Total Devices : 2
Preferred Minor : 0
Persistence : Superblock is persistent

Update Time : Wed Jul 20 22:41:48 2005
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0

UUID : ef71a76a:0fbb9297:c5c7d992:b68f5dac
Events : 0.4

Number Major Minor RaidDevice State
0 22 1 0 active sync /dev/hdc1
1 22 65 1 active sync /dev/hdd1

2. cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 hdc1[0] hdd1[1]
156288256 blocks [2/2] [UU]

unused devices: <none>

3 In case you were wondering
[root@localhost ~]# mount

/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
/dev/proc on /proc type proc (rw)
/dev/sys on /sys type sysfs (rw)
/dev/devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/hda1 on /boot type ext3 (rw)
/dev/shm on /dev/shm type tmpfs (rw)
/dev/hda2 on /var type ext3 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
automount(pid2210) on /misc type autofs (rw,fd=4,pgrp=2210,minproto=2,maxproto=4)
automount(pid2250) on /net type autofs (rw,fd=4,pgrp=2250,minproto=2,maxproto=4)[root@localhost ~]#

4. And this might help, too. [root@localhost ~]# mdadm --examine /dev/md0
mdadm: No super block found on /dev/md0 (Expected magic a92b4efc, got 00000000)
[root@localhost ~]#
____________________________________________________________
SO, I THINK I HAVE THE md0 raid ready to mount. Here is what happens when I type a few different commands? What am I doing wrong?

[root@localhost ~]# mount /dev/md0 /mnt/alldata
mount: you must specify the filesystem type

SO I TRY EXT3, b/c I paritioned the drives with that.
[root@localhost ~]# mount -t ext3 /dev/md0 /mnt/alldata
mount: wrong fs type, bad option, bad superblock on /dev/md0,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

[root@localhost ~]# mount /dev/md0
mount: can't find /dev/md0 in /etc/fstab or /etc/mtab

Any Ideas about how I can get this to mount. All the how-to's on mdadm are a bit hazy (the old raidtools tutorials seem to be easier for a newbie like me to understand).

All i want is RAID. Help, pretty please
 
Old 07-21-2005, 12:54 AM   #2
michaelsanford
Member
 
Registered: Feb 2005
Location: Ottawa/Montréal
Distribution: Slackware + Darwin (MacOS X)
Posts: 468

Rep: Reputation: 30
Is this a completely new system with no files you need to preserve? If not, ignore this post.

If so, and I assume from the above that you have two hard disks, I discovered through a LOT of trial and error, mostly error, that you can initiate a RAID 0 array like this:

1. Boot to the install CD and run cfdisk.
2. Partition both disks identically and make your non-swap partitions type "Raid Autodetect".
3. Then, when you boot to the installer, you'll be prompted to install on /dev/md0 instead of either of the actual devices.
4. Then install lilo on the MBR of whichever drive is first in the bus (has the lower designation letter). You can try doing the root partition rather than MBR but I found on my system that was all the worked.

This works with Slackware 10.1 and Raidlevel 0. I can only assume it will work with another OS and raid level, but I can't guarantee anything. I also can't remember if I had to do any specific setup of the /etc/raidtab file or not, but since /dev/md0 came about, IIRC, automatically, you will probably have to edit it to get a raid1 array.
 
Old 07-21-2005, 07:04 AM   #3
cruiserparts
Member
 
Registered: Jun 2005
Posts: 31

Original Poster
Rep: Reputation: 15
Hi,

I forgot to mention in my post that this raid system does not need to be bootable and won't house the operating system. It is a two disk array that I am going to use as data and image storage.

I am using the mdadm procedure, which apparently, doesnt' use the raidtab files. Am i correct on this?
 
Old 07-21-2005, 09:00 AM   #4
madluther
Member
 
Registered: Aug 2004
Distribution: LFS
Posts: 350

Rep: Reputation: 31
Quote:
4. And this might help, too. [root@localhost ~]# mdadm --examine /dev/md0
mdadm: No super block found on /dev/md0 (Expected magic a92b4efc, got 00000000)
did you create a filesystem on /dev/md0 ?

something like mkfs -t ext3 /dev/md0
 
Old 07-21-2005, 09:21 AM   #5
cruiserparts
Member
 
Registered: Jun 2005
Posts: 31

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by madluther
did you create a filesystem on /dev/md0 ?

something like mkfs -t ext3 /dev/md0
Madluther,

You are a genious. Yes, that was the fix. Right after I sent my reply to michael, i found a help file that listed that as a possible problem. Added the filesystem and it mounted, no problem. I swear, making a software raid for the first time is not the most intuitive thing. None of the mdadm how-to's mentioned that as a critical part. I will know next time. What was always bothering (confusing) me is that the linux Hardware Profiler changed to 'no filesystem' after I made the raid. Both disks were ext3's before that. I figured that this was just how the raid was reflected by gui and not that the assemble process had removed the filesystems. It seems obvious now, but it doesn't when you don't understand how the system works.

Anyway, thanks to you and michael for the help. Now my mac osx client ins't playing well with my SAMBA services, which were working fine before the raid snafu. Off to fix that. Fingers crossed for a quick and painless resolution.
 
Old 07-21-2005, 01:06 PM   #6
michaelsanford
Member
 
Registered: Feb 2005
Location: Ottawa/Montréal
Distribution: Slackware + Darwin (MacOS X)
Posts: 468

Rep: Reputation: 30
Aah Mac OS X I an help you with that

I should have thought about mkfs...
 
Old 07-22-2005, 08:18 AM   #7
cruiserparts
Member
 
Registered: Jun 2005
Posts: 31

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by michaelsanford
Aah Mac OS X I an help you with that

I should have thought about mkfs...
Great to hear that there are people out there that know linux and osx (ahh, my new dual g5, makes me smile...)

Speaking of that. Know how to fix this problem?

http://discussions.info.apple.com/we...LK.6@.68b510a6
 
Old 07-22-2005, 12:06 PM   #8
michaelsanford
Member
 
Registered: Feb 2005
Location: Ottawa/Montréal
Distribution: Slackware + Darwin (MacOS X)
Posts: 468

Rep: Reputation: 30
Either:

1. Bug in Tiger (which is totally possible).
2. There's a bug in Samba (less likely).

Rick Van Vilet's suggestion that shares must be browseable is good, but IIRC that refers to the fact that you can browse the share itself, not browse to it, analogous to the x bit (in rwx) in Linux. I could be wrong though, I don't commonly use Samba to share files, I use NFS.

Last edited by michaelsanford; 07-22-2005 at 12:08 PM.
 
Old 07-22-2005, 12:54 PM   #9
cruiserparts
Member
 
Registered: Jun 2005
Posts: 31

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by michaelsanford
Either:

1. Bug in Tiger (which is totally possible).
2. There's a bug in Samba (less likely).

Rick Van Vilet's suggestion that shares must be browseable is good, but IIRC that refers to the fact that you can browse the share itself, not browse to it, analogous to the x bit (in rwx) in Linux. I could be wrong though, I don't commonly use Samba to share files, I use NFS.
Good point on the browsing function. I'll tinker with it when I get home.

The linux server build is a replacement for my win2k box, so I no longer have any windows machines. So what are the advantages of going with NFS over Samba?
 
Old 07-22-2005, 03:00 PM   #10
michaelsanford
Member
 
Registered: Feb 2005
Location: Ottawa/Montréal
Distribution: Slackware + Darwin (MacOS X)
Posts: 468

Rep: Reputation: 30
Primarily, SPEED. Samba is drudgingly slow compared to NFS. Also, though Windows file sharing is well-integrated into OS X, I wouldn't really call it well-imlpemented. NFS is more 'native' to Linux so naturally you'd expect it to work a bit better.

NFS is, while complicated to learn to implement on OS X, not really hard to master.

The main difference between 'regular' Linux's and OS X's implementation of NFS is the automounter. NFSd on most plain-vanilla Linux installations doesn't use an automounter, it just mounts the share like a regular mount. OS X on the other hand uses the automounter, which queries the NetInfoDB whenever you try to access the local mountpoint and then actually mounts it, unmounting it later after some timeout.

It's a little silly IMHO but it works fine, you'll probably not notice the mounting delay.

You can check out NFSManager at VersionTracker to figure out how the NetInfo entries should look, then just do it yourself. There are also lots of guides on the net, google 'em.

Last edited by michaelsanford; 07-22-2005 at 03:01 PM.
 
Old 07-24-2005, 03:55 PM   #11
cruiserparts
Member
 
Registered: Jun 2005
Posts: 31

Original Poster
Rep: Reputation: 15
It appears to be a samba bug. I tried to build some test code (that others have said fixes the problem), but had several errors. I figured I would just wait till the new version come out. It sounds like it is almost there. Now I am just loading the sambashares with the "connect to server" function and it is working. I rather deal with that, and forego the build error troubleshooting, until the new version comes out.

Then I may look into NFS.
 
Old 03-25-2006, 11:42 AM   #12
ejianu
LQ Newbie
 
Registered: Mar 2006
Posts: 2

Rep: Reputation: 0
hello everyone
i'm new to linux and to this site
i decided to post here because i found the above info very useful
i use suse9.3 and i want to integrate my NTFS RAID 0 in suse wich i run from another HDD
i don't want to lose any info cause i run windows from RAID. i have 2 NTFS partitions on RAID
and this is what i get:
please help if you can
TIA


linux:~ # mount /dev/md0
mount: wrong fs type, bad option, bad superblock on /dev/md0,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

linux:~ # dmesg | tail
thinkpad: module not supported by Novell, setting U taint flag.
thinkpad: I have registered to handle major: 10 minor: 170.
NET: Registered protocol family 4
ax25: module not supported by Novell, setting U taint flag.
NET: Registered protocol family 3
NET: Registered protocol family 5
md: mdadm(pid 9674) used obsolete MD ioctl, upgrade your software to use new ictls.
NTFS-fs error (device md0): read_ntfs_boot_sector(): Primary boot sector is invalid.
NTFS-fs error (device md0): read_ntfs_boot_sector(): Mount option errors=recover not used. Aborting without trying to recover.
NTFS-fs error (device md0): ntfs_fill_super(): Not an NTFS volume.
linux:~ # mdadm --detail /dev/md0
/dev/md0:
Version : 00.90.01
Creation Time : Sat Mar 25 17:27:27 2006
Raid Level : raid0
Array Size : 240121600 (229.00 GiB 245.88 GB)
Raid Devices : 2
Total Devices : 2
Preferred Minor : 0
Persistence : Superblock is persistent

Update Time : Sat Mar 25 17:27:27 2006
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0

Chunk Size : 4K

UUID : db3d86ea:7f115b54:2b8b4ea4:6e37052a
Events : 0.1

Number Major Minor RaidDevice State
0 8 0 0 active sync /dev/sda
1 8 16 1 active sync /dev/sdb
linux:~ # cat /proc/mdstat
Personalities : [raid0]
md0 : active raid0 sdb[1] sda[0]
240121600 blocks 4k chunks

unused devices: <none>
linux:~ # mount
/dev/hda2 on / type reiserfs (rw,acl,user_xattr)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/fd0 on /media/floppy type subfs (rw,nosuid,nodev,sync,fs=floppyfss,procuid)
linux:~ # mdadm --examine /dev/md0
mdadm: No md superblock detected on /dev/md0.
linux:~ # mount /dev/md0
mount: wrong fs type, bad option, bad superblock on /dev/md0,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
 
Old 03-25-2006, 04:10 PM   #13
cruiserparts
Member
 
Registered: Jun 2005
Posts: 31

Original Poster
Rep: Reputation: 15
So it looks like you are having trouble mounting the raid, which seems to be made correctly.


here is an example. I think you forgot to specify the filetype and where you wanted the drive to mount. check man mount for details on mount command.

mount -t ext3 /dev/md0 /mnt/drivemountshere

or I may be way off base and not know what I'm talking about either.

Last edited by cruiserparts; 03-25-2006 at 04:11 PM.
 
Old 03-27-2006, 02:41 AM   #14
ejianu
LQ Newbie
 
Registered: Mar 2006
Posts: 2

Rep: Reputation: 0
@cruiserparts: i didn't forgot to specify the filetype as i configured the /etc/fstab file

no advance so far some people say that integrating ntfs software raid without losing data on disks cannot be done
another thing that bothers me regarding this problem is that my /proc/filesystems file looks like this and ntfs doesn't seem to appear:

linux:~ # cat /proc/filesystems
nodev sysfs
nodev rootfs
nodev bdev
nodev proc
nodev sockfs
nodev debugfs
nodev pipefs
nodev futexfs
nodev tmpfs
nodev eventpollfs
nodev devpts
ext2
nodev ramfs
nodev hugetlbfs
minix
iso9660
nodev nfs
nodev mqueue
nodev rpc_pipefs
reiserfs
nodev usbfs
nodev subfs


linux:~ # fdisk -l
Warning: ignoring extra data in partition table 5
Warning: ignoring extra data in partition table 5
Warning: ignoring extra data in partition table 5
Warning: invalid flag 0xffff8ac9 of partition table 5 will be corrected by w(rite)

Disk /dev/sda: 122.9 GB, 122942324736 bytes
255 heads, 63 sectors/track, 14946 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 2621 21053151 7 HPFS/NTFS
/dev/sda2 2622 29893 219062340 f W95 Ext'd (LBA)
/dev/sda3 1 1 0 0 Empty
/dev/sda5 ? 111428 212662 813164780 fb Unknown

Disk /dev/sdb: 122.9 GB, 122942324736 bytes
255 heads, 63 sectors/track, 14946 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/sdb doesn't contain a valid partition table

Disk /dev/hda: 30.7 GB, 30750031872 bytes
255 heads, 63 sectors/track, 3738 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 1 128 1028128+ 82 Linux swap / Solaris
/dev/hda2 * 129 3738 28997325 83 Linux

Disk /dev/md0: 245.8 GB, 245884518400 bytes
255 heads, 63 sectors/track, 29893 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/md0p1 * 1 2621 21053151 7 HPFS/NTFS
/dev/md0p2 2622 29893 219062340 f W95 Ext'd (LBA)
/dev/md0p3 1 1 0 0 Empty
/dev/md0p5 2622 29893 219062308+ 7 HPFS/NTFS

linux:~ # uname -a
Linux linux 2.6.11.4-21.11-default #1 Thu Feb 2 20:54:26 UTC 2006 i686 athlon i386 GNU/Linux

does it mean that my kernel was not compiled with the ntfs option enabled?
 
Old 10-02-2006, 05:06 PM   #15
sirmonkey
Member
 
Registered: Dec 2004
Posts: 31

Rep: Reputation: 15
for other people that find this via google like me... i have yet to see any linux(s) support MS "dynamic disk" bla bla software RAID. much like how MS dosen't reginozie a linux or any non MS partition.
 
  


Reply

Tags
fs, md0, mdadm, mount, type


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
RAID5 using mdadm, how to mount /dev/md0? ggduff Linux - Software 4 11-14-2007 01:59 AM
can not mount RAID 0 /dev/md0 dysenteryduke Linux - Software 3 09-15-2005 03:19 PM
help me setup software raid 1 on slackware with mdadm xrado Slackware 2 03-02-2005 05:50 AM
Software RAID with mdadm problems... robbow52 Debian 2 04-19-2004 07:06 PM
mdadm mail with software RAID brucehohl Linux - Software 1 12-20-2003 06:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration