LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris and OpenSolaris.
General Sun, SunOS and Sparc related questions also go here.

Notices



Reply
 
Search this Thread
Old 05-25-2012, 12:07 PM   #1
Mark_667
Member
 
Registered: Aug 2005
Location: Manchester, England
Distribution: Ubuntu 14.10
Posts: 275

Rep: Reputation: 25
Mounting a UFS disk in Solaris


I'm trying to recover from a disk problem by attaching the (UFS) disk to a working solaris install and mounting the partitions I need and copying the data across. Unfortunately neither format, not the df command can see it, thought it does show up in prtconf as an instance under dad. How can I get the mount command to recognise the problem disk?
 
Old 05-25-2012, 04:09 PM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,523

Rep: Reputation: 365Reputation: 365Reputation: 365Reputation: 365
What disk problem ?
Are both the platforms SPARC ?
Can you post
Code:
devfsadm -v
and
Code:
iostat -En
output ?
 
Old 05-28-2012, 06:40 AM   #3
Mark_667
Member
 
Registered: Aug 2005
Location: Manchester, England
Distribution: Ubuntu 14.10
Posts: 275

Original Poster
Rep: Reputation: 25
It seems to now be showing up under the solaris 8 SPARC install:
Code:
Sun Microsystems Inc.   SunOS 5.8       Generic Patch   October 2001
# df -k
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/dsk/c0t0d0s0    1338343  795405  489405    62%    /
/proc                      0       0       0     0%    /proc
fd                         0       0       0     0%    /dev/fd
mnttab                     0       0       0     0%    /etc/mnttab
swap                  227624      16  227608     1%    /var/run
swap                  227624      16  227608     1%    /tmp
/dev/dsk/c0t0d0s7    36946004       9 36576535     1%    /export/home
#
Code:
# devfsadm -v
devfsadm[265]: verbose: mknod /devices/pci@1f,0/ide@d/dad@2,0:a 0l/3l/60640
devfsadm[265]: verbose: symlink /dev/dsk/c0t2d0s0 -> ../../devices/pci@1f,0/ide@d/dad@2,0:a
devfsadm[265]: verbose: mknod /devices/pci@1f,0/ide@d/dad@2,0:b 0l/3l/60640
devfsadm[265]: verbose: symlink /dev/dsk/c0t2d0s1 -> ../../devices/pci@1f,0/ide@d/dad@2,0:b
devfsadm[265]: verbose: mknod /devices/pci@1f,0/ide@d/dad@2,0:c 0l/3l/60640
devfsadm[265]: verbose: symlink /dev/dsk/c0t2d0s2 -> ../../devices/pci@1f,0/ide@d/dad@2,0:c
devfsadm[265]: verbose: mknod /devices/pci@1f,0/ide@d/dad@2,0:d 0l/3l/60640
devfsadm[265]: verbose: symlink /dev/dsk/c0t2d0s3 -> ../../devices/pci@1f,0/ide@d/dad@2,0:d
devfsadm[265]: verbose: mknod /devices/pci@1f,0/ide@d/dad@2,0:e 0l/3l/60640
devfsadm[265]: verbose: symlink /dev/dsk/c0t2d0s4 -> ../../devices/pci@1f,0/ide@d/dad@2,0:e
devfsadm[265]: verbose: mknod /devices/pci@1f,0/ide@d/dad@2,0:f 0l/3l/60640
devfsadm[265]: verbose: symlink /dev/dsk/c0t2d0s5 -> ../../devices/pci@1f,0/ide@d/dad@2,0:f
devfsadm[265]: verbose: mknod /devices/pci@1f,0/ide@d/dad@2,0:g 0l/3l/60640
devfsadm[265]: verbose: symlink /dev/dsk/c0t2d0s6 -> ../../devices/pci@1f,0/ide@d/dad@2,0:g
devfsadm[265]: verbose: mknod /devices/pci@1f,0/ide@d/dad@2,0:h 0l/3l/60640
devfsadm[265]: verbose: symlink /dev/dsk/c0t2d0s7 -> ../../devices/pci@1f,0/ide@d/dad@2,0:h
devfsadm[265]: verbose: mknod /devices/pci@1f,0/ide@d/dad@2,0:a,raw 0l/3l/20640
devfsadm[265]: verbose: symlink /dev/rdsk/c0t2d0s0 -> ../../devices/pci@1f,0/ide@d/dad@2,0:a,raw
devfsadm[265]: verbose: mknod /devices/pci@1f,0/ide@d/dad@2,0:b,raw 0l/3l/20640
devfsadm[265]: verbose: symlink /dev/rdsk/c0t2d0s1 -> ../../devices/pci@1f,0/ide@d/dad@2,0:b,raw
devfsadm[265]: verbose: mknod /devices/pci@1f,0/ide@d/dad@2,0:c,raw 0l/3l/20640
devfsadm[265]: verbose: symlink /dev/rdsk/c0t2d0s2 -> ../../devices/pci@1f,0/ide@d/dad@2,0:c,raw
devfsadm[265]: verbose: mknod /devices/pci@1f,0/ide@d/dad@2,0:d,raw 0l/3l/20640
devfsadm[265]: verbose: symlink /dev/rdsk/c0t2d0s3 -> ../../devices/pci@1f,0/ide@d/dad@2,0:d,raw
devfsadm[265]: verbose: mknod /devices/pci@1f,0/ide@d/dad@2,0:e,raw 0l/3l/20640
devfsadm[265]: verbose: symlink /dev/rdsk/c0t2d0s4 -> ../../devices/pci@1f,0/ide@d/dad@2,0:e,raw
devfsadm[265]: verbose: mknod /devices/pci@1f,0/ide@d/dad@2,0:f,raw 0l/3l/20640
devfsadm[265]: verbose: symlink /dev/rdsk/c0t2d0s5 -> ../../devices/pci@1f,0/ide@d/dad@2,0:f,raw
devfsadm[265]: verbose: mknod /devices/pci@1f,0/ide@d/dad@2,0:g,raw 0l/3l/20640
devfsadm[265]: verbose: symlink /dev/rdsk/c0t2d0s6 -> ../../devices/pci@1f,0/ide@d/dad@2,0:g,raw
devfsadm[265]: verbose: mknod /devices/pci@1f,0/ide@d/dad@2,0:h,raw 0l/3l/20640
devfsadm[265]: verbose: symlink /dev/rdsk/c0t2d0s7 -> ../../devices/pci@1f,0/ide@d/dad@2,0:h,raw
#
Code:
# iostat -En
c0t0d0          Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Model: WDC WD400BB-75DE Revision: 05.03E05 Serial No: WD-WMAD16952302
Size: 40.00GB <39997317120 bytes>
Media Error: 0 Device Not Ready: 0  No Device: 0 Recoverable: 0
Illegal Request: 0
#
But I'm still not sure how to mount it.

