scsi disk partitioning
Matthew Krenzer
krenzer at wayport.net
Tue Aug 27 01:37:23 CEST 2002
I'm having some problems partitioning a SCSI disk with a config like
this:
disk_config sda
primary /fai-boot 2 rw
primary / 128 rw,errors=remount-ro ;
primary - 128 rw
logical /usr 385-1000 rw
logical /tmp 500-1000 rw
logical /var 732-4000 rw
logical swap 256 rw
logical - 9261 rw
It works fine on IDE drives (same as above w/ hda instaead of sda),
but w/ scsi drives it gives:
FAI: setup harddisks V0.19fai
disks found: sda
parsing config file: /fai/disk_config/NMD
ERROR: too much primary partitions (max 4). All logicals together need
one primary too.
Well, as you can see I have 3 primaries and all my logicals are in one
extended partition. This should be just fine (and is is on an ide
drive!).
After spending way to much time trying to figure out what was wrong w/
the hard disk I decided to see where this error was actually being
generated and here is what I found in setup_harddisks:
if ($command eq "primary") {
($MPPrimary{$extmp} eq "yes") && ($NoMoreLogicals = 1);
$MPPrimary{$mountpoint} = "yes";
$PrimPartNo++;
>>>>($PrimPartNo == 3) && ($disk =~ /^sd/) && ($PrimPartNo++);
($PrimPartNo >4 ) && die "ERROR: Too much primary partitions (max 4).".
" All logicals together need one primary too.\n";
$MountpointPart{$mountpoint} = PartName($disk,$PrimPartNo);
What's going on here? Why is PrimPartNo = 3 special for sd devices?
I check this by changing around the disk file to create 3 primary
partitions and no logical ones and guess what? It tries to create
sda1, 2 and 4 -> no 3. Which, btw, fails to format since sfdisk
really does create a 3 but not a four. (did that make any sense?).
I would have just changed this, but it was so explictly checked that I
thought I must not know something speciall about scsi devices. What
is that check for? Is it really needed? Is it just a remanant of
some previous hackery that has since been fixed? Should I just by IDE
drives :-).
Anyway . . . any insight here would be great.
Thank you
Matthew
More information about the linux-fai
mailing list