I have a requirement to copy a very large amount of data from a Solaris 9 (Sparc) system to a SLES11 (x84_64) system.

The Solaris system is quite old, and transferring the data over the network will take days of downtime.

My goal is to assign a LUN from SAN to my Solaris system, copy the data that way (over fabric instead of LAN), then reassign the LUN to the destination Linux system.

My problem is that I can't seem to figure out how to mount the UFS filesystem from my Linux box.

This is the current partition table as seen on Solaris:

Volume name = <        >
ascii name  = <HITACHI  OPEN-V      -SUN 7006 ffe00000>
bytes/sector    =  512
sectors = 4292870143
accessible sectors = 4292870110
Part      Tag    Flag     First Sector          Size          Last Sector
  0       root    wm                34       128.00MB           262177
  1       swap    wu            262178       128.00MB           524321
  2 unassigned    wm                 0            0                0
  3 unassigned    wm                 0            0                0
  4 unassigned    wm                 0            0                0
  5 unassigned    wm                 0            0                0
  6        usr    wm            524322         2.00TB           4292853725
  8   reserved    wm        4292853726         8.00MB           4292870109

When when I try to list it using fdisk on the Linux system, I get:

 # fdisk -l /dev/sdl

Disk /dev/sdl: 2199.0 GB, 2199023255552 bytes
255 heads, 63 sectors/track, 267349 cylinders, total 4294967296 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/sdl doesn't contain a valid partition table

The device mapper, however, seems to be aware of the partitions (although it offsets them by 1):

lrwxrwxrwx 1 root root 7 Nov  5 13:30 /dev/mapper/360060e8006cfd3000000cfd300000087 -> ../dm-3
lrwxrwxrwx 1 root root 8 Nov  5 13:30 /dev/mapper/360060e8006cfd3000000cfd300000087_part1 -> ../dm-38
lrwxrwxrwx 1 root root 8 Nov  5 13:30 /dev/mapper/360060e8006cfd3000000cfd300000087_part2 -> ../dm-39
lrwxrwxrwx 1 root root 8 Nov  5 13:30 /dev/mapper/360060e8006cfd3000000cfd300000087_part7 -> ../dm-40
lrwxrwxrwx 1 root root 8 Nov  5 13:30 /dev/mapper/360060e8006cfd3000000cfd300000087_part9 -> ../dm-41

I then try to mount the filesystem, but this is the result:

 # mount -t ufs -o ro,ufstype=sun /dev/disk/by-id/scsi-360060e8006cfd3000000cfd300000087-part7 /ldev87
mount: wrong fs type, bad option, bad superblock on /dev/mapper/360060e8006cfd3000000cfd300000087_part7,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

dmesg has no additional information for me. Just one line each time I try to mount:

[173168.020980] ufs_read_super: bad magic number

I appear to have support for the ufs filesystem:

# grep ufs /proc/filesystems

# modinfo ufs
filename:       /lib/modules/3.0.101-0.15-default/kernel/fs/ufs/ufs.ko
license:        GPL
srcversion:     4BC9796D2E230B27387BE46
supported:      yes
vermagic:       3.0.101-0.15-default SMP mod_unload modversions
signer:         SUSE Linux Enterprise Secure Boot Signkey
sig_key:        3F:B0:77:B6:CE:BC:6F:F2:52:2E:1C:14:8C:57:C7:77:C7:88:E3:E7
sig_hashalgo:   sha256

# less /proc/modules | grep ufs
ufs 79510 0 - Live 0xffffffffa07e4000

Is Linux only able to open Sun volumes up to a certain size (which is under 2TB)? Or is there something special I need to do on the Solaris system to prepare the filesystem to be read by a Linux system?

I hope someone has an idea.

Update For any future visitors with the same problem, my issue appears to have been the size of the LUN. 2TB did not work, and neither did 1.8TB, but 1TB worked fine. I don't have time to figure out where the actually limit is, but there clearly is one.

  • Do you have ufs support in your kernel? I think the list of supported filesystems is in /proc/filesystems. If ufs isn't listed, you need to 'modprobe ufs'. – EricM Nov 6 '14 at 19:36
  • 1
    Also, what does dmesg yield as suggested by the error message? – EricM Nov 6 '14 at 22:13
  • @EricM thanks for the suggestions. I've updated the question with the answers. – Omnipresence Nov 7 '14 at 13:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.