Trying to create ZFS slice on rpool

I have a 240GB disk as rpool. I have installed Solaris 11.3 to a partition which is 110GB. Now I have another 130GB which is unallocated. I want to use that additional space as a temporary folder to be shared between Solaris and Linux. The additional space had no /dev/dsk/c2t4... entry so I used gparted to create an empty unformatted partition. Gparted shows the unformatted space to be: c2t4d0p3

Now I try to turn that unformatted space into a zfs slice. But it doesnt work. Anyone have a clue why? Is it because this slice is one the same disk as rpool? So I cannot rename the slice to OCZVERTEX3_240GB because the correct name is "rpool"?

# zpool create -n -o version=28 -O version=5 OCZVERTEX3_240GB c2t4d0p3
Unable to build pool from specified devices: cannot open '/dev/dsk/c2t4d0p3': I/O error

Here we have

#prtvtoc /dev/rdsk/c2t4d0
* /dev/rdsk/c2t4d0 partition map
*
* Dimensions:
*     512 bytes/sector
* 468862128 sectors
* 468862061 accessible sectors
*
* Flags:
*   1: unmountable
*  10: read-only
*
* Unallocated space:
*    First     Sector    Last
*    Sector     Count    Sector 
*          34       222       255
*   468840960      4608 468845567
*   468861952       142 468862093
*
*                          First     Sector    Last
* Partition  Tag  Flags    Sector     Count    Sector  Mount Directory
       0      4    00        256 230686720 230686975
       1     12    00  230686976    524288 231211263
       2     17    00  231211264 237629696 468840959
       8     11    00  468845568     16384 468861951

---------- Post updated 01-10-18 at 05:08 AM ---------- Previous update was 01-09-18 at 06:25 AM ----------

Ok, I did this to solve this problem.

I formatted the 130 GB space to NTFS from Windows, so the space was not unformatted anymore. Then I booted up Linux Mint 18.3 and installed ZFS on linux and created a zpool without problems.

Then I booted up Solaris 11.3 but "zpool import" said: the pool cannot be imported, recreate the pool. However, I see that "zpool import" reported "c2t4d0s2" instead of "c2t4d0p3". So I did a "zpool create tank c2t4d0s2" and now I can access the ZFS slice just fine. Problem solved. I wonder how I could have figured out the name of the zpool without creating a zfs slice in the first hand via Linux...

So anyone knows how I could find out the name of the zfs slice? The correct name was c2t4d0s2 but gparted reported c2t4d0p3...

It is unclear how your disk was/is divided.

You show prtvtoc output and the slices (s0, s1, s2,...) but not the lower level partions (p1, p2, p3,...) fdisk or gpt based, and their type.

Oh? What command could I have used to show correct disk information?

Here is a command to display MBR partitions under Solaris on x86:

fdisk -v -W - /dev/rdsk/c2t4d0p0

It shows this output? Is this what you had in mind?

# fdisk -v -W - /dev/rdsk/c2t4d0p0

* /dev/rdsk/c2t4d0p0 default fdisk table
* Dimensions:
*    512 bytes/sector
*     56 sectors/track
*    224 tracks/cylinder
*   37377 cylinders
*
* systid:
*    1: DOSOS12
*    2: PCIXOS
*    4: DOSOS16
*    5: EXTDOS
*    6: DOSBIG
*    7: FDISK_IFS
*    8: FDISK_AIXBOOT
*    9: FDISK_AIXDATA
*   10: FDISK_0S2BOOT
*   11: FDISK_WINDOWS
*   12: FDISK_EXT_WIN
*   14: FDISK_FAT95
*   15: FDISK_EXTLBA
*   18: DIAGPART
*   65: FDISK_LINUX
*   82: FDISK_CPM
*   86: DOSDATA
*   98: OTHEROS
*   99: UNIXOS
*  100: FDISK_NOVELL2
*  101: FDISK_NOVELL3
*  119: FDISK_QNX4
*  120: FDISK_QNX42
*  121: FDISK_QNX43
*  130: SUNIXOS
*  131: FDISK_LINUXNAT
*  134: FDISK_NTFSVOL1
*  135: FDISK_NTFSVOL2
*  165: FDISK_BSD
*  167: FDISK_NEXTSTEP
*  183: FDISK_BSDIFS
*  184: FDISK_BSDISWAP
*  190: X86BOOT
*  191: SUNIXOS2
*  238: EFI_PMBR
*  239: EFI_FS
*

* Id    Act  Bhead  Bsect  Bcyl    Ehead  Esect  Ecyl    Rsect      Numsect
  238   0    0      1      0       254    63     1023    1          468862127 
  0     0    0      0      0       0      0      0       0          0         
  0     0    0      0      0       0      0      0       0          0         
  0     0    0      0      0       0      0      0       0          0         

Okay, so you have an EFI GPT partitioned disk.

The last command shows there is just one single primary partition (p1) encompassing the whole disk.

Inside this partition, you have three slices, s0, s1, s2 and s8.

The system refused to use p3 because this partition exists but there are zero sector allocated to it, thus the I/O error.

As you found out, s2 is the 226 GiB partition you wanted.

How could you infer this information from the last command I tried? Why is not "s5" instead of "s8"?

There is no s5 defined.

The slices numbers were already known from your first command:

* Partition  Tag  Flags    Sector     Count    Sector  Mount Directory
       0      4    00        256 230686720 230686975
       1     12    00  230686976    524288 231211263
       2     17    00  231211264 237629696 468840959
       8     11    00  468845568     16384 468861951

Column "partition" (actually slices) but the term is equivalent when referring to the vtoc.

Here is your hard disk layout:

+--+---+---+
   |   |   |
   |   | s0| 118 GB
   |   |   |
   |   +---+
   |   | s1| 268 MB
   | p1+---+
   |   |   |
   |   | s2| 121 GB
   |   |   |
 p0|   +---+
   |   | s8|   8 MB
   +---+---+
   | p2|       0 bytes
   +---+
   | p3|       0 bytes
   +---+
   | p4|       0 bytes
+--+---+

Thanx, you are the man, Jilliagre! :slight_smile: