I've been frustrated for years that there seemed to be no easy way to get data directly off of XFS formatted SGI disks using "modern" hardware and operating systems. Recently, I decided to revisit this problem and, as it turns out, it's not that hard.
Because I don't have infinite space, I wanted something compact -- specifically a laptop solution. What you need:
- An Adaptec 1460 PCMCIA Fast SCSI adapter (~$40 on ebay) with the proprietary cable, or
- An Adaptec 1480 Cardbus UltraSCSI adapter (~$125 on ebay) in order to use newer Ultra-SCSI-only drives (e.g. Fujitsu MA_ drives)
- A laptop with a PCMCIA/cardbus slot (I use a Thinkpad T500, which has a great mix of "modern" power/virtualization support and useful IO)
- I tested this with Linux Mint 20.04 on the T500. I assume many other host OS's would work.
- An external disk housing to supply molex power and provide a Centronics -> IDC50 cable (or a HDPB50 -> IDC50 if you're using the 1480)
- A 50 pin to SCA adapter if you're using SCA drives
- Virtualbox (or your hypervisor of choice, unfortunately new versions of VMWare Player don't support the Core2Duo in my T500 anymore)
- An old linux distro, I used Ubuntu 4.10 because 1) it's the oldest Ubuntu distro so I assumed it has the best backwards compatibility, 2) it's readily available with a working package manager (with small tweaks to the /etc/apt/sources.list file, replacing "archive" with "old-releases" in each url), and 3) I'm most familiar with Ubuntu / Debian.
- Edit: Ubuntu 8.04 is also confirmed working as well, so long as you mount the device to the IDE bus.
You can still download Ubuntu install media from the original sources. The x86 install CD includes everything you need for basic xfs volume repairing/mounting.
If you want to create/manipulate xfsdump files, it's best to use 8.04.- 8.04 http://old-releases.ubuntu.com/releases/hardy/ (This is the first version to have xfsdump available through apt-get.) This is the first Ubuntu LTS release, so it has better driver support and much more recent package updates. It also supports SMP out of the box, if that's important. It was released in Oct 2008.
- 4.10 https://old-releases.ubuntu.com/releases/warty/ (This is the oldest Ubuntu release, from Oct 2004, so it may have slightly better compatibility)
Once you have this setup, it's actually fairly straightforward. First install Virtualbox and get your old Linux distro installed. Make sure you use an IDE controller type for your hard disk images. 4.10 doesn't seem to support SATA at all, and I had better luck with the loopback device mounted to IDE in 8.04 as well. xfsprogs should be installed by default, but might as well run a sudo apt-get update and sudo apt-get upgrade (you will need to update the sources.list file, per below).
Hardy Herron (8.04) is the first Ubuntu release to include xfsdump through apt-get. Warty Warthog also has xfsdump available, so suggest just using it. The top answer here (
https://superuser.com/questions/339537/w...u-versions) walks through updating your apt sources.list file to get apt-get working.
- The tl;dr is to edit the /etc/apt/sources.list file (will need to use sudo) and find/replace "archive" and "security" with "old-releases"
- For 4.10 you'll also need to uncomment the lines with the urls. That's it, super easy.
Then image your drive:
- Connect your SCSI drive and power it on,
- Insert the Adaptec PCMCIA card,
- On the host OS, type "dmesg | tail -20" to see the hardware ID of the SCSI drive (e.g. /dev/sda1 or whatever ... if there is none troubleshoot)
- "sudo fdisk -l" should also give you the disks and partitions -- although your new linux distro won't actually be able to mount the disk properly
Armed with that info, use dd to create an image file, loopback device pointing at that image file, and virtualdisk VMDK file pointing at that loopback device (you could also skip the image file/loopback device and just create a VMDK pointing at the disk itself, which allows direct manipulation of the disk in the guest OS, but that seems risky):
- Enter the command "sudo dd if=/dev/yourscsidevice of=filename.dd bs=512 status=progress" (Note this maxes out at 1MB/s for me on a 1460 adapter, so be patient)
- Mount this file as a loopback device using "sudo losetup /dev/loop0 filename.dd"
- Create a vmdk pointing to this loopback device using "sudo VBoxManage internalcommands createrawvmdk -filename ./loop0.vmdk -rawdisk /dev/loop0"
Now add this VMDK to your virtual machine and boot it up. Note that in Linux Mint I found I had to run virtualbox using sudo, even adding my user to the "disk" group didn't allow access otherwise.
For some reason, I wasn't able to mount the disks immediately in the guest OS, I had to repair the images first (note these are all tested images that are known to work in actual SGI hardware)
- Use "sudo fdisk -l" to view the disks/partitions. In my case, the XFS partition was something like /dev/hdb1 (4.10) and /dev/sdb1 (8.04)
- use "sudo xfs_repair -L /dev/hdb1" to dump the pending log files
- use "sudo xfs_check /dev/hdb1" to verify the image, this should be very quick for an image/loopback device
- mount the image using "sudo mount -t xfs /dev/hdb1 ./yourmountpoint"
- ????
- Profit
Note: I have not/not tested whether these repaired images are backwards compatible with IRIX. The primary intent with this approach is to be able to pull the files themselves without relying on vintage hardware. If you want to duplicate a disk, however, I assume the dd images would work if written back to an appropriate disk.
I've confirmed this to work perfectly with a host OS of Linux Mint 20.04 and a guest OS of Ubuntu Warty Warthog (4.10) and Hardy Herron (8.04), using images both from an Indy (6.5.22) and Octane (6.5.30). I would like to test with 6.2 (I anticipate there may be problems as it uses an earlier xfs version -- which is one reason I started with 4.10), but I don't have any 6.2 installs handy. If anyone can host an installed 6.2 disk image, let me know.
Note this also works perfectly with SCSI2SD images (tested), which you can also dd directly from the SD card (using the seek and count options to copy just the appropriate sectors). This is way faster than using the PCMCIA SCSI card.
There are many ways to get the files back off of the host OS. I just used a large USB drive formatted via fat32, which I passed through to the guest OS to drag/drop files from the mounted SGI volume, then I detached the USB device through virtualbox and was able to access all of the files back on the host OS. Ext3 probably would be better (to retain more file metadata and allow larger files sizes), but I stuck with fat32 for my testing because I was sure it would be supported.
Edit: Got everything working on 8.04 Hardy Herron as well! Moved the loopback device over to the IDE bus and was able to manipulate it as /dev/sdb1 without issue. Note that after further experimentation, it does seem that 4.10 more reliably accesses the loopback drive without issue, so that would be my go-to OS
if you don't need to use xfsdump/xfsrestore.
Winter solstice edit: After frustrating attempts to compile xfsdump (and dependencies, most notably uuid-dev) from source in 4.10, I realized complied versions *are* in fact still available from ubuntu, I just hadn't fully updated my sources.list file properly (doh). With that sorted, I've installed and tested xfsdump/xfsrestore in 4.10 against a 6.5.22 image, which seems to work well enough. So I see no reason to go with 8.04, which seems to have more trouble consistently mounting the drive/loopback device passed through from virtualbox. Tweaked language above to correct my mistakes/avoid confusion.