<br><br><div class="gmail_quote">On Sat, Feb 7, 2009 at 3:10 PM, Eric Sandeen <span dir="ltr">&lt;<a href="mailto:sandeen@sandeen.net">sandeen@sandeen.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<a href="mailto:kevin.dual@gmail.com">kevin.dual@gmail.com</a> wrote:<br>
&gt; I&#39;m having a very similar problem... My 1TB RAID-5 array formatted with XFS assembles, but refuses to mount:<br>
<br>
...<br>
<br>
&gt; $ cat /proc/mdstat<br>
&gt; Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]<br>
&gt; md0 : active raid5 sdd1[2] sdc1[1] sdb1[0]<br>
&gt; &nbsp; &nbsp; &nbsp; 976767872 blocks level 5, 64k chunk, algorithm 2 [3/3] [UUU]<br>
&gt;<br>
&gt; unused devices: &lt;none&gt;<br>
<br>
...<br>
<br>
<br>
&gt; --------------------------------------------------<br>
&gt; $ sudo xfs_check /dev/md0<br>
&gt; xfs_check: unexpected XFS SB magic number 0x110812af<br>
&gt; cache_node_purge: refcount was 1, not zero (node=0x1300220)<br>
&gt; xfs_check: cannot read root inode (22)<br>
&gt; cache_node_purge: refcount was 1, not zero (node=0x1300440)<br>
&gt; xfs_check: cannot read realtime bitmap inode (22)<br>
&gt; Segmentation fault<br>
<br>
hm, ok...<br>
<br>
but below you don&#39;t expect each component drive to be a consistent xfs<br>
fs do you? &nbsp;It&#39;s not a mirror :)</blockquote><div><br><br>Actually, I did not expect each component drive to be a consistent xfs file system, I was just trying to gather as much information as possible.&nbsp; I&#39;m glad I did because it was running &quot;sudo dd if=/dev/sd* bs=512 count=128 iflag=direct | hexdump -C | grep XFSB&quot; on all my drives that showed which drive had the xfs info on it and allowed you to suggest that I try creating the array with that drive first:<br>
<br>$ sudo mdadm --create /dev/md0 --level=5 --raid-devices=3 --assume-clean /dev/sdc1 /dev/sdd1 /dev/sdb1<br>mdadm: /dev/sdc1 appears to be part of a raid array:<br>&nbsp;&nbsp;&nbsp; level=raid5 devices=3 ctime=Fri Feb&nbsp; 6 18:01:59 2009<br>
mdadm: /dev/sdd1 appears to be part of a raid array:<br>&nbsp;&nbsp;&nbsp; level=raid5 devices=3 ctime=Fri Feb&nbsp; 6 18:01:59 2009<br>mdadm: /dev/sdb1 appears to be part of a raid array:<br>&nbsp;&nbsp;&nbsp; level=raid5 devices=3 ctime=Fri Feb&nbsp; 6 18:01:59 2009<br>
Continue creating array? y<br>mdadm: array /dev/md0 started.<br><br>$ sudo mount -t xfs /dev/md0 test<br>$ cd test<br>/test$ ls<br>ALL MY DATA!<br><br>So it seems that creating a RAID-5 array in the wrong order
and allowing it to sync does not destroy the data, which is very to
know&nbsp; ;P<br><br>Thank you very much for your help!<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
<br>
&gt; $ sudo xfs_check /dev/sdb1<br>
&gt; xfs_check: unexpected XFS SB magic number 0x110812af<br>
&gt; cache_node_purge: refcount was 1, not zero (node=0x2213220)<br>
&gt; xfs_check: cannot read root inode (22)<br>
&gt; bad superblock magic number 110812af, giving up<br>
&gt;<br>
&gt; $ sudo xfs_check /dev/sdc1<br>
&gt; cache_node_purge: refcount was 1, not zero (node=0x2377220)<br>
&gt; xfs_check: cannot read root inode (22)<br>
&gt; cache_node_purge: refcount was 1, not zero (node=0x2377440)<br>
&gt; xfs_check: cannot read realtime bitmap inode (22)<br>
&gt; Segmentation fault<br>
&gt;<br>
&gt; $ sudo xfs_check /dev/sdd1<br>
&gt; xfs_check: unexpected XFS SB magic number 0x494e41ed<br>
&gt; xfs_check: size check failed<br>
&gt; xfs_check: read failed: Invalid argument<br>
&gt; xfs_check: data size check failed<br>
&gt; cache_node_purge: refcount was 1, not zero (node=0x24f1c20)<br>
&gt; xfs_check: cannot read root inode (22)<br>
&gt; cache_node_purge: refcount was 1, not zero (node=0x24f1d70)<br>
&gt; xfs_check: cannot read realtime bitmap inode (22)<br>
&gt; Segmentation fault<br>
&gt;<br>
<br>
none of the above surprises me<br>
<br>
&gt; --------------------------------------------------<br>
&gt; $ sudo xfs_repair -n /dev/md0<br>
&gt; Phase 1 - find and verify superblock...<br>
&gt; bad primary superblock - bad magic number !!!<br>
&gt;<br>
&gt; attempting to find secondary superblock...<br>
&gt; ...etc...etc...fail fail fail<br>
<br>
Ok so above is the real problem.<br>
<br>
again below is not expected to work!<br>
<br>
&gt; $ sudo xfs_repair -n /dev/sdb1<br>
&gt; Phase 1 - find and verify superblock...<br>
&gt; bad primary superblock - bad magic number !!!<br>
&gt;<br>
&gt; attempting to find secondary superblock...<br>
&gt; ...etc...etc...fail fail fail<br>
&gt;<br>
&gt; $ sudo xfs_repair -n /dev/sdc1<br>
&gt; Phase 1 - find and verify superblock...<br>
&gt; error reading superblock 17 -- seek to offset 531361234944 failed<br>
&gt; couldn&#39;t verify primary superblock - bad magic number !!!<br>
&gt;<br>
&gt; attempting to find secondary superblock...<br>
&gt; ...found candidate secondary superblock...<br>
&gt; error reading superblock 17 -- seek to offset 531361234944 failed<br>
&gt; unable to verify superblock, continuing...<br>
&gt; ...etc...etc...fail fail fail<br>
&gt;<br>
&gt; you know the routine...<br>
&gt;<br>
&gt;<br>
&gt; --------------------------------------------------<br>
&gt; $ sudo dd if=/dev/md0 bs=512 count=128 iflag=direct | hexdump -C | grep XFSB<br>
&gt; 128+0 records in<br>
&gt; 128+0 records out<br>
&gt; 65536 bytes (66 kB) copied, 0.0257556 s, 2.5 MB/s<br>
&gt;<br>
&gt; $ sudo dd if=/dev/sdb bs=512 count=128 iflag=direct | hexdump -C | grep XFSB<br>
&gt; 128+0 records in<br>
&gt; 128+0 records out<br>
&gt; 65536 bytes (66 kB) copied, 0.0352348 s, 1.9 MB/s<br>
&gt;<br>
&gt; $ sudo dd if=/dev/sdc bs=512 count=128 iflag=direct | hexdump -C | grep XFSB<br>
&gt; 00007e00 &nbsp;58 46 53 42 00 00 10 00 &nbsp;00 00 00 00 0e 8e 12 00 &nbsp;|XFSB............|<br>
<br>
ibase=16<br>
7E00<br>
32256, or 63x512<br>
<br>
and sdc was:<br>
<br>
&gt; Model: ATA ST3500641AS (scsi)<br>
&gt; Disk /dev/sdc: 500GB<br>
&gt; Sector size (logical/physical): 512B/512B<br>
&gt; Partition Table: msdos<br>
&gt;<br>
&gt; Number &nbsp;Start &nbsp; End &nbsp; &nbsp;Size &nbsp; Type &nbsp; &nbsp; File system &nbsp;Flags<br>
&gt; &nbsp;1 &nbsp; &nbsp; &nbsp;32.3kB &nbsp;500GB &nbsp;500GB &nbsp;primary &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; raid<br>
<br>
IOW the normal msdos 63 sectors.<br>
<br>
&gt; 128+0 records in<br>
&gt; 128+0 records out<br>
&gt; 65536 bytes (66 kB) copied, 0.0386271 s, 1.7 MB/s<br>
&gt;<br>
&gt; $ sudo dd if=/dev/sdd bs=512 count=128 iflag=direct | hexdump -C | grep XFSB<br>
&gt; 128+0 records in<br>
&gt; 128+0 records out<br>
&gt; 65536 bytes (66 kB) copied, 0.0928554 s, 706 kB/s<br>
&gt;<br>
&gt; Looks like /dev/sdc is the only one with any recognizable superblock data on it.<br>
&gt; --------------------------------------------------<br>
&gt;<br>
&gt; Now what should I do with all this information? &nbsp;The array assembles fine, but the XFS volume seems to be screwed up somehow. &nbsp;Is there any way the array could have put itself together wrong then re-synced and corrupted all my data?<br>

<br>
It seems like maybe it assembled out of order, as if sdc1 should be the<br>
first drive, since it has the magic at the right place.<br>
<br>
Dunno how much damage could have been done, or if you can just try to<br>
fix the assembly perhaps...?<br>
<font color="#888888"><br>
-Eric<br>
<br>
</font></blockquote></div><br>