Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Raid 0, Dmsetup and sfdisk error
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
Coolface
n00b
n00b


Joined: 20 Dec 2002
Posts: 10

PostPosted: Sat Jan 29, 2005 1:23 pm    Post subject: Raid 0, Dmsetup and sfdisk error Reply with quote

Hi, i just tried to install Gentoo Linux on my Via VT8237 Raid Harddisks. I followed the instructions of the Howtos in this Forum, but when i try to access my hd with sfdisk, i get the following error:

Quote:

root# echo "0 468883296 striped 2 64 /dev/sda 0 /dev/sdb 0" | dmsetup create rd
root# sfdisk -l -uS -q /dev/mapper/rd
Disk /dev/mapper/rd: cannot get geometry

Disk /dev/mapper/rd: 0 cylinders, 0 heads, 0 sectors/track

sfdisk: seek error: wanted 0x0000000000000000, got 0x0000000000000000
/dev/mapper/rd: unrecognized partition table type
No partitions found


I have one Windows XP Partition, a logical Partition with 3 NTFS Partitions, a boot, and a root partition on it.
It might be the logical partition, because fdisk can access the hd, but cannot see the Partitions, which are in the Logical.

It would be quite nice, if anyone knows, why this error occurs...
I'm going crazy here :(

THX, Coolface
Back to top
View user's profile Send private message
frankjr
n00b
n00b


Joined: 13 Sep 2002
Posts: 55

PostPosted: Sun Jan 30, 2005 2:23 am    Post subject: Reply with quote

Are you sure you got the sector size (or whatever it is) right? Mine shows up as 64k in the vt8237 setup, so you should double the number like with my setup:

Code:
echo "0 468883296 striped 2 128 /dev/sda 0 /dev/sdb 0" | /sbin/dmsetup create raid


You'd only use 64 if you have it set up as 32k in the raid controller setup.

One more thing I'd like to add when playing around with the partitions, never partition the disks under Linux, and be careful when you format the partitions, for example my cfdisk -l -uS shows this:

Code:
Disk /dev/mapper/raid: cannot get geometry

Disk /dev/mapper/raid: 0 cylinders, 0 heads, 0 sectors/track
Warning: The partition table looks like it was made
  for C/H/S=*/255/63 (instead of 0/0/0).
For this listing I'll assume that geometry.
Units = sectors of 512 bytes, counting from 0

   Device Boot    Start       End   #sectors  Id  System
/dev/mapper/raid1   *        63     16064      16002   7  HPFS/NTFS
/dev/mapper/raid2         16065    112454      96390  83  Linux
/dev/mapper/raid3        112455 468857024  468744570   f  W95 Ext'd (LBA)
/dev/mapper/raid4             0         -          0   0  Empty
/dev/mapper/raid5        112518   2216969    2104452   6  FAT16
/dev/mapper/raid6       2217033  12723479   10506447   b  W95 FAT32
/dev/mapper/raid7      12723543 240878609  228155067   e  W95 FAT16 (LBA)
/dev/mapper/raid8     240878673 468857024  227978352   7  HPFS/NTFS
                start: (c,h,s) expected (1023,254,63) found (1023,1,1)


Here, I actually do have partitions 1, 2, 5, 6, 7, and 8, but not 3. If I decided to do a mke2fs /dev/mapper/raid3 (after you set them all up manually with dmsetup), then it would wipe out the entire extended partition (that contains 5 through 8). You can tell from the numbers that 3 covers all of the extended partition data. Extended partitions start with 5 and go up, so if you have 3 primary partitions, for example, don't be touching 4, or if you have 1, don't be touching 2, etc.
Back to top
View user's profile Send private message
bitbasher
n00b
n00b


Joined: 15 Mar 2005
Posts: 1

PostPosted: Tue Mar 15, 2005 12:20 am    Post subject: sfdisk seek error Reply with quote

I had the same problem on a small 40G usb drive. I found an answer at the following link after I found that I could fix the error by modifying the source for the function llseek in sfdisk.c by changing the variables "in" and "out" to volatile. And rebuilding.

http://lfs.mirror.shizu-net.jp/patches/downloads/util-linux/util-linux-2.12e-sfdisk-1.patch

I have not had a chance to check this fix but I expect it will also fix the problem.
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