Cannot reformat RAID array : But can mount ro

ghostcorps

Well-Known Member

Reaction score: 2
Messages: 295

Hi Guys

I recently had my RAID5/0 array (8x500g SATAII) corrupted after a blackout. I can not fsck or fsck_ffs it but I can still mount it Read-only so I have managed to back it up. Most worrying is that I can not seem to get it to reformat.

Sysinstall via the LiveFS looks like it works, but the changes are never written once I exit out.

I tried the fdisk method here but when I try to initialize at step 2 it I get this:

Code:
#fdisk -BI da2
******* Working on device /dev/da2 ******
fdisk: invalid fdisk partition table found
fdisk: Class not found
I even tried deleting and recreating the array in the RAID controller BIOS, that looked like it worked as the partition was removed from /dev but after recreating the partition in sysinstall the previous corrupted fs was still intact!

Google is not bringing up anything useful on these errors. Are there any more forceful methods I can try?
 
OP
G

ghostcorps

Well-Known Member

Reaction score: 2
Messages: 295

I'm glad I'm not the only person who is stumped here! :)

I'm thinking of trying a live Linux flavour just to write zeros of something.. any ideas
 
OP
G

ghostcorps

Well-Known Member

Reaction score: 2
Messages: 295

I have tried Helix and the standard Debian Live CDs but neither have the hptrr drivers so I didn't get very far with those.

I tried using the windows 7 install disk utilities to recreate the partition, but didn't continue the install after this, reasoning that windows repartitioning of the disk would have done something. Now the old partition is still visible, mountable ro only, and it shows that the old data is still there but when I browse to the disk there is nothing visible. At least something has changed but the disk is still unusable.

I'm not sure if I have posted in the wrong forum, if I have-can someone please send me to the right place. Or else make some kind of suggestion?

Thanks :)
 

AndyUKG

Well-Known Member

Reaction score: 22
Messages: 466

Without having an idea of why fdisk won't work etc, something else you could try instead is gpart...
 
OP
G

ghostcorps

Well-Known Member

Reaction score: 2
Messages: 295

I'm having some trouble figuring out what gpart wans me to do. This is what I have done so far:

First I deleted the partition da2p1:

Code:
#gpart delete -i 1 da2
Then Destroyed the Scheme:

Code:
#gpart destroy da2
Then created the scheme again:

Code:
# gpart create -s gpt da2
Up to here everything is sweet...

and gpart shows this:
Code:
#gpart show
=>        34  5859704765  da2  GPT  (2.7T)
          34  5859704765       - free -  (2.7T)

Now I am trying to create the partition and can not quite get it to work...


fdisk reports the geometry as:
Code:
364749/255/63


Using these numbers I have tried:

Code:
# gpart add -b 63 -s 5859692622 -t gpt -i 1 da2
But I get 'Invalid Argument' ... :(


What is wrong with my arguments? It all seems to meet the requirements doesn't it?
 

AndyUKG

Well-Known Member

Reaction score: 22
Messages: 466

I think your "-t" argument is invalid, valid types are shown in the gpart man page. I guess you are going to want freebsd or freebsd-ufs, check out the descriptions in the man page...
 
OP
G

ghostcorps

Well-Known Member

Reaction score: 2
Messages: 295

Thanks again Andy,

Using 'freebsd' or 'freebsd-ufs' creats the partition but it doesn't mount:

Code:
# gpart create -s gpt da2
# gpart add -t freebsd da2
# gpart show

=>        34  5859704765  da2  GPT  (2.7T)
          34  5859704765    1  freebsd  (2.7T)


Code:
bsd# mount /dev/da2s1 /media
mount: /dev/da2s1 : Operation not permitted
Even with -t ufs :(




Thanks again for all your help.
 

AndyUKG

Well-Known Member

Reaction score: 22
Messages: 466

ghostcorps said:
Using 'freebsd' or 'freebsd-ufs' creats the partition but it doesn't mount:

Code:
bsd# mount /dev/da2s1 /media
mount: /dev/da2s1 : Operation not permitted
You still need to format the partition ;) If you're sure you are done recovering data from the RAID then you need to "newfs" the partition you created with gpart.
 
OP
G

ghostcorps

Well-Known Member

Reaction score: 2
Messages: 295

AndyUKG said:
You still need to format the partition ;) If you're sure you are done recovering data from the RAID then you need to "newfs" the partition you created with gpart.
I've tried that too... :(


Code:
newfs -L media -U /dev/da2p1
newfs: /dev/da2p1: failed to open disk for writing
btw: I definitely have root.
 

graudeejs

Son of Beastie

Reaction score: 698
Messages: 4,617

Hi :)
Try formating it from single user mode, or even better from fixit cd/dvd :)
If that doesn't work, then it's hardware problem
 
OP
G

ghostcorps

Well-Known Member

Reaction score: 2
Messages: 295

Hi again Killasmurf :)

As I just posted in the other thread, Highpoint have advised me that their RAID management software isn't compatible with 8.1, so I figure the RAID5 array is not being initialised. I'll see how a JBOD goes, and if not I'll try fixit tonight, and get back to you, I have to go to work now.

Thanks for your persistence guys, I feel a bit better knowing it wasn't all to do with my incompetency's ;)
 
OP
G

ghostcorps

Well-Known Member

Reaction score: 2
Messages: 295

I've ssh'd from work, but the JBOD was a no go either.

I do have a workaround in mind (more of a f#&k around)... since I can still boot off my 7.0 install :stud I will use it to initialize the array then go back into 8.1 and see if I can then build the fs. If not... I guess I will have to downgrade to 8.0. :(


Results to follow tomorrow.
 
OP
G

ghostcorps

Well-Known Member

Reaction score: 2
Messages: 295

Finally!

Thanks for all your help guys.

In the end, I needed to boot into 7.0 to access the RAID management services to initialize the array, and then boot into the 8.1 Live cd to build the partition with gpart and the filesystem with newfs.

Hopefully in a few months this won't be necessary, once highpoint update the software.


Thanks again
 

danbi

Active Member

Reaction score: 30
Messages: 227

Just curious, wouldn't the RAID BIOS let you initialize the array? Or perhaps has an option for 'quick initialize' or such -- so to avoid relying on any OS tools that have to interact with the controller.
 
OP
G

ghostcorps

Well-Known Member

Reaction score: 2
Messages: 295

Hi Danbi

That would make sense... and the RAID BIOS does have a 'background initialize' option, which I was using thinking that that was all that was needed to finalise the creation of an array. However, during the above adventure I reread the documentation and noted that it said that the array must be initialized within the RAID management software, the background initialization option in the BIOS simply sets it up so that the management software initializes the array upon the first boot. Without the compatible software, the initialization was never actually started.
 
Top