I've also tried it in a Solaris 11 install I put on a x86 machine. devfsadm -v literally output nothing, just returning me to the command prompt.

Code:
#iostat -En
Model: WDC WD400BB-75D Revision: Serial No: WD-WMAD14543819 Size: 40.00 GB <39999504384 bytes)
Media Error: 0 Device Not Ready: 0 No DEvice: 0 Recoverable: 0
Illegal Request: 0
 
Old 05-28-2012, 07:39 AM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,523

Rep: Reputation: 365Reputation: 365Reputation: 365Reputation: 365
Attempting to use an x86 machine to mount the disk is doomed. both disk partitioning and UFS file system formats are incompatible.

You should be able to access your disk from the SPARC machine running Solaris 8 but can you please explain first what disk problem you are trying to recover from ?
 
Old 05-28-2012, 08:07 AM   #5
Mark_667
Member
 
Registered: Aug 2005
Location: Manchester, England
Distribution: Ubuntu 14.10
Posts: 275

Original Poster
Rep: Reputation: 25
Quote:
Attempting to use an x86 machine to mount the disk is doomed.
I was hoping that a newer Solaris install would make things easier.

The problem was that we wanted to clone the disk so attached it to an x86 box and booted to EaseUS Partition Manager, it turned out that it couldn't read it but we think that it must have written a Windows disk ID to it because after we tried putting it back we found that it was unbootable (the boot failed with a 'corrupt label wrong magic number' error) and was listed as having a ms-dos parition table. Some work in the format shell on the Solaris 11 install allowed me to see the slices and partitions but I haven't managed to get any further yet (the SPARC box still gives the same error).
 
