Eddy - ZFSoL with single SSD

New About Yours API Help
13.3 KB, Plain text

I know ZFS on Linux is out of scope in BSDNow, but I was hoping to get some help from Allan on the subject since he has some experience.

I added a 500GB Samsung 850 EVO SSD in my LinuX laptop with the intent to configure ZFS on it so I can have 2 data sets:
-  zssd/feodora/data for various non-sensitive data (read I can live with losing that data even if I payed money for it)
- a backup dataset for backup purposes
I don't consider root on ZFS since I am aware the support is not that mature on Linux, much less in the Ubuntu 16.04 LTS version of ZFSoL.

I already created the data data set and my zpool has only the SSD partition (no block duplication confgured, no redundancy). See listing at the bottom on the current config and SW versions.

I am aware that SSDs perform better if they are not filled to the max, so what I typically do with SSDs is to partition them to about 85% of their capacity (I know ideal is around 20-25%).

I did the same for the ZFS pool zssd and added just that parition to the zssd pool and nothing else.

Since this pool is in the feodora laptop (but I have 1 more SATA slot and 1 M2 slots available for future expansion), I intend to have only SSDs as physical devices forming the zpool. I did some tuning accoriding to what I understood here and there, but I suspect they are not optimal.

My questions are:
0) What should I be carefull about in the ZFS on Linux implementation? Is there something significant missing that I should be aware of?
1) I saw most (all?) guides recommend giving ZFS raw devices, but is there another way to ensure a maximum of say 85% usage on the actual SSD(s) than using partitions?
2) how can I tune the zssd pool to better match the storage on SSDs (not kill it prematurely, TRIM support)?
2.1) How do I better tune the dataset and zpool(?) to not kwhen I know the typical access for zssd/data is very seldom additions of new data and seldom reads (almost no removes)
2.2) How can I tune/configure zssd/backup to ensure redundancy (except in case of SSD genral failure). Does this make sense, or are SSDs known to fail entirely al of a suddnen so I just kill storage with duplication on the same physical device?
2.3) I saw TRIM support seems to be experimental on Linux, and I suspect my Ubuntu 16.04 LTS version is already too old.Does it make sense to try to install a newer backported version?
3) In the case I add more SSDs to may laptop, how should add that to the zpool to get redundancy? Can I change the vdev or do I need to create a new one an migrate the data? I am tempted to go for raidz1/raidz2 depending on how many SSDs I buy, instead of raid1 based redundancy.
3.1) I heard that raidz1-3 are not that flexible as raid10 (raid0 over raid1 vdevs). Is this true?
4) I am thinking of building/buying a low cost home server running FreeNAS to allow me replication of the datasets above and some other datasets with family pictures, albums, etc. Performance sholdn't be a huge concern, so I am considering HDDs in the zpool. Since I am in Romania and buying from IXSystems would be risky (and maybe not possible), do you recommend I start from a regular consumer server offer for something like Dell or HP, or should I focus on the recommendation of te FreeNAS community, even if that means buying SH motherboard, ECC RAM and processor, but new HDDs?

Thanks in advance.

eddy@feodora:~$ uname -a
Linux feodora 4.4.0-112-generic #135-Ubuntu SMP Fri Jan 19 11:48:36 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

eddy@feodora:~$ dpkg -l | grep zfs
ii  libzfs2linux                                                    amd64        Native OpenZFS filesystem library for Linux
ii  zfs-doc                                                         all          Native OpenZFS filesystem documentation and examples.
ii  zfs-zed                                                         amd64        OpenZFS Event Daemon (zed)
ii  zfsutils-linux                                                  amd64        Native OpenZFS management utilities for Linux

eddy@feodora:~$ sudo zpool status zssd 
  pool: zssd
 state: ONLINE
  scan: none requested

    NAME                                    STATE     READ WRITE CKSUM
    zssd                                    ONLINE       0     0     0
      74d5dbfc-2b79-46f8-b6f1-015577f26d59  ONLINE       0     0     0

errors: No known data errors

eddy@feodora:~$ ll /dev/disk/by-partuuid/ | grep 74d5dbfc-2b79-46f8-b6f1-015577f26d59
lrwxrwxrwx 1 root root  10 ian 23 23:03 74d5dbfc-2b79-46f8-b6f1-015577f26d59 -> ../../sdb1
eddy@feodora:~$ sudo hdparm -i /dev/sdb


 Model=Samsung SSD 850 EVO 500GB, FwRev=EMT02B6Q, SerialNo=S2RBNXAH298767E
 Config={ Fixed }
 RawCHS=16383/16/63, TrkSize=0, SectSize=0, ECCbytes=0
 BuffType=unknown, BuffSize=unknown, MaxMultSect=1, MultSect=1
 CurCHS=16383/16/63, CurSects=16514064, LBA=yes, LBAsects=976773168
 IORDY=on/off, tPIO={min:120,w/IORDY:120}, tDMA={min:120,rec:120}
 PIO modes:  pio0 pio1 pio2 pio3 pio4 
 DMA modes:  mdma0 mdma1 mdma2 
 UDMA modes: udma0 udma1 udma2 udma3 udma4 udma5 *udma6 
 AdvancedPM=no WriteCache=enabled
 Drive conforms to: unknown:  ATA/ATAPI-2,3,4,5,6,7

 * signifies the current active mode

eddy@feodora:~$ sudo zfs list zssd
zssd               zssd/feodora       zssd/feodora/data  
eddy@feodora:~$ sudo zfs list zssd/feodora/data 
zssd/feodora/data  47,6G   332G  47,6G  /data

