1. 13 Nov, 2023 1 commit
  2. 12 Nov, 2023 1 commit
  3. 30 Oct, 2023 1 commit
  4. 03 Oct, 2023 2 commits
    • Alexander Motin's avatar
      Merge pull request #171 from truenas/NAS-124189-1 · fec7af50
      Alexander Motin authored
      NAS-124189 / 24.04 / Add '-u' - nomount flag for zfs set
      Unverified
      fec7af50
    • Umer Saleem's avatar
      Add '-u' - nomount flag for zfs set · 7257a437
      Umer Saleem authored
      
      This commit adds '-u' flag for zfs set operation. With this flag,
      mountpoint, sharenfs and sharesmb properties can be updated
      without actually mounting or sharing the dataset.
      
      Previously, if dataset was unmounted, and mountpoint property was
      updated, dataset was not mounted after the update. This behavior
      is changed in #15240. We mount the dataset whenever mountpoint
      property is updated, regardless if it's mounted or not.
      
      To provide the user with option to keep the dataset unmounted and
      still update the mountpoint without mounting the dataset, '-u'
      flag can be used.
      
      If any of mountpoint, sharenfs or sharesmb properties are updated
      with '-u' flag, the property is set to desired value but the
      operation to (re/un)mount and/or (re/un)share the dataset is not
      performed and dataset remains as it was before.
      Reviewed-by: default avatarAlexander Motin <mav@FreeBSD.org>
      Reviewed-by: default avatarBrian Behlendorf <behlendorf1@llnl.gov>
      Signed-off-by: default avatarUmer Saleem <usaleem@ixsystems.com>
      Closes #15322 
      7257a437
  5. 02 Oct, 2023 2 commits
  6. 28 Sep, 2023 8 commits
  7. 22 Sep, 2023 7 commits
    • Rob N's avatar
      tests/block_cloning: try harder to stay on same txg in fallback test · 5f306986
      Rob N authored
      
      We've observed this test failing intermittently. When it does, the
      "same block" check shows that both files have the same content, that is,
      the file was cloned.
      
      The only way this could have happened is if the open txg moved between
      the dd and clonefile calls. That's possible because although we set
      zfs_txg_timeout to be large, that only affects the wait time in the sync
      thread at the start of a new txg; it doesn't change anything if its
      currently waiting or working.
      
      So here we just force the txgs to move immediately before, which should
      get both operations onto the same txg as intented.
      
      Sponsored-By: OpenDrives Inc.
      Sponsored-By: Klara Inc.
      Reviewed-by: default avatarBrian Behlendorf <behlendorf1@llnl.gov>
      Signed-off-by: default avatarRob Norris Rob Norris <rob.norris@klarasystems.com>
      Closes #15303 
      5f306986
    • Rob N's avatar
      status: report pool suspension state under failmode=continue · a199cac6
      Rob N authored
      
      When failmode=continue is set and the pool suspends, both 'zpool status'
      and the 'zfs/pool/state' kstat ignore it and report the normal vdev tree
      state. There's no clear indicator that the pool is suspended. This is
      unlike suspend in failmode=wait, or suspend due to MMP check failure,
      which both report "SUSPENDED" explicitly.
      
      This commit changes it so SUSPENDED is reported for failmode=continue
      the same as for other modes.
      
      Rationale:
      
      The historical behaviour of failmode=continue is roughly, "press on as
      though all is well". To this end, the fact that the pool had suspended
      was not shown, to maintain the façade that all is well.
      
      Its unclear why hiding this information was considered appropriate. One
      possibility is that it was expected that a true pool fault would always
      be reported as DEGRADED or FAULTED, and that the pool could not suspend
      without these happening.
      
      That is not necessarily true, as vdev health and suspend state are only
      loosely connected, such that a pool in (apparent) good health can be
      suspended for good reasons, and of course a degraded pool does not lead
      to suspension. Even if that expectation were true, there's still a
      difference in urgency - a degraded pool may not need to be attended to
      for hours, while a suspended pool is most often unusable until an
      operator intervenes.
      
      An operator that has set failmode=continue has presumably done so
      because their workload is one that can continue to operate in a useful
      way when the pool suspends. In this case the operator still needs a
      clear indicator that there is a problem that needs attending to.
      
      Sponsored-by: Klara, Inc.
      Sponsored-by: Wasabi Technology, Inc.
      Reviewed-by: default avatarBrian Behlendorf <behlendorf1@llnl.gov>
      Signed-off-by: default avatarRob Norris <rob.norris@klarasystems.com>
      Closes #15297 
      a199cac6
    • Paul Dagnelie's avatar
      Fix occasional rsend test crashes · 729507d3
      Paul Dagnelie authored
      
      We have occasional crashes in the rsend tests. Debugging revealed 
      that this is because the send_worker thread is getting EINTR from 
      splice(). This happens when a non-fatal signal is received during 
      the syscall. We should retry the syscall, rather than exiting failure.
      Tweak the loop to only break if the splice is finished or we receive 
      a non-EINTR error.
      Reviewed-by: default avatarBrian Behlendorf <behlendorf1@llnl.gov>
      Reviewed-by: default avatarAhelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
      Signed-off-by: default avatarPaul Dagnelie <pcd@delphix.com>
      Closes #15273 
      729507d3
    • Rob N's avatar
      cmd: add 'help' subcommand to zpool and zfs · 3af63683
      Rob N authored
      
      'program help subcommand' is a reasonably common pattern for
      multifunction command-line programs. This commit adds support for that
      style to the zpool and zfs commands.
      
      When run as 'zpool help [<topic>]' or 'zfs help [<topic>]', executes the
      'man' program on the PATH with the most likely manpage name for the
      requested topic: "zpool-<topic>" or "zfs-<topic>" for subcommands, or
      "zpool<topic>" or "zfs<topic>" for the "concepts" and "props" topics.
      If no topic is supplied, uses the top "zpool" or "zfs" pages.
      Reviewed-by: default avatarBrian Behlendorf <behlendorf1@llnl.gov>
      Reviewed-by: default avatarKay Pedersen <mail@mkwg.de>
      Signed-off-by: default avatarRob Norris <robn@despairlabs.com>
      Closes #15288 
      3af63683
    • Paul Dagnelie's avatar
      Fix incorrect expected error in ztest · 9aa1a287
      Paul Dagnelie authored
      
      There is an occasional ztest failure that looks like ztest: attach 
      (/var/tmp/zloop-run/ztest.13a 570425344, draid1-1-0 532152320, 1) 
      returned 22, expected 95. This is because the value that we return 
      is EINVAL, but expected_error is set incorrectly.
      
      Change the expected_error value to match both the comment and the 
      actual error value.
      Reviewed-by: default avatarBrian Behlendorf <behlendorf1@llnl.gov>
      Signed-off-by: default avatarPaul Dagnelie <pcd@delphix.com>
      Closes #15295 
      9aa1a287
    • Paul Dagnelie's avatar
      Fix l2arc_apply_transforms ztest crash · cc75c816
      Paul Dagnelie authored
      
      In #13375 we modified the allocation size of the buffer that we use 
      to apply l2arc transforms to be the size of the arc hdr we're using, 
      rather than the allocation size that will be in place on the disk, 
      because sometimes the hdr size is larger. Unfortunately, sometimes 
      the allocation size is larger, which means that we overflow the buffer 
      in that case. This change modifies the allocation to be the max of 
      the two values
      Reviewed-by: default avatarMark Maybee <mark.maybee@delphix.com>
      Reviewed-by: default avatarBrian Behlendorf <behlendorf1@llnl.gov>
      Signed-off-by: default avatarPaul Dagnelie <pcd@delphix.com>
      Closes #15177
      Closes #15248 
      cc75c816
    • Rob N's avatar
      tests: install missing PAM tests · 1c2aee7a
      Rob N authored
      
      'pam_change_unmounted' and 'pam_recursive' both exist and are referenced
      by the test run config, but weren't being installed and so are excluded.
      This gets them installed so they will run as expected.
      Reviewed-by: default avatarBrian Behlendorf <behlendorf1@llnl.gov>
      Reviewed-by: default avatarKay Pedersen <mail@mkwg.de>
      Signed-off-by: default avatarRob Norris <robn@despairlabs.com>
      Closes #15291 
      1c2aee7a
  8. 20 Sep, 2023 4 commits
    • Alexander Motin's avatar
      ZIL: Fix potential race on flush deferring. · 62677576
      Alexander Motin authored
      
      zil_lwb_set_zio_dependency() can not set write ZIO dependency on
      previous LWB's write ZIO if one is already in done handler and set
      state to LWB_STATE_WRITE_DONE.  So theoretically done handler of
      next LWB's write ZIO may run before done handler of previous LWB
      write ZIO completes.  In such case we can not defer flushes, since
      the flush issue process is not locked.
      
      This may fix some reported assertions of lwb_vdev_tree not being
      empty inside zil_free_lwb().
      Reviewed-by: default avatarBrian Behlendorf <behlendorf1@llnl.gov>
      Signed-off-by: default avatarAlexander Motin <mav@FreeBSD.org>
      Sponsored by:	iXsystems, Inc.
      Closes #15278 
      62677576
    • Umer Saleem's avatar
      Improve the handling of sharesmb,sharenfs properties · 22da5ae5
      Umer Saleem authored
      
      For sharesmb and sharenfs properties, the status of setting the
      property is tied with whether we succeed to share the dataset or
      not. In case sharing the dataset is not successful, this is
      treated as overall failure of setting the property. In this case,
      if we check the property after the failure, it is set to on.
      
      This commit updates this behavior and the status of setting the
      share properties is not returned as failure, when we fail to
      share the dataset.
      
      For sharenfs property, if access list is provided, the syntax
      errors in access list/host adresses are not validated until after
      setting the property during postfix phase while trying to
      share the dataset. This is not correct, since the property has
      already been set when we reach there.
      
      Syntax errors in access list/host addresses are validated while
      validating the property list, before setting the property and
      failure is returned to user in this case when there are errors
      in access list.
      Reviewed-by: default avatarBrian Behlendorf <behlendorf1@llnl.gov>
      Reviewed-by: default avatarAlexander Motin <mav@FreeBSD.org>
      Reviewed-by: default avatarAmeer Hamza <ahamza@ixsystems.com>
      Signed-off-by: default avatarUmer Saleem <usaleem@ixsystems.com>
      Closes #15240
      22da5ae5
    • Umer Saleem's avatar
      Update the behavior of mountpoint property · 86c1cb8c
      Umer Saleem authored
      
      There are some inconsistencies in the handling of mountpoint
      property. This commit updates the behavior and makes it
      consistent.
      
      If mountpoint property is set when dataset is unmounted, this
      would update the mountpoint property. The mountpoint could be
      valid or invalid in this case. Setting the mountpoint property
      would result in success in this case. Dataset would still be
      unmounted here.
      
      On the other hand, if dataset is mounted and mountpoint
      property is updated to something invalid where mount cannot be
      successful, for example, setting the mountpoint inside a readonly
      directory. This would unmount the dataset, set the mountpoint
      property to requested value and tries to mount the dataset. The
      mount operation returns error and this error is treated as
      overall failure of setting the property while the property is
      actually set.
      
      To make the behavior consistent in case dataset is mounted or
      unmounted, we should try to mount the dataset whenever mountpoint
      property is updated. This would result in mounting the datasets
      if canmount property is set to on, regardless if the dataset was
      previously unmounted.
      
      The failure in mount operation while setting the mountpoint
      property should not be treated as failure, since the property is
      actually set now to user requested value.
      Reviewed-by: default avatarBrian Behlendorf <behlendorf1@llnl.gov>
      Reviewed-by: default avatarAlexander Motin <mav@FreeBSD.org>
      Reviewed-by: default avatarAmeer Hamza <ahamza@ixsystems.com>
      Signed-off-by: default avatarUmer Saleem <usaleem@ixsystems.com>
      Closes #15240
      86c1cb8c
    • Umer Saleem's avatar
      Do not enable zfs-share.service · 47233578
      Umer Saleem authored
      
      zfs-share.service executes `zfs share` on every boot to share any
      filesystem/s, that are shared over SMB and/or NFS using the
      sharesmb and sharenfs properties.
      
      Since we do not rely on these properties to share over SMB and NFS
      and the service fails on boot on TrueNAS if sharesmb and/or
      sharenfs properties are set, and we rely on middleware to control
      the SMB and NFS shares, zfs-share.service should be disabled for
      TrueNAS SCALE.
      Signed-off-by: default avatarUmer Saleem <usaleem@ixsystems.com>
      47233578
  9. 19 Sep, 2023 14 commits