xfs
[Top] [All Lists]

Re: Moving IRIX disk to Linux

To: Dave Sill <ds-linux-xfs@xxxxxxxxxxxxxxxxx>
Subject: Re: Moving IRIX disk to Linux
From: "Nathan Scott" <nathans@xxxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 27 Mar 2001 10:08:42 -0500
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: Steve Lord <lord@sgi.com> "Re: Moving IRIX disk to Linux" (Mar 26, 1:06pm)
References: <200103261906.f2QJ66t21060@jen.americas.sgi.com>
Sender: owner-linux-xfs@xxxxxxxxxxx
hi,

On Mar 26,  1:06pm, Steve Lord wrote:
> Subject: Re: Moving IRIX disk to Linux
> > ...
> > During the boot, the kernel reports:
> > 
> >   Detected scsi disk sda at scsi0, channel 0, id 1, lun 0
> >   SCSI device sda: 91923356 512-byte hdwr sectors (47065 MB)
> >   Partition check:
> >    /dev/scsi/host0/bus0/target1/lun0: unknown partition table
> > 

As Steve pointed out, your kernel doesn't support the SGI
disk partitioning scheme used in IRIX.  The other thing
worth noting is...

> > But fdisk sees the partition table OK:
> > 

fdisk knows what the ondisk format for an SGI disk label
is, so doesn't require any kernel support in order to
print the partition table.  However, ...

> >   Disk /dev/sda (SGI disk label): 28 heads, 328 sectors, 10009 cylinders
> >   Units = cylinders of 9184 * 512 bytes
> >   
> >   ----- partitions -----
> >      Device  Info      Start       End   Sectors  Id  System
> >   /dev/sda8               1     10009  91919260   a  SGI xfs
> >   /dev/sda9               0         0      4096   0  SGI volhdr
> >   /dev/sda11              0     10009  91923356   6  SGI volume
> > 
> > And the only device file associated with the disk is /dev/sda--no
> > sda8, sda9, or sda11.
> > 

Once you have built a kernel with SGI partition support,
you should refer to /proc/partitions to figure out the
device names to use when mounting the filesystem, and not
the fdisk output - the kernel uses a different partition
numbering scheme and the two do not match up (fdisk gets
it even more wrong when devfs is in use, but it is "wrong"
without devfs too).

I haven't had time to try to fix this as yet, but shouldn't
be too hard (just needs someone to understand the algorithm
used in linux/fs/partitions/sgi.c, then make fdisk use the
same algorithm, rather than using the partition IDs from
the label - that code is in the util-linux package -> eg.
util-linux-2.11/fdisk/fdisksgilabel.c).

cheers.

-- 
Nathan

<Prev in Thread] Current Thread [Next in Thread>