Old 05-28-2012, 10:08 AM   #6
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,523

Rep: Reputation: 365Reputation: 365Reputation: 365Reputation: 365
Quote:
Originally Posted by Mark_667 View Post
I was hoping that a newer Solaris install would make things easier.
It would as long as you stay with the same architecture (SPARC here).
Quote:
The problem was that we wanted to clone the disk so attached it to an x86 box and booted to EaseUS Partition Manager, it turned out that it couldn't read it but we think that it must have written a Windows disk ID to it because after we tried putting it back we found that it was unbootable (the boot failed with a 'corrupt label wrong magic number' error) and was listed as having a ms-dos parition table. Some work in the format shell on the Solaris 11 install allowed me to see the slices and partitions but I haven't managed to get any further yet (the SPARC box still gives the same error).
The issue is indeed the tool you used overwrote the disk label with a BIOS partition table. As I already wrote, they are not compatible. SPARC doesn't use BIOS. You should stop using x86 hardware (Solaris or Windows) and only access your disk with Solaris 8 on SPARC.

You need to relabel the disk which might be difficult as I assume you have no backup of the label and no other disk with the same vtoc.

Do you know how many partitions you had on that disk, their slices and where they were mounted ?
 
Old 05-28-2012, 11:39 AM   #7
Mark_667
Member
 
Registered: Aug 2005
Location: Manchester, England
Distribution: Ubuntu 14.10
Posts: 275

Original Poster
Rep: Reputation: 25
According to the output of the format command (on the Solaris 11 box) there's the following:

Code:
part tag cylinders size(mb) blocks
2  backup  0-4858  37.22  (4859/0/0) 78059835
8  boot  0-0  7.84  (1/0/0) 16065
9  alternates  1-2  15.69  (2/0/0) 32130
All the other entries either had 0 values or were unassigned. I've relabelled the disk in the format command on Solaris 11 (after feeding it info on the disk geometry) which allowed me to see the slices but didn't make any difference when I tried it in the SPARC machine.
Quote:
Do you know how many partitions you had on that disk, their slices and where they were mounted ?
I suspect that we just used the defaults when setting up slices, partitions and mounts unfortunately I don't know how it was setup. I suspect that the only partitions with useful data on were the boot partition and wherever /export/home lives.
Quote:
I assume you have no backup of the label and no other disk with the same vtoc.
You assume correctly, but after this is done I'll have to look into those things!
 
Old 05-28-2012, 01:35 PM   #8
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,523

Rep: Reputation: 365Reputation: 365Reputation: 365Reputation: 365
Again, stop using Solaris 11 on x86 to access a SPARC disk. Nothing it might report is accurate or of interest. Anything it might do will corrupt your data further. An MBR which has overwritten the SPARC label. You need to reconstruct the label hoping no other damage has been done.
 
  


Reply

Tags
prtconf, solaris, ufs


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Solaris 10 ufs full AndreVicente Solaris / OpenSolaris 8 03-01-2012 04:52 AM
kernel that supports UFS/Solaris zarnold Fedora 1 08-19-2006 05:32 PM
Mounting Solaris UFS volumes under Linux? ldieter Linux - General 1 02-20-2005 09:19 AM
Mounting Sun Solaris boot disk in Linux for export jdc2048 Linux - General 1 11-14-2004 01:26 PM
Cant mount UFS in Solaris but can in Linux sstallion Linux - Newbie 1 10-28-2004 08:47 AM


All times are GMT -5. The time now is 04:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration