Solaris 10 Sparc - Hard drive space missing

Hi,

I have a Solaris 10 box with a hard drive that has a label saying the disk is 40 GB. When i installed Solaris 10, i did a df -k and it only shows 6 GB. I also tried looking at the partition table but nothing really jumped at me there either. I tried using prtvtoc but might have not used it correctly. I'm not a Solaris Admin by trade but working for a small shop and was the one with the most Solaris knowledge.

Any help or direction on this would be appreciated. I'm going to try to re-install Solaris 10 but i'm not so sure this will do anything.

Thanks,

Charles

[603 byte] By [charles_chachi] at [2007-11-26 8:35:19]
# 1
What does the partition table show?
krelvinaz at 2007-7-6 22:04:18 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 2

Here's what the partition table says:

Current partition table (original):

Total disk cylinders available: 12007 + 2 (reserved cylinders)

PartTagFlagCylinders SizeBlocks

0rootwm1041 - 1721335.18MB(681/0/0)686448

1usrwm1722 - 3145700.88MB(1424/0/0)1435392

2backupwm0 - 120065.77GB(12007/0/0) 12103056

3varwm3146 - 3560204.26MB(415/0/0)418320

4swapwu0 - 1040512.37MB(1041/0/0)1049328

5 unassignedwm3561 - 367456.11MB(114/0/0)114912

6usrwm3675 - 120064.00GB(8332/0/0)8398656

7 unassignedwm00 (0/0/0)0

When i tried re-installing Solaris, i also got a screen saying "select disk..." (only one disc available) and it cited the size has 5.9 GB. I'm pretty sure when we took the box apart that besides the size saying 40 GB, the number of cylinders should also be higher. It's a Sun Fire V100.

Thanks,

Charles

charles_chachi at 2007-7-6 22:04:18 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 3

Hello Charles,

unfortunately you didn't post the disk type/model. When you invoke format the disk model should be displayed.

This is an example display from InfoDoc 101599

# format

Searching for disks...done

AVAILABLE DISK SELECTIONS:

0. c1t0d0 <DEFAULT cyl 61918 alt 2 hd 255 sec 63

/pci@1,0/pci8086,340f@7/sd@0,0

I would suggest that you "rewrite/destroy" the disk label (data on the disk is lost!).

dd if=/dev/zero of=/dev/rdsk/c0t1d0s2 bs=512

change the bold c0t1d0s2 to match your drive, the example is for a disk attached to controller 0 as target 1.

When you invoke format, it asks to label the disk because the label is invalid. After labeling the disk you should get full capacity.

Btw. this is a link to a previous thread, unfortunately the link in this thread doesn't work anymore ...

http://forum.sun.com/jive/thread.jspa?messageID=250301

Michael>

MAALATFT at 2007-7-6 22:04:18 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 4

Here's the output of the format:

# format

Searching for disks...done

AVAILABLE DISK SELECTIONS:

0. c0t2d0 <Linux custom cyl 12007 alt 2 hd 16 sec 63>

/pci@1f,0/ide@d/dad@2,0

Specify disk (enter its number): 0

selecting c0t2d0

[disk formatted, no defect list found]

Warning: Current Disk has mounted partitions.

/dev/dsk/c0t2d0s0 is currently mounted on /. Please see umount(1M).

/dev/dsk/c0t2d0s1 is currently mounted on /usr/openwin. Please see umount(1M).

/dev/dsk/c0t2d0s3 is currently mounted on /var. Please see umount(1M).

/dev/dsk/c0t2d0s4 is currently used by swap. Please see swap(1M).

/dev/dsk/c0t2d0s5 is currently mounted on /opt. Please see umount(1M).

/dev/dsk/c0t2d0s6 is currently mounted on /usr. Please see umount(1M).

charles_chachi at 2007-7-6 22:04:18 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 5

Tried the above dd command and got the following output:

# dd if=/dev/zero of=/dev/rdsk/c0t2d0s0 bs=512

dd: unexpected short write, wrote 0 bytes, expected 512

686449+0 records in

686449+0 records out

I tried the format command afterwards but the output seemed to be the same as beforehand, am i missing something here?

Thanks,

Charles

charles_chachi at 2007-7-6 22:04:18 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 6

I can think of two possible procedures for you to consider.

The Sunfire V100 system uses IDE drives, so you could ...

1. put the disk into any PC running Linux and then find some sort of disk utility

to completely remove all partitioning information.

2. put the disk into any PC running a Microsoft OS and

use Microsoft's fdisk to remove all partition information.

(even Win9x would be able to do that)

If using this second tool, you will also need to use the fdisk /mbr command

to zero out the master boot record of the drive. That clears sector zero.

Then you can take the freshly cleared disk and put it back into the Sun system.

Use Solaris's commands to re-write a proper partition table.

Keep in mind that both of my suggested procedures

will irretrievable wipe all data from the drive.

rukbat at 2007-7-6 22:04:18 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 7

Hello Charles,

boot from cdrom into single-user mode !

boot cdrom -s

Use the command from the other thread

dd if=/dev/zero of=/dev/rdsk/c0t2d0s2 bs=1b count=16

I think the first command was incomplete (count was missing), therefore nothing was written to the disk.

If this fails, use Rukbat's advice and destroy the label (partition information) by attaching the disk to a PC.

Unfortunately I have no spare disk to try these options.

Michael

MAALATFT at 2007-7-6 22:04:18 > top of Java-index,Solaris Operating System,Solaris 10 Features...
# 8
Looks like the above worked. I also had to do format and then label but my disk is now at it's right size.Thank you!
charles_chachi at 2007-7-6 22:04:18 > top of Java-index,Solaris Operating System,Solaris 10 Features...