2012-10-22 18:20, Gabriele Bulfon wrote:
...
Problem is, prtvtoc, format and so on prdocues quite hard output to
parse and decide.
Is there any other simpler tool that already output usable slices and sizes?
And any other simpler tool to create the needed slices?
Last but not least: am I forced to use Solaris format and slices in this
case? Or is there any other
partitioning scheme I could use to create more pools into a single disk?
You can use pthe command-line parted, the one in OpenIndiana is okay.
You can force it to use different units, like sectors, to produce
predictable output and ease sizing calculations; i.e. a couple of
disks from a Thumper (250Gb, one from data pool and one from rpool):
# parted /dev/dsk/c1t3d0p0 uni s pri
Model: Generic Ide (ide)
Disk /dev/dsk/c1t3d0p0: 488390625s
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 256s 488374207s 488373952s zfs
9 488374208s 488390591s 16384s
# parted /dev/dsk/c5t0d0p0 uni s pri
Model: Generic Ide (ide)
Disk /dev/dsk/c5t0d0p0: 488390625s
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Number Start End Size Type File system Flags
1 16065s 488375999s 488359935s primary solaris boot
For me, parted misses a few features of say linux fdisk, which allows
to arbitrarily set partition type bytes - but interactive grub can
often be used for that.
As for slicing, I thought ZFS requires the use of slices in a Solaris
partition in an MBR-or-GPT partition table, and creates such a table
if given a "whole disk" to use in a pool. I don't think Solaris core
and ZFS can use different partitions on one (MBR) disk, but you can
define several slices within one partition on the disk.
I reviewed the disks above with Solaris "format", and for the data
pool disk it does indeed define a GPT table with the two partitions
seen above also seen as slices for Solaris use:
partition> p
Current partition table (original):
Total disk sectors available: 488374207 + 16384 (reserved sectors)
Part Tag Flag First Sector Size Last Sector
0 usr wm 256 232.87GB 488374207
1 unassigned wm 0 0 0
2 unassigned wm 0 0 0
3 unassigned wm 0 0 0
4 unassigned wm 0 0 0
5 unassigned wm 0 0 0
6 unassigned wm 0 0 0
8 reserved wm 488374208 8.00MB 488390591
So, in fact, using GPT tables (not applicable to rpool disks) you can
do all the housekeeping with parted. Alternately, script calls to format
and parse its output :)
Partitioning for the boot disk ("Solaris" in MBR table) looks like usual:
partition> p
Current partition table (original):
Total disk cylinders available: 30397 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 root wm 1 - 30396 232.85GB (30396/0/0) 488311740
1 unassigned wu 0 0 (0/0/0) 0
2 backup wm 0 - 30396 232.85GB (30397/0/0) 488327805
3 unassigned wu 0 0 (0/0/0) 0
4 unassigned wu 0 0 (0/0/0) 0
5 unassigned wu 0 0 (0/0/0) 0
6 unassigned wu 0 0 (0/0/0) 0
7 unassigned wu 0 0 (0/0/0) 0
8 boot wu 0 - 0 7.84MB (1/0/0) 16065
9 unassigned wu 0 0 (0/0/0) 0
HTH,
//Jim Klimov
-------------------------------------------
illumos-discuss
Archives: https://www.listbox.com/member/archive/182180/=now
RSS Feed: https://www.listbox.com/member/archive/rss/182180/21175430-2e6923be
Modify Your Subscription:
https://www.listbox.com/member/?member_id=21175430&id_secret=21175430-6a77cda4
Powered by Listbox: http://www.listbox.com