Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Solaris 9 HDD Mounting 1

Status
Not open for further replies.

parrysands

Vendor
Nov 10, 2005
1
US
History...I am not a Solaris guy. I know very little about any of it. My boss deleted files from a HDD on a Solaris 8 drive. After reboot, system will not boot.

I have the files to put back on the HDD, but cannot access it to do so.

What I have done. On a Netra 1125, I installed Solaris 9, and have a functional system, with Webmin and SSH access. I need to add the old drive, somehow mount it, and copy the files back to it. I have tried many things I have found on the internet, but so far nothing has worked. I could really use some help here.

Thanks,
Parry


Here is a paste of what I have tried:

screen not found.
Can't open input device.
Keyboard not present. Using ttya for input and output.

Netra t 1120/1125 (UltraSPARC-II 440MHz), No Keyboard
OpenBoot 3.23, 512 MB memory installed, Serial #13155783.
Ethernet address 8:0:20:c8:bd:c7, Host ID: 80c8bdc7.



Rebooting with command: boot
Boot device: disk:a File and args:
SunOS Release 5.9 Version Generic_118558-34 64-bit
Copyright 1983-2003 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
configuring IPv4 interfaces: hme0.
starting DHCP on primary interface hme0
Hostname: unknown
The system is coming up. Please wait.
checking ufs filesystems
/dev/rdsk/c0t0d0s7: is logging.
starting rpc services: rpcbind done.
Setting default IPv4 interface for multicast: add net 224.0/4: gateway 192.168.0.53
syslog service starting.

The system is ready.

unknown console login: root
Password:

HERE I INSTERTED THE OTHER DISK, ALL SCSI AND HOT SWAPABLE

#
# cd dev
# cd dsk
# ls
c0t0d0s0 c0t0d0s2 c0t0d0s4 c0t0d0s6 c0t6d0s0 c0t6d0s2 c0t6d0s4 c0t6d0s6
c0t0d0s1 c0t0d0s3 c0t0d0s5 c0t0d0s7 c0t6d0s1 c0t6d0s3 c0t6d0s5 c0t6d0s7
# mount -F ufs /dev/dsk/c0t6d0s0 /BTS
mount: /dev/dsk/c0t6d0s0 is already mounted, /BTS is busy,
or the allowable number of mount points has been exceeded
# Jan 12 02:53:53 unknown sshd[386]: Kerberos mechanism library initialization error: No profile file open.

#
#
# cd ..
# cd ..
# ls
bin devices kernel net sbin vol
BTS etc lib opt tmp webmin
cdrom export lost+found platform usr xfn
dev home mnt proc var
# mkdir BTS1
# cd dev
# cd rdsk
# mount -F ufs /dev/dsk/c0t6d0s0 /BTS1
mount: /dev/dsk/c0t6d0s0 is already mounted, /BTS1 is busy,
or the allowable number of mount points has been exceeded
# mountall
checking ufs filesystems
/dev/dsk/c0t0d0s7: /dev/dsk/c0t0d0s7 IS CURRENTLY MOUNTED READ/WRITE.
/dev/dsk/c0t0d0s7: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.

THE FOLLOWING FILE SYSTEM(S) HAD AN UNEXPECTED INCONSISTENCY: /dev/rdsk/c0t0d0s7 (/export/home)
mount: /tmp is already mounted, swap is busy,
or the allowable number of mount points has been exceeded
mount: /dev/dsk/c0t0d0s7 is already mounted, /export/home is busy,
or the allowable number of mount points has been exceeded
# mount /dev/dsk/c0t6d0s0 /BTS1
mount: /dev/dsk/c0t6d0s0 is already mounted, /BTS1 is busy,
or the allowable number of mount points has been exceeded
# cd c0t6d0s0
c0t6d0s0: not a directory
# syslogd: line 24: WARNING: loghost could not be resolved

# ls
c0t0d0s0 c0t0d0s2 c0t0d0s4 c0t0d0s6 c0t6d0s0 c0t6d0s2 c0t6d0s4 c0t6d0s6
c0t0d0s1 c0t0d0s3 c0t0d0s5 c0t0d0s7 c0t6d0s1 c0t6d0s3 c0t6d0s5 c0t6d0s7
# mount -F ufs -o rw /dev/dsk/c0t6d0s0 /BTS
mount: /dev/dsk/c0t6d0s0 is already mounted, /BTS is busy,
or the allowable number of mount points has been exceeded
# unmount
unmount: not found
# mount
/ on /dev/dsk/c0t0d0s0 read/write/setuid/intr/largefiles/logging/xattr/onerror=panic/dev=800000 on Sat Jan 12 02:48:29 2008
/proc on /proc read/write/setuid/dev=43c0000 on Sat Jan 12 02:48:28 2008
/etc/mnttab on mnttab read/write/setuid/dev=4480000 on Sat Jan 12 02:48:28 2008
/dev/fd on fd read/write/setuid/dev=44c0000 on Sat Jan 12 02:48:29 2008
/var/run on swap read/write/setuid/xattr/dev=1 on Sat Jan 12 02:48:29 2008
/tmp on swap read/write/setuid/xattr/dev=2 on Sat Jan 12 02:48:30 2008
/export/home on /dev/dsk/c0t0d0s7 read/write/setuid/intr/largefiles/logging/xattr/onerror=panic/dev=800007 on Sat Jan 12 02:48:31 2008
#
# cd ..
# ls
allkmem mem ptyq6 rsd3c term ttyq7
arp mouse ptyq7 rsd3d ticlts ttyq8
bd.off msglog ptyq8 rsd3e ticots ttyq9
ce nca ptyq9 rsd3f ticotsord ttyqa
cfg null ptyqa rsd3g tnfctl ttyqb
conslog openprom ptyqb rsd3h tnfmap ttyqc
console pm ptyqc rsm tod ttyqd
cua poll ptyqd rsr0 trapstat ttyqe
dsk printers ptyqe rts tty ttyqf
dump ptmajor ptyqf sad ttya ttyr0
ecpp0 ptmx ptyr0 sd3a ttyb ttyr1
eri pts ptyr1 sd3b ttyp0 ttyr2
fd ptyp0 ptyr2 sd3c ttyp1 ttyr3
fssnapctl ptyp1 ptyr3 sd3d ttyp2 ttyr4
hme ptyp2 ptyr4 sd3e ttyp3 ttyr5
icmp ptyp3 ptyr5 sd3f ttyp4 ttyr6
icmp6 ptyp4 ptyr6 sd3g ttyp5 ttyr7
ip ptyp5 ptyr7 sd3h ttyp6 ttyr8
ip6 ptyp6 ptyr8 se_hdlc ttyp7 ttyr9
ipsecah ptyp7 ptyr9 se_hdlc0 ttyp8 ttyra
ipsecesp ptyp8 ptyra se_hdlc1 ttyp9 ttyrb
kbd ptyp9 ptyrb spdsock ttypa ttyrc
keysock ptypa ptyrc sppp ttypb ttyrd
kmem ptypb ptyrd sppptun ttypc ttyre
kstat ptypc ptyre sr0 ttypd ttyrf
ksyms ptypd ptyrf stderr ttype udp
le ptype ramdiskctl stdin ttypf udp6
llc1 ptypf random stdout ttyq0 urandom
llc2 ptyq0 rawip swap ttyq1 volctl
lockstat ptyq1 rawip6 syscon ttyq2 winlock
lofictl ptyq2 rdsk sysmsg ttyq3 wscons
log ptyq3 rmt systty ttyq4 zero
logindmux ptyq4 rsd3a tcp ttyq5
md ptyq5 rsd3b tcp6 ttyq6
# cd dsk
# ls
c0t0d0s0 c0t0d0s2 c0t0d0s4 c0t0d0s6 c0t6d0s0 c0t6d0s2 c0t6d0s4 c0t6d0s6
c0t0d0s1 c0t0d0s3 c0t0d0s5 c0t0d0s7 c0t6d0s1 c0t6d0s3 c0t6d0s5 c0t6d0s7
# cd c0t6d0s0
c0t6d0s0: not a directory
# mount -F ufs -o rw /dev/rdsk/c0t6d0s0 /BTS
mount: /dev/rdsk/c0t6d0s0 not a block device
# mount -F ufs -o rw /dev/dsk/c0t6d0s0 /BTS
mount: /dev/dsk/c0t6d0s0 is already mounted, /BTS is busy,
or the allowable number of mount points has been exceeded
# df -k
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t0d0s0 4999546 1623814 3325737 33% /
/proc 0 0 0 0% /proc
mnttab 0 0 0 0% /etc/mnttab
fd 0 0 0 0% /dev/fd
swap 1435752 40 1435712 1% /var/run
swap 1435712 0 1435712 0% /tmp
/dev/dsk/c0t0d0s7 11379544 11305 11254444 1% /export/home
# df
/ (/dev/dsk/c0t0d0s0 ): 6751464 blocks 513856 files
/proc (/proc ): 0 blocks 7859 files
/etc/mnttab (mnttab ): 0 blocks 0 files
/dev/fd (fd ): 0 blocks 0 files
/var/run (swap ): 2871424 blocks 48583 files
/tmp (swap ): 2871424 blocks 48583 files
/export/home (/dev/dsk/c0t0d0s7 ):22736478 blocks 1384380 files
# df help
df: (help ) not a block device, directory or mounted resource
# help df
help: not found
# df -a
/ (/dev/dsk/c0t0d0s0 ): 6751464 blocks 513856 files
/proc (/proc ): 0 blocks 7859 files
/etc/mnttab (mnttab ): 0 blocks 0 files
/dev/fd (fd ): 0 blocks 0 files
/var/run (swap ): 2870976 blocks 48583 files
/tmp (swap ): 2870976 blocks 48583 files
/export/home (/dev/dsk/c0t0d0s7 ):22736478 blocks 1384380 files
/net (-hosts ): 0 blocks 0 files
/home (auto_home ): 0 blocks 0 files
/xfn (-xfn ): 0 blocks 0 files
/vol (unknown:vold(pid308)): 0 blocks -1 files
#
#
#

 
I believe t6 might be your cdrom drive.

Solaris does not rebuild the device tree on device insertion.

Run "devfsadm -C disk"

Then run "echo | format" to see if the drive is seen.

If you see the new drive, then remember the value X to be used next.

If it was a root drive, most likely root was /dev/c0tXd0s0.

dump the partition table using prtvtoc:

prtvtoc /dev/rdsk/c0tXd0s2

If it was a root drive, I would fsck the root partition only, mount it, and inspect the old vfstab:

fsck /dev/rdsk/c0tXd0s0
mount /dev/dsk/c0tXd0s0 /mnt
cat /mnt/etc/vfstab

Remember here that the special file (/dev/dsk/c*) is from the old system, it DOES NOT correspond to your running system. You just want to figure out the partitioning.

Check to see if there is a separate /, or /usr (prtvtoc previously will also tell you)

If it was root stuff that was blown away, then you can restore it now. Most likely a boot problem would
only be a corrupted root or /usr (if one exists)

If there is a separate /usr (indicated by /mnt/etc/vfstab)
then you need to fsck that also and mount it (provided the files to be restored are on it.

Once down, unmount everything you mounted.
Once everything is unmounted, rerun devfsadm -C disk.
eugene

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top