Solaris 11 disk issue

I have 2 disks in my system.I recently added a zpool to the disk, but today I changed my mind and deleted the zpool ,
zpool destroy -f extra

The zpool is now deleted and I want to partition the disk, so I delete the only partition on the disk.

Now when I run format again,

format
Searching for disks...done


AVAILABLE DISK SELECTIONS:
       0. c7d0 <SAMSUNG-S14JJ9DP72414-0001-149.05GB>
          /pci@0,0/pci-ide@1f,2/ide@0/cmdk@0,0
       1. c8d1 <drive type unknown>
          /pci@0,0/pci-ide@1f,2/ide@1/cmdk@1,0

Specify disk (enter its number): 1



AVAILABLE DRIVE TYPES:
        0. other

My issue is I can see the drive but I cannot access it (pressing 1)to partition it,I get the message above.Can anyone help?

Did you try create zpool again?

# zpool create extra c8d1

It should write new label to disk and then you could destroy pool and modify label with format

What platform is this?

What type of disk is it?

(depending on what type of disk it actually is, I would firstly "set all mode pages to default" using the format command. A disk drive is a highly programmable device and has a large number of on-board registers which define its behaviour. If these are left in a state of limbo by some operation, the drive might exhibit strange behaviour. Also, you should be able to write (or rewrite) a Sun label to the disk using format or even redefine its perceived geometry. Don't forget that you can invoke format with a -e switch (expert mode) which provides much more ammunition to tackle things. In expert mode make damned sure you select the right drive to work on otherwise you could alter working drives.)

Anyway, enough of all that. Post back answers to above questions.

Thank you all for the replies.I still am back at square one, at how to partition the disk,when I tried the last time, it told me I needed to delete the partition, then create the needed partitions ,but disk became inaccessible when I deleted the only partition.

I understand what you want, but now disk is inaccessible from format command. My advice is to create zpool again. It will write new label to disk. Then you must destroy zpool but label will still exist and disk will be accessible from format command.
Why did you delete partition before? Did you use fdisk subcommnd from format?
I usualy use format in different way.
First I check disk and then from menu select partition, then print and then you can see how disk is partitioned and by selecting number of partition you can change it.
It is x86, so you probably removed solaris main partition which is something different than solaris slice.

@GP81

Yes, as I said in my previous post, I was able to create the pool again, and it is now online. I can destroy the pool again and then be able to access the disk, but still am stuck at how to partition the disk.

Yes, I used fdisk subcommand, this is the disk after I created a label:

 Total disk size is 9725 cylinders
             Cylinder size is 16065 (512 byte) blocks

                                               Cylinders
      Partition   Status    Type          Start   End   Length    %
      =========   ======    ============  =====   ===   ======   ===
          1                 EFI               0  9725    9726    100

I want to know how can I create a couple partitions.

It seems you are confusing partitions and file systems here. You certainly can create new file systems in your existing ZFS pool and dedicate them to NFS, SMB or whatever you want.

@jlliagre

So basically what your saying is that I cannot create a partition and then assign that partition to a zpool?

I know I can create filesystems in my zpool and assign SMB or NFS to it, but that is easy. I want to create partitions and then assign respective partitions to different zpools, then create filesystems.

---------- Post updated at 06:12 PM ---------- Previous update was at 05:43 PM ----------

Ok, well after some testing it seems like partitions cannot be used to create zpools, only disk. So I guess I found my answer. Thank you all for helping

That's not what I wrote. You certainly can create partitions and have zpools using then as underlying devices if you think that's the best solution for you.

What's wrong with "easy" ??

You can do that, although that would be suboptimal (less flexibility, less performance).

This is incorrect.
You can create zpools from whole disks, primary and extended partitions, slices and plain files.

@jlliagre

Easy is not what I want, that is what's wrong with it.

Well , it maybe I am incorrect, even though I cant find anywhere online of how to create zpools from different partitions of ONE disk.If this is true you seem to know the answer but not willing to share ,so does anyone know how to do this?

The process is very simple:

  • Using format --> fdisk, destroy the EFI partition, then create, assuming you want a
    regular MBR layout, a Solaris 2 MBR partition, and make sure it is active.
  • Create whatever partition you want using format --> partition. Label the disk to save the
    new VTOC.
  • Then simply create a zpool specifying the slice you want to use. For example, if you
    are using a second IDE disk and you wish to use slice 0, you would specify c0d1s0.
# zpool create mypool c0d1s0

I think that you confuse partition and slice. Partition is for DOS system where we have primary and extended partition and so on.
Now when you destroy your zpool you have that kind of partition but you must to divide it to slices.
You can see the current slice structure by using

# prtvtoc /dev/dsk/c8d1s2

I'm not sure suffix s2, so test it with or without.

To create new slices you must use subcommand partition from format.
Procedure is as follows:

  1. execute format
  2. select your disk c8d1
  3. select partition or abbreviation p
  4. select print or p to see how is now disk divided
  5. select 0 and change parameters of slice 0
  • name
  • mode
  • start sector
  • length
    5.a. Repeat this steps with next slices.
  1. after you create all new slices select label or l to write new label to disk.
    7.after all nescessary confirmation exit from format with double q.

Now you should have some slices on your disk.
Use prtvtoc to see the difference between previous and current state.
You can use that slices to create zpools.
For example:

# zpool create newpool1 c8d1s0

@everyone....

But surely, unless something has changed in Solaris 11 x86, you can't set up 'slices' on a disk with a EFI label. cbtshare has posted a display of the disk label showing it as EFI which is what it would be having been in a zfs pool. Doesn't the label need to be changed to SMI before you can write a sliced disk table?

Also, my understanding is that EFI labels and SMI labels put their partition tables in different locations (starting disk sectors) so utilities for one of the labels may not work at all on a disk with the other label (often displaying 'unknown')

I am not certain that I am right on this hence invite comments from everyone on this thread.

SunBlog: Changing a disk label (EFI / SMI)

---------- Post updated at 10:24 AM ---------- Previous update was at 10:12 AM ----------

Just Googled and found this....

UNIX my first love...: EFI ( Extensible Firmware Interface) disk label & SMI (Sun Microsystems Inc) or VTOC disk label.

Does that work?

---------- Post updated at 10:49 AM ---------- Previous update was at 10:24 AM ----------

I reckon that, as per my previous post#3, it needs a Sun (SMI) label written to the disk.

@GP81

Thank you very much for the detailed explanation.

@everyone

I kinda did it a bit different , where I used the partiton to create a zpool.In format, fdisk I created 2 partitions on my disk( my disk c8d1, the partitions would then become p0 and p1)

so to add my zpool to partitions I simply:

root@SolarisServer:~# zpool create extra6 /dev/dsk/c8d1p1
root@SolarisServer:~# zpool create extra7 /dev/dsk/c8d1p2