Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I used a Software-RAID I and want to access the data without RAID now.

After

mdadm --fail /dev/md0 /dev/sda1
mdadm --remove /dev/md0 /dev/sda1

I tried

mount -t ext4 /dev/sda1 /mnt

but dmesg says

[ 5620.788838] EXT4-fs (sdb1): ext4_check_descriptors: Block bitmap for group 1 not in group (block 0)!
[ 5620.788841] EXT4-fs (sdb1): group descriptors corrupted!

Isn't it possible to convert a RAID-partition to non-RAID? Do I have to copy all files to another partition, delete the RAID partition and create a new file system?

share|improve this question
    
That would be enough for a layout where the metadata is at the end of the volume, but as Stéphane explains you seem to have the metadata at the beginning, which makes this more difficult. Background (and other way round). –  Gilles Dec 3 '12 at 21:50
    
mdadm lets you work with a number of RAID configurations, but if I'm not mistaken only RAID 1 devices are usable outside of the array. Which RAID configuration/level is /dev/md0 set up with? –  Michael Kjörling Dec 3 '12 at 21:59
    
@MichaelKjörling, It says "RAID 1" above. –  Stéphane Chazelas Dec 3 '12 at 23:19
1  
@StephaneChazelas Oops. My mistake. I read it as "Software-RAID, I [me]" not "software RAID-1". –  Michael Kjörling Dec 4 '12 at 8:49

1 Answer 1

up vote 3 down vote accepted

There's metadata at the start of the partition. If you do a

mdadm -E /dev/sda1

you'll see where the data starts (Data Offset). That will be where your FS starts. You could use fdisk (for MBR-type partitioning) or gdisk (for GPT), to move the start of sda1 to the location of that Data Offset.

For instance, if it says:

Data Offset : 16384 sectors

Run fdisk -u, print the current partition table with p, note the start and end of the partition, delete it and recreate it with the first sector being the old one plus 16384.

share|improve this answer
    
Thank you for your answer. This is exactly what I was looking for. –  chris Dec 5 '12 at 18:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.