Hi RNSC,

I've just caught up with this posting. Sorry for the delay.

I can't comment on all the problems that you ran into recently with
your disk labeling but I apologize that this was difficult.

I'm unclear the Solaris release you are running so I'll point you
to some general Solaris information and address the following issues:

- A Solaris x86 system needs a Solaris fdisk partition, which is the 
"outside" partition. The Solaris installation tool creates a Solaris
fdisk partition automatically. If you just want to add a new disk on a 
x86 system, then review this section:

http://docs.sun.com/app/docs/doc/819-2723/disksxadd-38159?a=view

- The Solaris installer only overwrite disks that are identified
during the installation as the installation disk or disk(s). It won't
touch other disks that are attached to the system.

- A ZFS storage pool can be created with whole disks instead of a disk
with slices but using whole disks creates an EFI label. That is why you 
saw the starting sector of 34 and you can't have overlapping slices with 
an EFI label. The EFI label is described here:

http://docs.sun.com/app/docs/doc/819-2723/disksconcepts-14?a=view

- This section describes the fdisk requirement for x86 and describes
the slices for both SPARC and x86 systems.

http://docs.sun.com/app/docs/doc/819-2723/disksconcepts-20068?a=view

This section should also clear up the confusion about which slices are
reserved for x86 booting that can't be used for other purposes, even
if the disk won't be used for booting.

- If you want to boot from a ZFS storage pool then you must have a
VTOC label. VTOC is identified by cylinders, EFI by sectors.

- If ZFS doesn't understand what the label is, then creating a new
label (even if it is a DOS label), helped. If your dd syntax had
worked, then this step would have been unnecessary. See the next point.

- You can access a device by the raw or block interface. If you want to
dd to c4d0, then you would need to use c4d0s0. These interfaces are
symlinked to the physical device and are explained here:
http://docs.sun.com/app/docs/doc/819-2723/devaccess-90138?a=view

- You also ran into a device-in-use checking feature that won't let
you trample a device in use. This feature is described here:
http://docs.sun.com/app/docs/doc/819-2723/gcajq?a=view

You might try the simplified OpenSolaris installer that makes many
of these issues go away. If this is what you were using and ran into
the above problems, then we need to know more about your process.

Regards,

Cindy

*******************************************************************


Alan,

Thanks for the offer. I got things going, but there are still many 
things I am not clear on. Perhaps you can make a few comments to take me 
a little further.

If anyone who is responsible for documentation is reading, IMHO there is 
some good insight into problems here, as well as some recommendations to 
fix it. I think only a few well placed words and a paragraph or two in 
the administration manual could make an enormous difference.

My confusion stemmed from my "knowing too much" and IMHO lack of clarity 
as to what is required to add a new disk. The existing documentation has 
good mainline examples, but too little explaining what is going on.

Traditionally UNIX systems have had their own label, predating the DOS 
partitions. I have no desire to run DOS, so I was trying to use a UNIX 
label. So I did not run fdisk. Much Solaris documentation that I have 
run across speaks only to SPARC systems which appear to label the disk 
directly without a DOS partition table (of course), so I figured this 
was one of the choices, like FreeBSD which can build on the raw disk or 
in a DOS partition. I have come to the conclusion that x86 Solaris 
always builds on a DOS partition. I should have been clued in by the 
ability to dual boot, and the use of grub, but I don't want to do that 
so I did not think about it.

When I tried to label the disk, I would be told that another application 
was using the disk, and could not get anywhere. This may have been after 
I tried zeroing the disk, since in the past I have had trouble with 
corrupted labels and partition tables on various systems.

Evidently /dev/rdsk/c4d0 is not the raw device, again as it had been on 
traditional UNIX's. I am used to being able to dd to a raw device. With 
Solaris it is a symbolic link, but pointing to what I don't know. When I 
dd -if=/dev/rdsk/c4d0, it replaced the symbolic link with a normal file 
full of zeros. Not helpful. Now I wonder if one can get at the raw disk 
in Solaris!

So I reinstalled Solaris, thinking that I probably messed up the system 
by trashing c4d0. The new system did not even HAVE a c4d0! I suspect 
that in my travels that I had put another kind of label on it at some 
point...I remember "EFI" but don't know what it means, or how I did 
that. Perhaps this created other /dev entries that are not needed with a 
DOS label. Fine, but if I did that, why couldn't I make slices?

Back to my newly installed system, label still would not label of 
course, so I booted knoppix and wrote zeros for a few dozen megabytes. 
When I booted, there was a message saying that something was corrupted, 
using a backup. Foiled again. So I booted knoppix and wrote 960GB to my 
suite of 6 drives. Took a long time, but for sure I zeroed everything on 
the disk.

Then I noticed that some of the system configuration had not been lost 
when I reinstalled it. Evidently the installer did NOT erase the disk 
and do a clean install! I wanted to start clean so that I knew that my 
previous bumbling was not causing be problems. So I zero'ed the system 
disk (not one of the 6) and reinstalled. Nothing survived.

Still didn't work. Do I broke down and created a DOS partition table. It 
still was not happy, but now it let me label it. Once labeled, I created 
my slices and I am up now.

Along the way sometimes format/partition (to create slices) worked in 
sectors (blocks), sometimes in cylinders. I have no clue why. Also, 
sometimes when it was in "sector" mode it insisted on starting a sector 
34 sometimes at 256. I don't know what changed it.

It will not let me use two "reserved" cylinders, which must be different 
that "Alternates" since the alternates show in the cylinder numbers I 
can allocation, whereas the reserved don't. I wonder what either of 
these are, since defect management has been internal to drives for a 
good 20 years! Or given that they are there for historical reasons, what 
the difference is! The bad-block table used to be in the last cylinder 
(or was it track?) but that does not account for TWO!

It insists on having cylinder 0 for boot and 1-2 for alternates, even 
though I am using the disk for ZFS and will never boot it, and will not 
let me overlap it...except it lets slice 2. It obviously has a bunch of 
historical rules built in that one has to deduce and work around.

SO, if you want to comment on anything, it will help build my understanding.

So I found a narrow way, and if I follow it I can make it work. But 
there is alot going on here that I don't know about, and I am concerned 
that I could fall off the path on either side and not be able to fix it. 
How is one to know all of these things? Shouldn't it be in the man page 
for format, or the system administration manual?

IMHO it would be very helpful if the format man page and/or appropriate 
administration manual had a brief explanation of how Solaris does 
things, and what the choices are. If it is different for x86 vs SPARC, 
tell the reader! "write a new label to the current disk" does not give 
enough information given the complexity and evident multiple schemes. 
Not a long spread out book, perhaps a paragraph per-category/choice.

There is no apparent provision to zero out / blow away / totally replace 
either a DOS partition table or a label. If one has a disk with a 
corrupt / defective one, there is no way to fix it (that I can find) 
without a knoppix CD. This should not be. ******* Add a commands to 
"format" to totally overwrite both (partition table and label). *******

I don't know the difference between "label" at the "format" level vs. 
inside "partition". Inside "partition" it clearly seems to write the 
"current" label... make changes, save. The outside one... is it the same 
context? If you exit "partition", can you save it at the "format" level, 
or is it gone? Or does the one at the "format" level simply write a 
template one? Or what?

Having been using UNIX on an off for a long time, I understand that this 
"mess" is due to evolution over 30 years, but a very few well chosen 
words in the various internal help messages, the format man page, and 
the administration documentation would make it clear and usable WITHOUT 
any changes in how it works ... just give the user a hint what is going on!

Hope somebody is listening! Thanks for reading if you got this far.

Reply via email to