[zfs-discuss] ZFS, SSD mirror (without using whole disk)

Gordan Bobic gordan.bobic at gmail.com
Sat Jan 16 08:27:14 EST 2016


ZoL doesn't support TRIM yet regardless of whether you use full disks or partitions.

Additionally, in most cases you cannot use full disks anyway - even if you specify a raw block device zpool will create GPT partitions and use partition 1 for the pool.

There is no need to have separate /boot any more, grub2 supports ZFS, but make sure you don't enable unsupported feature flags.

On UEFI systems, you have to have a FAT partition (IIRC there is a minimum size for it, something like 260MB with 4KB sector disks, and 32MB for 512B sector disks, but don't quote me on that) for the boot loader, which is a giant leap backwards, sadly. If you use GPT partitions with legacy BIOS systems, you will also need to re-use partition 9 that zpool creates as a legacy BIOs boot partition, and get grub to install itself there.

All of this is covered in the howtos. Do what they say and you'll be OK.

On 16 Jan 2016 12:42 pm, fermulator via zfs-discuss <zfs-discuss at list.zfsonlinux.org> wrote:
>
> Hey all,
>
> I read here about ZFS's TRIM support on SSDs
> http://www.open-zfs.org/wiki/Features#TRIM_Support
>
> What I'm wondering is if we have a non-whole-disk utilization of ZFS on mirror pool consisting of 2x SSDs, can ZFS still issue TRIM commands to the underlying device?
> The SSDs are older, so I'm concerned about maintaining the health of the devices.
>
> For example, consider if we were running the root filesystem on ZFS mirror SSDs; this site does not currently discuss booting from whole-disk root volumes:
> https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-install-Ubuntu-14.04---15.04-to-a-Native-ZFS-Root-Filesystem
> so, at the moment, I've setup my root volume with a sliver for boot, the rest for ZFS... bad idea?
>
> $ sudo zpool status
>   pool: zfsmain
>  state: ONLINE
> status: Some supported features are not enabled on the pool. The pool can
>     still be used, but some features are unavailable.
> action: Enable all features using 'zpool upgrade'. Once this is done,
>     the pool may no longer be accessible by software that does not support
>     the features. See zpool-features(5) for details.
>   scan: none requested
> config:
>
>     NAME                                              STATE     READ WRITE CKSUM
>     zfsmain                                           ONLINE       0     0     0
>       mirror-0                                        ONLINE       0     0     0
>         ata-KINGSTON_SNV425S264GB_07MA20034453-part1  ONLINE       0     0     0
>         ata-KINGSTON_SNV425S264GB_07MA20035331-part1  ONLINE       0     0     0
>
> errors: No known data errors
>
>   pool: zstorage
>  state: ONLINE
>   scan: none requested
> config:
>
>     NAME                                           STATE     READ WRITE CKSUM
>     zstorage                                       ONLINE       0     0     0
>       mirror-0                                     ONLINE       0     0     0
>         ata-WDC_WD6400AAKS-00A7B2_WD-WCASY7751034  ONLINE       0     0     0
>         ata-WDC_WD6400AAKS-00A7B2_WD-WMASY5518479  ONLINE       0     0     0
>
> errors: No known data errors
>
> $ sudo gdisk /dev/disk/by-id/ata-KINGSTON_SNV425S264GB_07MA20034453
> GPT fdisk (gdisk) version 0.8.8
>
> Partition table scan:
>   MBR: protective
>   BSD: not present
>   APM: not present
>   GPT: present
>
> Found valid GPT with protective MBR; using GPT.
>
> Command (? for help): p
> Disk /dev/disk/by-id/ata-KINGSTON_SNV425S264GB_07MA20034453: 125045424 sectors, 59.6 GiB
> Logical sector size: 512 bytes
> Disk identifier (GUID): 4E92D2E6-B310-4EC9-9652-319DC6336612
> Partition table holds up to 128 entries
> First usable sector is 34, last usable sector is 125045390
> Partitions will be aligned on 2048-sector boundaries
> Total free space is 2669 sectors (1.3 MiB)
>
> Number  Start (sector)    End (sector)  Size       Code  Name
>    1            2048       125028351   59.6 GiB    8300  zfs
>    2       125028352       125044735   8.0 MiB     EF02  grub
>
> Command (? for help): q
>


More information about the zfs-discuss mailing list