Re: Mount and read a solaris disk in Linux

From: Dances With Crows (danSPANceswitTRAPhcrows_at_gmail.com)
Date: 09/21/04


Date: 20 Sep 2004 23:08:13 GMT

On Mon, 20 Sep 2004 22:21:58 GMT, Dar & Steve At Home staggered into the
Black Sun and said:
> I have a Solaris disk that I need to mount and read on a linux box.
> I'm not sure what ver of Solaris formatted the drive but I am running
> Mandrake 10.0. I have tried to mount the drive and each time I do
> this the drive becomes unreadable by either the Solaris box or the
> linux box.

What? When you mount a filesystem, nothing should be written to it
except atime info. You should mount it with "ro" though unless you have
a pressing need to write to it.

> I have read that the problem may be due to Solaris using the same
> drive ID as linux swap. If this is true how do I manage to mount
> this drive in Linux without destroying the data?

"Drive ID"? Do you mean "partition ID"? If this is a SCSI disk and
you've set the disk to have the same ID as another SCSI device in the
chain, then nothing will work properly. If you meant "Solaris
filesystems use 0x82 as a partition ID", then that means nothing. Linux
doesn't use the partition ID bytes for anything at all. Filesystem
detection is done by reading the first sector and looking for magic
numbers, or done with the -t option to mount.

> linux is seeing the drive in the first place -- that is as sda1, sdb2,
> etc. So this makes it hard to make an entry in the fstab file. I
> think I need to use something like:
>
> /dev/???? /mnt/solaris ufs ufstype=sun defaults 1 1

Nope.

/dev/?? /mnt/somewhere ufs ufstype=sun,ro defaults 1 2

Only / gets 1 1 , you should use "ro" if you think the disk is being
written to, and are you sure that "sun" is correct? That's for Solaris
filesystems that were made on a Sparc. Solarisx86 filesystems use
"sunx86". If the filesystem was originally made on a Sparc, you will
probably need to recompile your kernel and make sure that File Systems->
Partition Types->Advanced Partition Selection and Sun Partition Table
Support are both Y. This is *never* set to Y by default on an x86.
You'll probably have to reboot after recompiling.

After you boot with the proper partition table support built in to the
kernel, you'll see something like this in dmesg:

Sun disklabel <sda1 sda2 sda3 sda4 sda5 sda6 sda7 sda8>

...and you can try mounting each one in turn. Make sure you use ro!

> Do I need to add UFS filesystem support into my kernel?

No, it will be just fine to have it as a module. If you're using a
stock kernel, it'll probably be there already; if not, File Systems->UFS
Filesystem Support, say "M", make modules modules_install. HTH,

-- 
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
Brainbench MVP for Linux Admin /    mail: TRAP + SPAN don't belong
http://www.brainbench.com     /                Hire me! 
-----------------------------/ http://crow202.dyndns.org/~mhgraham/resume


Relevant Pages

  • Re: Mystery of file systems
    ... In my understanding linux operates on ext3/ext2 type of file ... > call the mount points as file systems (please keep in mind that you are ... Calling a mount point a filesystem is really a misuse of terms. ...
    (comp.os.linux.setup)
  • Re: Mystery of file systems
    ... In my understanding linux operates on ext3/ext2 type of file ... > call the mount points as file systems (please keep in mind that you are ... Calling a mount point a filesystem is really a misuse of terms. ...
    (comp.os.linux.misc)
  • Argosy HD-530 USB2/FW Linux Driver.
    ... The Argosy USB 2.0 / Firewire 2.5" Hard Disk Interface ... linux box, it returns a kernel version 2.4.20-8... ... That probably already shows you the device you want to mount, but if not, ... is the filesystem type of your partition, or better said, you should ...
    (Debian-User)
  • Re: [opensuse] mounting a Solaris UFS disk on a SuSE 11.1 system
    ... Solaris supports NFS. ... including opensuse 11.1 supports both the ufs filesystem and more importantly the disk partitioning scheme out of the box. ... The only other thing even slightly like a problem or a difficulty is you may have to trial & error a few times to pick the right mount option to choose the right flavor of "UFS" between several sun and bsd variants. ...
    (SuSE)
  • Re: NFS problems with Linux mounting a file
    ... Mounting a 2mb+ file from Linux to Solaris works, nfsstat shows on both ... I traced the communication during the mount operation with ethereal. ...
    (comp.os.linux.networking)