Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
fsck.xfs /dev/md0 does not exist
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
drdreff
n00b
n00b


Joined: 02 Dec 2006
Posts: 17

PostPosted: Tue Feb 08, 2011 5:24 am    Post subject: fsck.xfs /dev/md0 does not exist Reply with quote

First time I've been stumped an not found an answer in the archives...

This just started happening after a long upgrade. My system fails to finish booting ofter fsck fails on my root partition (3 disk raid5). When I give the root password, the root is fully mounted and intact.

I have added TARBALL=yes to rc.conf and re-emerged a dozen packages. I can get up with a liveCD so I can pull logs, but I don't know where to start with this one.

Thanks in advance for the help.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54821
Location: 56N 3W

PostPosted: Tue Feb 08, 2011 3:41 pm    Post subject: Reply with quote

drdreff,

Describe your raid5 setup. Drive and partition names that are donated to the raid.
Post
Code:
mdadm /dev/<partition> -E

Code:
fdisk -l
for one of the raid drives may be useful.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
drdreff
n00b
n00b


Joined: 02 Dec 2006
Posts: 17

PostPosted: Wed Feb 09, 2011 2:59 am    Post subject: Reply with quote

Well now that is interesting...
Code:

livecd / # mdadm /dev/md0 -E
mdadm: No md superblock detected on /dev/md0.
livecd / # cat /proc/mdstat
Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : active raid5 sda2[0] sdc2[2] sdb2[1]
      974566912 blocks level 5, 64k chunk, algorithm 2 [3/3] [UUU]
     
unused devices: <none>
livecd / # fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14       60677   487283580   fd  Linux raid autodetect
/dev/sda3           60678       60801      996030   82  Linux swap / Solaris

Disk /dev/sdc: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1   *           1          13      104391   83  Linux
/dev/sdc2              14       60677   487283580   fd  Linux raid autodetect
/dev/sdc3           60678       60801      996030   82  Linux swap / Solaris

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1          13      104391   83  Linux
/dev/sdb2              14       60677   487283580   fd  Linux raid autodetect
/dev/sdb3           60678       60801      996030   82  Linux swap / Solaris

Disk /dev/md0: 998.0 GB, 997956517888 bytes
2 heads, 4 sectors/track, 243641728 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 65536 bytes / 131072 bytes
Disk identifier: 0x00000000

Disk /dev/md0 doesn't contain a valid partition table
livecd / #


Thanks for taking a look...
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54821
Location: 56N 3W

PostPosted: Wed Feb 09, 2011 11:58 am    Post subject: Reply with quote

drdreff,

Code:
# mdadm /dev/md0 -E
is not correct. The raid superblock is on the underlying partition.
Try
Code:
# mdadm /dev/sda2 -E
for example.

Code:
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14       60677   487283580   fd  Linux raid autodetect
/dev/sda3           60678       60801      996030   82  Linux swap / Solaris
is interesting
If /dev/sda1 or /dev/sda3 are part of raid sets, they will not be auto assembled by the kernel as the partition types are not fd.
Thats not wrong, it means you have to use mdadm in an initrd to assemble any raid set you want to use for root.

When your system is running, what do you have in /proc/mdstat ?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
drdreff
n00b
n00b


Joined: 02 Dec 2006
Posts: 17

PostPosted: Wed Feb 09, 2011 4:04 pm    Post subject: Reply with quote

Here is a more correct mdadm -E
Code:

livecd / # mdadm /dev/sda2 -E
/dev/sda2:
          Magic : a92b4efc
        Version : 0.90.00
           UUID : 8c539f22:a2e6e70f:02bd0424:6f23f4a7
  Creation Time : Sat Nov 15 15:11:47 2008
     Raid Level : raid5
  Used Dev Size : 487283456 (464.71 GiB 498.98 GB)
     Array Size : 974566912 (929.42 GiB 997.96 GB)
   Raid Devices : 3
  Total Devices : 3
Preferred Minor : 0

    Update Time : Tue Feb  8 18:57:54 2011
          State : clean
 Active Devices : 3
Working Devices : 3
 Failed Devices : 0
  Spare Devices : 0
       Checksum : fe89b7ab - correct
         Events : 6461940

         Layout : left-symmetric
     Chunk Size : 64K

      Number   Major   Minor   RaidDevice State
this     0       8        2        0      active sync   /dev/sda2

   0     0       8        2        0      active sync   /dev/sda2
   1     1       8       18        1      active sync   /dev/sdb2
   2     2       8       34        2      active sync   /dev/sdc2

And /proc/mdstat which was above as well:
Code:

livecd / # cat /proc/mdstat
Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : active raid5 sda2[0] sdc2[2] sdb2[1]
      974566912 blocks level 5, 64k chunk, algorithm 2 [3/3] [UUU]
     
unused devices: <none>

The bootable partitions are not part of the raid group. /dev/sda1 is my primary boot, which I periodically mirror to one of the other 3 drives.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54821
Location: 56N 3W

PostPosted: Wed Feb 09, 2011 5:09 pm    Post subject: Reply with quote

drdreff,

Code:
Version : 0.90.00
...
Preferred Minor : 0
shows that this raid set should get /dev/md0, and it supports auto assembly so everything is in order so far.

Try the following on your kernel
Code:
$ grep AUTODE /usr/src/linux/.config
CONFIG_MD_AUTODETECT=y


Once upon a time, raid sets were always auto detected. Now you need a kernel option.

Grub can load from a raid1 mirror set as long as its made with a version 0.9 superblock.
It does this by ignoring that its a mirror.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
drdreff
n00b
n00b


Joined: 02 Dec 2006
Posts: 17

PostPosted: Thu Feb 10, 2011 8:24 am    Post subject: Reply with quote

My kernel already has that set. The RAID is getting reassembled, but fsck can't find the /dev/md0 device to scan. That is the odd part. When I drop to the root shell, the raid is fully assembled and everything is intact, mounted as /.

I thought it was udev, but adding
Code:

rc-update add mdadm boot

did not help, as was proposed in another place.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54821
Location: 56N 3W

PostPosted: Thu Feb 10, 2011 4:45 pm    Post subject: Reply with quote

drdreff,

Adding mdadm to the boot runlevel can't help as md0 must be assembled before root can be mounted to read any init scripts.

emerge wgetpaste if you don't have it and put your kernel .config on a pastebin as it won't fit in a post.
Tell me the URL.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
drdreff
n00b
n00b


Joined: 02 Dec 2006
Posts: 17

PostPosted: Thu Feb 10, 2011 9:55 pm    Post subject: Reply with quote

NeddySeagoon wrote:

Adding mdadm to the boot runlevel can't help as md0 must be assembled before root can be mounted to read any init scripts.


Right, The problem is that my system seems to be assembling the raid and executing init scripts before it fails.
NeddySeagoon wrote:

emerge wgetpaste if you don't have it and put your kernel .config on a pastebin as it won't fit in a post.
Tell me the URL.

I will get that tonight.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum