Skip to contentSkip to conversation

Mounting IRIX disk on Linux

DISCUSSION Mogens Kjaer 4 participants 9 messages Sep 11, 2006 – Sep 15, 2006 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

When I try to mount a disk from our SGI Origin 200
machine under Linux (Fedora Core 5), I get the following error message:

# mount /dev/sda1 /mnt/sgi
mount: Function not implemented

The partitions are found during boot:

...
SCSI device sda: 143374738 512-byte hdwr sectors (73408 MB)
sda: Write Protect is off
sda: Mode Sense: 9f 00 10 08
SCSI device sda: drive cache: write back w/ FUA SCSI device sda: 143374738 512-byte hdwr sectors (73408 MB)
sda: Write Protect is off
sda: Mode Sense: 9f 00 10 08
SCSI device sda: drive cache: write back w/ FUA
sda: sda1 sda2 sda9 sda11
...

# fdisk -l /dev/sda

Disk /dev/sda (SGI disk label): 255 heads, 63 sectors, 8924 cylinders Units = cylinders of 16065 * 512 bytes

----- partitions -----

Pt#    Device  Info     Start       End   Sectors  Id  System
 1: /dev/sda1  boot        17      8924 143108498   a  SGI xfs
 2: /dev/sda2  swap         1        16    262144   3  SGI raw
 9: /dev/sda3               0         0      4096   0  SGI volhdr
11: /dev/sda4               0      8924 143374738   6  SGI volume

----- Bootinfo -----
Bootfile: /unix
----- Directory Entries -----

The only thing that gets logged during the mount is:

SGI XFS with ACLs, security attributes, large block numbers, no debug enabled
SGI XFS Quota Management subsystem

How do I determine which of the requirements
listed in:

http://oss.sgi.com/projects/xfs/faq.html#useirixxfs

that hasn't been fulfilled?

Mogens

Signature · 4 lines
Mogens Kjaer, Carlsberg A/S, Computer Department
Gamle Carlsberg Vej 10, DK-2500 Valby, Denmark
Phone: +45 33 27 53 25, Fax: +45 33 27 47 08
Email: [email protected] Homepage: http://www.crc.dk
#1 lore raw

Was this disk cleanly unmounted from the SGI box?

If the log is dirty linux won't be able to mount it since it will be in the wrong endian format (well assuming you are using a little endian linux box)

If you can cleanly mount and unmount on the sgi box if that is not possible run xfs_repair -L to clear the log. But not that will potentially loose important file system info.

Quoted 49 lines · Mogens Kjaer

When I try to mount a disk from our SGI Origin 200
machine under Linux (Fedora Core 5), I get the following error message:

# mount /dev/sda1 /mnt/sgi
mount: Function not implemented

The partitions are found during boot:

...
SCSI device sda: 143374738 512-byte hdwr sectors (73408 MB)
sda: Write Protect is off
sda: Mode Sense: 9f 00 10 08
SCSI device sda: drive cache: write back w/ FUA SCSI device sda: 143374738 512-byte hdwr sectors (73408 MB)
sda: Write Protect is off
sda: Mode Sense: 9f 00 10 08
SCSI device sda: drive cache: write back w/ FUA
sda: sda1 sda2 sda9 sda11
...

# fdisk -l /dev/sda

Disk /dev/sda (SGI disk label): 255 heads, 63 sectors, 8924 cylinders Units = cylinders of 16065 * 512 bytes

----- partitions -----

Pt#    Device  Info     Start       End   Sectors  Id  System
 1: /dev/sda1  boot        17      8924 143108498   a  SGI xfs
 2: /dev/sda2  swap         1        16    262144   3  SGI raw
 9: /dev/sda3               0         0      4096   0  SGI volhdr
11: /dev/sda4               0      8924 143374738   6  SGI volume

----- Bootinfo -----
Bootfile: /unix
----- Directory Entries -----

The only thing that gets logged during the mount is:

SGI XFS with ACLs, security attributes, large block numbers, no debug enabled
SGI XFS Quota Management subsystem

How do I determine which of the requirements
listed in:

http://oss.sgi.com/projects/xfs/faq.html#useirixxfs

that hasn't been fulfilled?

Mogens

#2 lore raw
Quoted 10 lines · Russell Cattelan

Was this disk cleanly unmounted from the SGI box?

If the log is dirty linux won't be able to mount it since it will be in the wrong endian format (well assuming you are using a little endian linux box)

If you can cleanly mount and unmount on the sgi box if that is not possible run xfs_repair -L to clear the log. But not that will potentially loose important file system info.

Some of the disks are dirty, some are clean (the Origin boots, but halt during the boot phase because of multiple fan failure - a little strange as all fans are running).

I could mount one of the disks after the xfs_repair -L trick, but it gave massive file system corruption.

Not a big deal, we have backups of everything.

Mogens

Signature · 4 lines
Mogens Kjaer, Carlsberg A/S, Computer Department
Gamle Carlsberg Vej 10, DK-2500 Valby, Denmark
Phone: +45 33 27 53 25, Fax: +45 33 27 47 08
Email: [email protected] Homepage: http://www.crc.dk
#4 lore raw
In reply to a message not in the archive
Quoted 5 lines · [email protected] wrote:
Quoted 3 lines · Mogens Kjaer

How do I determine which of the requirements
listed in:

Quoted 8 lines
Quoted 3 lines

http://oss.sgi.com/projects/xfs/faq.html#useirixxfs

that hasn't been fulfilled?

# xfs_db /dev/<device>
xfs_db> sb 0
xfs_db> p

This gives me:

magicnum = 0x58465342
blocksize = 4096
dblocks = 17888562
rblocks = 0
rextents = 0
uuid = 06ea04fb-1f3f-1024-8ab0-080069057580 logstart = 8912900
rootino = 128
rbmino = 129
rsumino = 130
rextsize = 16
agblocks = 259255
agcount = 69
rbmblocks = 0
logblocks = 1168
versionnum = 0x1084
sectsize = 512
inodesize = 256
inopblock = 16
fname = "\000\000\000\000\000\000\000\000\000\000\000\000" blocklog = 12
sectlog = 9
inodelog = 8
inopblog = 4
agblklog = 18
rextslog = 0
inprogress = 0
imax_pct = 25
icount = 113856
ifree = 113202
fdblocks = 16727530
frextents = 0
uquotino = 0
gquotino = 0
qflags = 0
flags = 0
shared_vn = 0
inoalignmt = 2
unit = 0
width = 0
dirblklog = 0
logsectlog = 0
logsectsize = 0
logsunit = 0
features2 = 0

How do I interprete this?

My guess is that this fs does not have directory format 2, it might have been made before IRIX 6.5.5

Mogens

Signature · 4 lines
Mogens Kjaer, Carlsberg A/S, Computer Department
Gamle Carlsberg Vej 10, DK-2500 Valby, Denmark
Phone: +45 33 27 53 25, Fax: +45 33 27 47 08
Email: [email protected] Homepage: http://www.crc.dk
#5 lore raw

Hi Mogens,

Quoted 10 lines · Mogens Kjaer
Quoted 9 lines · [email protected] wrote:
Quoted 6 lines · Mogens Kjaer

How do I determine which of the requirements
listed in:

http://oss.sgi.com/projects/xfs/faq.html#useirixxfs

that hasn't been fulfilled?

Quoted 8 lines
Quoted 3 lines
# xfs_db /dev/<device>
xfs_db> sb 0
xfs_db> p

This gives me:

versionnum = 0x1084

#define XFS_SB_VERSION_DIRV2BIT 0x2000

So, yes it doesn't look like you have v2 directories and there is no support for it in Linux.

BTW, on xfs_db on Linux you can show this using the version command if it is recent enough.
e.g.

# xfs_db -c version -r /dev/sda6
versionnum [0x3084+0x0] = V4,ALIGN,DIRV2,EXTFLG
Quoted 2 lines

How do I interprete this?

above

Quoted 3 lines

My guess is that this fs does not have directory format 2, it might have been made before IRIX 6.5.5

yep, sorry.

--Tim

#6 lore raw
Quoted 9 lines · Timothy Shimmin
Quoted 4 lines

This gives me:

versionnum = 0x1084

#define XFS_SB_VERSION_DIRV2BIT 0x2000

So, yes it doesn't look like you have v2 directories and there is no support for it in Linux.

Hm, the kernel should probably print something more helpful in that case :)

-Eric

#7 lore raw
Quoted 7 lines · Eric Sandeen
Quoted 5 lines · Timothy Shimmin
Quoted 4 lines

This gives me:

versionnum = 0x1084

Quoted 8 lines
Quoted 4 lines

#define XFS_SB_VERSION_DIRV2BIT 0x2000

So, yes it doesn't look like you have v2 directories and there is no support for it in Linux.

Hm, the kernel should probably print something more helpful in that case :)

-Eric

Good point.
And indeed it should have:

xfs_mount.c/xfs_mount_validate_sb()
...

        /*
         * Version 1 directory format has never worked on Linux.
         */
        if (unlikely(!XFS_SB_VERSION_HASDIRV2(sbp))) {
                xfs_fs_mount_cmn_err(flags,
                        "file system using version 1 directory format");
                return XFS_ERROR(ENOSYS);
        }

Did this not happen, Mogens?

--Tim

#8 lore raw

Timothy Shimmin wrote:
..

Quoted 3 lines
                        "file system using version 1 directory format");

Did this not happen, Mogens?

No. Nothing in /var/log/messages, and the only thing I get on the screen when I mount is "Function not implemented".

Mogens

Signature · 4 lines
Mogens Kjaer, Carlsberg A/S, Computer Department
Gamle Carlsberg Vej 10, DK-2500 Valby, Denmark
Phone: +45 33 27 53 25, Fax: +45 33 27 47 08
Email: [email protected] Homepage: http://www.crc.dk
#9 lore raw
Quoted 8 lines · Mogens Kjaer

Timothy Shimmin wrote:
..

Quoted 3 lines
                        "file system using version 1 directory format");

Did this not happen, Mogens?

No. Nothing in /var/log/messages, and the only thing I get on the screen when I mount is "Function not implemented".

BTW older versions xfs did have limited support for v1 directories. It didn't work in all cases (nfs was a big problem) but it should would well enough to get your data off.
I would grab an older kernel off the oss ftp site.

Quoted 3 lines

Mogens