[zfs-discuss] Data loss possibility due to ongoing disk writes?

Edmund White ed at ewwhite.net
Fri Apr 15 13:46:28 EDT 2016


You may need to re-create your pool using the ashift=12 property. 

Sent from my iPad

> On Apr 15, 2016, at 12:44 PM, Effrem Norwood via zfs-discuss <zfs-discuss at list.zfsonlinux.org> wrote:
> 
> Hi All,
> 
> I am a long time user of ZFS on Solaris but new to ZFS on Linux. I installed zfs-0.6.5.6 on both Centos 6.7 and Centos 7.0 and noticed some disk write behavior on both that appears concerning. I am hoping someone can help explain what I am seeing please. Extended data on my setup is at the end of this message.
> 
> I have a raidz2 pool of 10 x SATA disks (512e) with a 240G SATA SSD (512n) as cache. I copy a 500MB file 10 times while observing the output of zpool iostat -v 1. The copy says the operation completes in 6 seconds but the zpool is clearly still being written to for 30 seconds after that.
> 
> If power were to fail after the copy says it's done, clearly the data isn't yet written to disk. Is that right? Am I correct that I would lose data in this case? Is this behavior as expected? On our Solaris systems, the disks stop being busy at the same time the copy command completes which is what I would expect.
> 
> If I make sync=always, performance is killed even if I add a SSD as a log device. Further, if I leave the log device in the pool when sync=standard, it for some reason does not get used at all which also seems odd to me.
> 
> Many thanks in advance,
> 
> Effrem Norwood
> 
> <extended data>
> pool 10 x SATA = HGST HTS721010A = 512e (they are 4K native)
> cache 1 x SSD = SanDisk SDSSDXP = 512N
> pool ashift = 12
> pool is raidz2
> 
> pool  type                  filesystem             -
> pool  creation              Fri Apr 15 12:57 2016  -
> pool  used                  11.7G                  -
> pool  available             6.68T                  -
> pool  referenced            5.83G                  -
> pool  compressratio         1.00x                  -
> pool  mounted               yes                    -
> pool  quota                 none                   default
> pool  reservation           none                   default
> pool  recordsize            128K                   default
> pool  mountpoint            /qpool                 default
> pool  sharenfs              off                    default
> pool  checksum              on                     default
> pool  compression           lz4                    local
> pool  atime                 on                     default
> pool  devices               on                     default
> pool  exec                  on                     default
> pool  setuid                on                     default
> pool  readonly              off                    default
> pool  zoned                 off                    default
> pool  snapdir               hidden                 default
> pool  aclinherit            restricted             default
> pool  canmount              on                     default
> pool  xattr                 on                     default
> pool  copies                1                      default
> pool  version               5                      -
> pool  utf8only              off                    -
> pool  normalization         none                   -
> pool  casesensitivity       mixed                  -
> pool  vscan                 off                    default
> pool  nbmand                off                    default
> pool  sharesmb              off                    default
> pool  refquota              none                   default
> pool  refreservation        none                   default
> pool  primarycache          all                    default
> pool  secondarycache        all                    default
> pool  usedbysnapshots       0                      -
> pool  usedbydataset         5.83G                  -
> pool  usedbychildren        5.83G                  -
> pool  usedbyrefreservation  0                      -
> pool  logbias               latency                default
> pool  dedup                 off                    default
> pool  mlslabel              none                   default
> pool  sync                  standard               default
> pool  refcompressratio      1.00x                  -
> pool  written               5.83G                  -
> pool  logicalused           11.6G                  -
> pool  logicalreferenced     5.82G                  -
> pool  filesystem_limit      none                   default
> pool  snapshot_limit        none                   default
> pool  filesystem_count      none                   default
> pool  snapshot_count        none                   default
> pool  snapdev               hidden                 default
> pool  acltype               off                    default
> pool  context               none                   default
> pool  fscontext             none                   default
> pool  defcontext            none                   default
> pool  rootcontext           none                   default
> pool  relatime              off                    default
> pool  redundant_metadata    all                    default
> pool  overlay               off                    default
> 
> 
> NAME   PROPERTY                    VALUE                       SOURCE
> pool  size                        9.06T                       -
> pool  capacity                    0%                          -
> pool  altroot                     -                           default
> pool  health                      ONLINE                      -
> pool  guid                        3370153816024765931         default
> pool  version                     -                           default
> pool  bootfs                      -                           default
> pool  delegation                  on                          default
> pool  autoreplace                 off                         default
> pool  cachefile                   -                           default
> pool  failmode                    wait                        default
> pool  listsnapshots               off                         default
> pool  autoexpand                  off                         default
> pool  dedupditto                  0                           default
> pool  dedupratio                  1.00x                       -
> pool  free                        9.05T                       -
> pool  allocated                   15.3G                       -
> pool  readonly                    off                         -
> pool  ashift                      0                           default
> pool  comment                     -                           default
> pool  expandsize                  -                           -
> pool  freeing                     0                           default
> pool  fragmentation               0%                          -
> pool  leaked                      0                           default
> pool  feature at async_destroy       enabled                     local
> pool  feature at empty_bpobj         active                      local
> pool  feature at lz4_compress        active                      local
> pool  feature at spacemap_histogram  active                      local
> pool  feature at enabled_txg         active                      local
> pool  feature at hole_birth          active                      local
> pool  feature at extensible_dataset  enabled                     local
> pool  feature at embedded_data       active                      local
> pool  feature at bookmarks           enabled                     local
> pool  feature at filesystem_limits   enabled                     local
> pool  feature at large_blocks        enabled                     local
> 
> _______________________________________________
> zfs-discuss mailing list
> zfs-discuss at list.zfsonlinux.org
> http://list.zfsonlinux.org/cgi-bin/mailman/listinfo/zfs-discuss


More information about the zfs-discuss mailing list