I have a USB disk which when connected to a CentOS 6.5 system shows this as the output in fdisk -l.
Disk /dev/sdn: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00113504
Device Boot Start End Blocks Id System
/dev/sdn1 * 5 243200 1953471870 bf Solaris
I want to mount this file system on the system and so far it has been a nightmare. This is what I have tried.
1. Installed UFS support using elrepo. Tried all the options that ufs provides (various ufstypes).
2. Installed ZFS support. Did not really understand if I could do anything further with it.
Some of the mount commands that I tried are below. I am not listing all of them as the permutations are far too many.
mount -t ufs -oro,ufstype=ufs2 /dev/sdn1 /mnt
mount -t ufs -oro,ufstype=sunx86 /dev/sdn1 /mnt
mount -t ufs -oro,ufstype=sun /dev/sdn1 /mnt
mount -t ufs -oro,ufstype=old /dev/sdn1 /mnt
All these commands report the UFS kernel module reporting as bad magic number in dmesg.
Can anyone help? How could I mount the filesystem in Linux. Read-Only mount would be good enough.
Replies to comments:
dmesg | grep -i solaris
does not show anything. However, bothparted
andfdisk
show only one partition which is sdn1.zpool status
andzpool list
both show "no pools available".
Best Answer
As you stated in your last comment, if I understand it correctly, that the partition mounts fine on both SPARC and x86 running Solaris 11, you can be sure this is not
UFS
. Big endianUFS
used on SPARC hardware doesn't mount on x86 hardware and reciprocally.That leaves
hsfs
,pcfs
andZFS
as potential contenders, and perhapsudf
too.The simpler way would be to check on Solaris what is the file system type with either the
mount
orfstyp
commands.Linux should be able to mount
hsfs
(isofs
),pcfs
(vfat
) andudf
.If ZFS, only
zpool
version 28/zfs
version 5 or older can be imported/mounted on the Linux side (and possibly only zpool 23/zfs 4 if ZFS fuse).Edit:
After you stated the file system is UFS on x86, the file system to use should ufs with ufstype=sunx86 or ufstype=sun. However, you are not using the right device.
/dev/sdn1 is the primary partition used by Solaris but this partitions is normally subdivided in underlying partitions, named slices in Solaris terminology. This is similar to logical partitions.
You should then identify what names were given to the slices by the Linux kernel by running
dmesg | grep solaris
and mount the right one (example if slice 5 is reported) :Note that not all slices contains file systems, they might be used as raw devices like the swap.