Resize ZFS partition in RAID 1 && what is 8M Solaris reserved 1 && ZFS SLOG, L2ARC partition type?

mailinglists

Renowned Member
Mar 14, 2012
641
70
93
Hi,

i've got a standard ZFS RAID 1 PM 5 setup.
Code:
fdisk -l /dev/sda
Disk /dev/sda: 447.1 GiB, 480103981056 bytes, 937703088 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 2B009841-424C-4347-AA74-BA90804CE51A

Device         Start       End   Sectors  Size Type
/dev/sda1         34      2047      2014 1007K BIOS boot
/dev/sda2       2048 156285069 156283022 74.5G Solaris /usr & Apple ZFS
/dev/sda9  156285070 156301454     16385    8M Solaris reserved 1

There is lot's of disk space free on the disk.
While I think 80 GB should be fine for install, because I will use other disks for VM storage, i might reconsider increasing the partition size. What do you guys think?

I was thinking to do it by deleting the partition #1 and recreating the partition at same start but higher end.
But I am worried about this "8M Solaris reserved 1" partition which I need to move or delete. What is it for? Why does it have number 9 instead of 3? Can I just dd it's content and then recreate ad different location it and dd contents back?

I will use the some of the rest of disk space for SLOG and L2ARC for my VM storage pool.
Should I do something special for those two new partitions or just make sure i set the correct type (Solaris /usr & Apple ZFS)?

I see that on some servers i created slog and l2arc partitions types as "FreeBSD ZFS" instead of "Solaris /usr & Apple ZFS", but it seems to work. Should I do some extra work, disable slog and l2arc, delete the partitions and recreate everything? Or can I just change the partition type while in use?
 
Last edited:
How did you get it to use only 75 GB of space? Normally, ZFS uses all available space and it is not recommended to use ZFS besides something else.

The layout you showed is a simple ZFS boot disk and is correct. The last partition is AFAIK only for disk replacements that have not exactly the same amount of space, e.g. different vendors of a 1 TB disk might have slight differences in total disk capacity in bytes. You can just delete the partition 9, resize partition 2 and resize your pool (e.g. by removing and readding each disk after the scub). I've done this a couple of times and it works well.