Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Hard-drive label information

30 views
Skip to first unread message

Dan...@innocent.com

unread,
May 20, 1999, 3:00:00 AM5/20/99
to
I'm using Solaris 2.6 and I was wondering if there is a
command or command string that will destroy/erase
the label information on my SCSI hard-drive. The drive
is a Cheetah class hard-drive by Seagate. From what I understand,
using 'Label' under Solaris's Format utility will
accomplish this but, I wanted a more direct, command-
line method. Thank you, in advance.


--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---

Andrew Gabriel

unread,
May 20, 1999, 3:00:00 AM5/20/99
to
[REPOSTED WITH MAJOR CORRECTION !!!!]

In article <7i1i0v$93r$1...@nnrp1.deja.com>,


Dan...@innocent.com writes:
>I'm using Solaris 2.6 and I was wondering if there is a
>command or command string that will destroy/erase
>the label information on my SCSI hard-drive. The drive
>is a Cheetah class hard-drive by Seagate. From what I understand,
>using 'Label' under Solaris's Format utility will
>accomplish this but, I wanted a more direct, command-
>line method. Thank you, in advance.

On sparc you need to zap the first sector of the disk,
on x86 you need to zap the second sector of the Solaris
fdisk partition.

You need to identify a slice which starts at the beginning
of the disk (sparc) or Solaris fdisk partiton (x86).
Normally, the s2 slice will, and probably the s0 slice too.

sparc: dd if=/dev/zero of=/dev/dsk/cXtXdXs2 bs=512 count=1
x86: dd if=/dev/zero of=/dev/dsk/cXtXdXs2 bs=512 count=1 oseek=2

If the existing label is duff, on x86 you can use the fdisk
partition device instead (p1 - p4 for the 4 primary fdisk
partitions - MAKE SURE YOU GET THE RIGHT ONE AND DONT USE p0 !!!).
On sparc you are stuffed if the label is vaguely plausable but
corrupt as disk driver won't allow any access whatsoever - I take
the disk out and put it in an x86 machine at this point to zap it.

*** Request for enhancement to Sun ***

Please Sun, add a device node on sparc which allows access to
a disk completely ignoring whatever [duff] info is in the label,
like the p0 device on Solaris x86 - it's rather useful. Also,
it would be useful if the ioctls for writing label fields would
work on disks which have recognisable but corrupt labels - on
sparc there is currently no way to recover from this situation
that I know of as a recognisable but corrupt label results in sd
refusing any further access to the disk at all, even corrective
actions.

--
Andrew Gabriel
Consultant Software Engineer


0 new messages