eddy@feodora:~$ sudo zfs get "all" zssd
NAME  PROPERTY              VALUE                 SOURCE
zssd  type                  filesystem            -
zssd  creation              Vi ian 12  0:37 2018  -
zssd  used                  47,6G                 -
zssd  available             332G                  -
zssd  referenced            19K                   -
zssd  compressratio         1.00x                 -
zssd  mounted               no                    -
zssd  quota                 none                  default
zssd  reservation           none                  default
zssd  recordsize            128K                  default
zssd  mountpoint            none                  local
zssd  sharenfs              off                   default
zssd  checksum              on                    default
zssd  compression           lz4                   local
zssd  atime                 off                   local
zssd  devices               on                    default
zssd  exec                  on                    default
zssd  setuid                on                    default
zssd  readonly              off                   default
zssd  zoned                 off                   default
zssd  snapdir               hidden                default
zssd  aclinherit            restricted            default
zssd  canmount              on                    default
zssd  xattr                 on                    default
zssd  copies                1                     default
zssd  version               5                     -
zssd  utf8only              off                   -
zssd  normalization         none                  -
zssd  casesensitivity       sensitive             -
zssd  vscan                 off                   default
zssd  nbmand                off                   default
zssd  sharesmb              off                   default
zssd  refquota              none                  default
zssd  refreservation        none                  default
zssd  primarycache          all                   default
zssd  secondarycache        all                   default
zssd  usedbysnapshots       0                     -
zssd  usedbydataset         19K                   -
zssd  usedbychildren        47,6G                 -
zssd  usedbyrefreservation  0                     -
zssd  logbias               latency               default
zssd  dedup                 off                   default
zssd  mlslabel              none                  default
zssd  sync                  standard              default
zssd  refcompressratio      1.00x                 -
zssd  written               19K                   -
zssd  logicalused           47,7G                 -
zssd  logicalreferenced     9,50K                 -
zssd  filesystem_limit      none                  default
zssd  snapshot_limit        none                  default
zssd  filesystem_count      none                  default
zssd  snapshot_count        none                  default
zssd  snapdev               hidden                default
zssd  acltype               off                   default
zssd  context               none                  default
zssd  fscontext             none                  default
zssd  defcontext            none                  default
zssd  rootcontext           none                  default
zssd  relatime              on                    local
zssd  redundant_metadata    all                   default
zssd  overlay               off                   default

eddy@feodora:~$ sudo zfs get "all" zssd/feodora/data 
NAME               PROPERTY              VALUE                 SOURCE
zssd/feodora/data  type                  filesystem            -
zssd/feodora/data  creation              Vi ian 12  0:54 2018  -
zssd/feodora/data  used                  47,6G                 -
zssd/feodora/data  available             332G                  -
zssd/feodora/data  referenced            47,6G                 -
zssd/feodora/data  compressratio         1.00x                 -
zssd/feodora/data  mounted               yes                   -
zssd/feodora/data  quota                 none                  default
zssd/feodora/data  reservation           none                  default
zssd/feodora/data  recordsize            128K                  default
zssd/feodora/data  mountpoint            /data                 local
zssd/feodora/data  sharenfs              off                   default
zssd/feodora/data  checksum              on                    default
zssd/feodora/data  compression           lz4                   inherited from zssd
zssd/feodora/data  atime                 off                   inherited from zssd
zssd/feodora/data  devices               on                    default
zssd/feodora/data  exec                  on                    default
zssd/feodora/data  setuid                on                    default
zssd/feodora/data  readonly              off                   default
zssd/feodora/data  zoned                 off                   default
zssd/feodora/data  snapdir               hidden                default
zssd/feodora/data  aclinherit            restricted            default
zssd/feodora/data  canmount              on                    default
zssd/feodora/data  xattr                 on                    default
zssd/feodora/data  copies                1                     default
zssd/feodora/data  version               5                     -
zssd/feodora/data  utf8only              off                   -
zssd/feodora/data  normalization         none                  -
zssd/feodora/data  casesensitivity       sensitive             -
zssd/feodora/data  vscan                 off                   default
zssd/feodora/data  nbmand                off                   default
zssd/feodora/data  sharesmb              off                   default
zssd/feodora/data  refquota              none                  default
zssd/feodora/data  refreservation        none                  default
zssd/feodora/data  primarycache          all                   default
zssd/feodora/data  secondarycache        all                   default
zssd/feodora/data  usedbysnapshots       1K                    -
zssd/feodora/data  usedbydataset         47,6G                 -
zssd/feodora/data  usedbychildren        0                     -
zssd/feodora/data  usedbyrefreservation  0                     -
zssd/feodora/data  logbias               throughput            local
zssd/feodora/data  dedup                 off                   default
zssd/feodora/data  mlslabel              none                  default
zssd/feodora/data  sync                  standard              default
zssd/feodora/data  refcompressratio      1.00x                 -
zssd/feodora/data  written               1K                    -
zssd/feodora/data  logicalused           47,7G                 -
zssd/feodora/data  logicalreferenced     47,7G                 -
zssd/feodora/data  filesystem_limit      none                  default
zssd/feodora/data  snapshot_limit        none                  default
zssd/feodora/data  filesystem_count      none                  default
zssd/feodora/data  snapshot_count        none                  default
zssd/feodora/data  snapdev               hidden                default
zssd/feodora/data  acltype               off                   default
zssd/feodora/data  context               none                  default
zssd/feodora/data  fscontext             none                  default
zssd/feodora/data  defcontext            none                  default
zssd/feodora/data  rootcontext           none                  default
zssd/feodora/data  relatime              on                    inherited from zssd
zssd/feodora/data  redundant_metadata    all                   default
zssd/feodora/data  overlay               off                   default
Pasted 10 months, 3 weeks ago — Expires in 40 days
URL: http://dpaste.com/0MTXYJN