If the command "dmraid -r" just returns "No RAID disks.", here is what
you should do.

1. Run the comand "dmraid -ay -vvv -d". If errors show up here, that
probably indicates that other problems with your disk exist.

2. Run the command "dmraid -b" and make sure that dmraid can see your
block devices.

3. Run the command "dmraid -rD" and look for the three output files: (
.dat, .offset, .size ). If it generates these files, pack them up, post
them and ask for help. Use the command "tar jcvf yourfilename.tar.bz2
*.{dat,size,offset}"

IF THE ABOVE COMMAND DOESN'T GENERATE ANY FILES, THE REST OF THIS
SOLUTION IS FOR YOU.

Run the command "fdisk -u -l /dev/sda" (if sda is not your disk, change
it) You'll get something like this:

Disk /dev/sda: 160.0 GB, 160000000000 bytes
255 heads, 63 sectors/track, 19452 cylinders, total 312500000 sectors
Units = sectors of 1 * 512 = 512 bytes

Subtract 2000 from the number of total sectors. For example,
312500000 minus 2000 = 312498000

Run the command "dd if=/dev/sda of=outputfile skip=312498000" (changing
sda and skip= to your values) Pack up the outputfile using the tar
command above, post it and ask for help. ALSO include the output from
the fdisk command above. You're done!

ADVANCED SOLUTION

If you'd rather not wait for help in the forums, you can actually solve
this yourself, but it is quite a bit more work. I'm going to explain
whats happening here and what you need to do but from that point its up
to you.

fakeRAID metadata is stored somewhere close to the end of the harddrive,
and is used by dmraid to figure out what your raid setup is. Sometimes
dmraid has trouble finding or understanding the metadata and that's what
is happening to you. So the dd command takes a dump of the last 2000
sectors of your harddrive so that the metadata can be manually located.
Once found, the location (or "offset") is added to dmraid and a new
version of the dmraid package is generated.

If you want to find the metadata yourself, you're first going to need to know 
what you're looking for. If you have a promise controller like I do, you're 
going to be looking for "Promise Technology, Inc.". However, if your fakeRAID 
is from another vendor then you're going to need to look through the dmraid 
source code to see what your manufacturer's header looks like. The metadata 
layouts can be found in the lib/format/ataraid directory of the source code 
bundle:
http://people.redhat.com/~heinzm/sw/dmraid/src/

Next you're going to need to get a readable dump of the end of your hard
drive and start looking for the metadata header. Running the command "dd
if=/dev/sda of=outputfile skip=312498000 | hexdump -C > outputfile.txt"
(substituting your values) will give you a file that you can manually
browse through and eyeball for your header.

Once you've found your header, you're going to have to figure out
exactly which sector it is located on. The way I did this was just by
manually changing the skip= parameter, increasing and decreasing it
until the start of the dump lined up exactly with the start of the
header.

Each time you run the dd command it will tell you how many bytes were 
generated. If your dd output has the metadata header lined up exactly, then the 
number of bytes generated is also the exact offset where the metadata lies 
relative to the end of the disk. You just need to use the sector size from the 
fdisk command to complete the calculation. So if my metadata lined up exactly 
at skip=312499089 and the dd command dumped 466432 bytes then:
312499089 minus ( 466432 divided by sector size of 512k/sector ) = 911 sectors 
from the end of the disk

To fix the problem, add this number to the CONFIGOFFSETS variable in the
same source file you looked at before. So for example in pdc.h:

#define PDC_CONFIGOFFSETS 63,255,256,16,399,675,735,991

Recompile, install the updated package, and check your array status
using "dmraid -r".

If you're confused, don't worry. It will pass. Review this bug thread
and ask for enlightenment.

Good luck!

-- 
Fasttrack Promise not recognized: "No RAID disks"
https://bugs.launchpad.net/bugs/112402
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to