LU-7356 build: handle configure options for mount plugin Currently if you build lustre with configure options --disable-shared and/or --disable-static it will fail to build in the case of the mount plugins. The mount plugins are always built to be sharable code using libtool but this is not compatiable with the confiure --disable-share option. The solution was to create a temporary static library and for the static case we directly link into the lustre utilites. If shared libraries are enabled then that temporary library is turned into a dynamic plugin. The lustre utilites was updated to handle both cases. Test-Parameters: trivial Change-Id: I0eec25c8bce71c0e5c533ff3dfbe752677f37a26 Signed-off-by: James Simmons <uja.ornl@yahoo.com> Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com> Reviewed-on: https://review.whamcloud.com/17581 Tested-by: Jenkins Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-6210 utils: Use C99 struct initializer in mount_utils_zfs.c This patch makes no functional changes. The ZLB_INIT macro is updated to C99 syntax. C89 positional initializers require values to be placed in the correct order. This will cause errors if the fields of the struct definition are reordered or fields are added or removed. C99 named initializers avoid this problem, and also automatically clear any values that are not explicitly set. Test-Parameters: trivial Signed-off-by: Steve Guminski <stephenx.guminski@intel.com> Change-Id: Ieaf53059782254935a13f0efd3f72785dacc0b8b Reviewed-on: https://review.whamcloud.com/27825 Tested-by: Jenkins Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: James Simmons <uja.ornl@yahoo.com>
LU-9772 utils: Enable new ZFS MMP on mkfs ZFS 0.7.0 come with new multi-modifier protection, this patch enables it by default, on mkfs. This also ensures canmount is off for pools that were not just created. Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com> Change-Id: If9b87e9786e0eaefe5ac9a536edcdca3d1012585 Reviewed-on: https://review.whamcloud.com/28051 Tested-by: Jenkins Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com> Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-7131 utils: add "--erase-param" option to tunefs.lustre This patch is to fix the following issues: - A new option "--erase-param" is added to tunefs.lustre, which allows to remove all instances of a specific parameter. - The behavior of option "--param" is improved a little. It will erase all previously stored instances of the parameter, and then store all new values specified in the command line. - For zfs only, the patch introduces a "null value" rule in the form of "<key>=" to mark a property to be removed from dataset by zfs_write_ldd() finally. - To keep the right semantics, if "--erase-params" is specified, all old parameters should be erased before any new changes are done. - test_89 conf-sanity.sh is added to verify these new features. Seagate-bug-id: MRP-153 Signed-off-by: Nikitas Angelinas <nikitas.angelinas@seagate.com> Signed-off-by: Emoly Liu <emoly.liu@intel.com> Change-Id: Ibc8d81227045471b8e5c56c7faf1275ad8bbbf86 Tested-by: Elena Gryaznova <elena.gryaznova@seagate.com> Reviewed-by: Artem Blagodarenko <artem.blagodarenko@seagate.com> Reviewed-by: Alexey Lyashkov <alexey.lyashkov@seagate.com> Reviewed-by: Vitaly Fertman <vitaly.fertman@seagate.com> Reviewed-on: https://review.whamcloud.com/16359 Reviewed-by: Bobi Jam <bobijam@hotmail.com> Tested-by: Jenkins Reviewed-by: Fan Yong <fan.yong@intel.com> Reviewed-by: James Simmons <uja.ornl@yahoo.com> Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-8900 snapshot: rename filesysetem fsname Introuduce new tunefs options "--rename" for renaming the existing Lustre filesystem fsname with configuration/parameters preserved. Usage: tunefs.lustre --fsname $NEW_FSNAME --rename $OLD_FSNAME ... NEW_FSNAME is the new fsname, must be specified. OLD_FSNAME is the old fsname, it is optional if the MGS and the MDT are combined together. It shares the functionality of fork/erase Lustre configuration logs in kernel. Signed-off-by: Fan Yong <fan.yong@intel.com> Change-Id: Ic9aaf6ed6209c7580bfabd4b660a6a7667576484 Reviewed-on: https://review.whamcloud.com/24268 Reviewed-by: Niu Yawei <yawei.niu@intel.com> Reviewed-by: Lai Siyao <lai.siyao@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Tested-by: Oleg Drokin <oleg.drokin@intel.com>
LU-8900 snapshot: simulate readonly device Introduce new server-side mount option: rdonly_dev. Under the device readonly mode, the Lustre kernel threads that may cause system modification, such as lfsck, scrub, osp_precreate_thread, osp_sync_thread, and so on, will be disabled when mount. And the system modification for recovery and client connect/disconnect, will be ignored also. On the other hand, if the server is mounted as "rdonly_dev", then the client must specify "-o ro" option when mount; otherwise, it will get -EACCES. Signed-off-by: Fan Yong <fan.yong@intel.com> Change-Id: Iafc02bf53c41b9d7f08120ba7639b91ae527bbbc Reviewed-on: https://review.whamcloud.com/24267 Tested-by: Jenkins Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Niu Yawei <yawei.niu@intel.com> Reviewed-by: Lai Siyao <lai.siyao@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-8901 misc: update Intel copyright messages for 2016 Update copyright messages for files updated in 2016, excluding trivial patches. Add trivial patches to updatecw.sh script exclude list. Improve the output of patches causing the most changes to include the patch summary instead of just the hash. Test-Parameters: trivial Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Change-Id: Ifb098e8126f698ea975e10ba13f5f47c449ae4ad Reviewed-on: https://review.whamcloud.com/24233 Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Tested-by: Oleg Drokin <oleg.drokin@intel.com>
LU-8816 utils: Check /etc/hostid instead of failing for ZFS Since ZFS doesn't check /etc/hostid until a pool is created or imported. Check for it's existance instead of just failing after spl_hostid is checked. Test-Parameters: trivial Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com> Change-Id: Ia00b1e357c629ad6a7a2b636a2fc149036d03546 Reviewed-on: http://review.whamcloud.com/23804 Reviewed-by: Bob Glossman <bob.glossman@intel.com> Tested-by: Jenkins Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-8713 utils: Try loading zfs.ko during zfs_init Newer version of zfs (0.6.5.8 and 0.7.0) do not autoload zfs module at boot nor do they load it during libzfs_init(), so try loading it during initialization. Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com> Change-Id: I44765b0c2b7ea8b1c8c6d45a9107842b17623dbc Reviewed-on: http://review.whamcloud.com/23210 Tested-by: Jenkins Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com> Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-8386 zfs: Use ZFS_MAXPROPLEN instead of ZFS_MAXNAMELEN ZFS_MAXNAMELEN was removed on zfs's master branch. We substitue ZFS_MAXPROPLEN in its place. We only used this macro in the get and set zfs property functions, so this should be a reasonable exchange. ZFS_MAXPROPLEN has also been around for a long time, so there is no need to extra logic to make lustre lustre backwards compatible with older ZFS releases. Change-Id: I7292194f1a4e0311477954f7f83a3c353e785ac8 Test-Parameters: trivial Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov> Reviewed-on: http://review.whamcloud.com/21251 Tested-by: Jenkins Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
LU-7134 utils: Ensure hostid set for ZFS during mkfs Ensure import protection in ZFS. spl_hostid must be set to a non-zero value for it to work correctly. Error out during mkfs and tunefs unless override is passed. Also print error during mount. Ensure hostid is set in conf-sanity.sh Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com> Change-Id: If37318c20e4502a643992e6bc21ac4bc4ad20ed7 Reviewed-on: http://review.whamcloud.com/16611 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com> Tested-by: Jenkins Tested-by: Maloo <hpdd-maloo@intel.com>
LU-6245 libcfs: remove libcfs userland time abstraction Instead of creating a time abstraction layer in libcfs for userland lets just use the userland time APIs directly. Change-Id: I5c91b23d4ae6c4f75f7712c28572818f26fe57e2 Signed-off-by: James Simmons <uja.ornl@yahoo.com> Reviewed-on: http://review.whamcloud.com/19113 Tested-by: Jenkins Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Frank Zago <fzago@cray.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: John L. Hammond <john.hammond@intel.com>
LU-6662 utils: allow overriding default mountopts during formatting the device for Lustre, there are two kinds of mount options to be used by "mkfs.lustre", which is default and wanted options. the wanted options is mandatory but the default should only be used if user doesn't specify it. Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com> Change-Id: I7d8093082455e0a08eb40df63dbc938d6dd8a2a6 Reviewed-on: http://review.whamcloud.com/15870 Tested-by: Jenkins Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com> Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-6816 utils: remove libzfs_load_module() call Remove libzfs_load_module() call from the OSD. The function is no longer exported by libzfs2 in ZFS master, as it was intended as an internal function to begin with. libzfs_init(), which is already being used to set up the OSD, loads the module if necessary. The intent of the call to libzfs_load_module apparently was to make zfs_init() fail silently if ZFS was improperly installed (e.g. the userspace libraries were missing), but fail with an error message if ZFS initialization failed. However it's not clear how this could ever work. Handling such error conditions will be dealt with in a separate ticket as it's a larger concern. Signed-off-by: Olaf Faaland <faaland1@llnl.gov> Change-Id: I97a2de7cd1a32c8251d805192aaf557f48840584 Reviewed-on: http://review.whamcloud.com/15539 Tested-by: Jenkins Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Tested-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com> Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
LU-6068 misc: update Intel copyright messages 2014 Update the copyright messages for changes made in 2014. In some cases, changes made in 2013 did not generate an updated copyright message, so these files are updated accordingly. In some cases there were no licenses on newly-added files, so add them (either with new copyrights, or including copyrights from the source files). Some types of changes that are not actually changing the code (e.g. whitespace, mass changes to add or remote prefixes, patches updating the copyright messages, patch reversions and the reverted patch, patches that only delete code, etc.) have been excluded. The updatecw.sh script was updated to fix a number of problems: - it now handles comments in nroff (man page) files properly - remove need to handle non-Intel copyrights specially - allow subdirectory to be specified on command-line - improve script debugging when running with "sh -vx" - print patches changing the most files, to catch mass replacements There are still a few cases that need to be fixed up by hand (e.g. files split up and "git log --follow" can't find the original). Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Change-Id: Ib4875400a4908dc79ddc8b82ab0fe3ee903ebbe5 Reviewed-on: http://review.whamcloud.com/13174 Tested-by: Jenkins Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4821 osd: cleanups in osd-zfs many small changes to get rid of udmu wrappers. Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com> Change-Id: Ic8746345da1e6695149bacf066be10bf284aecdf Reviewed-on: http://review.whamcloud.com/9721 Tested-by: Jenkins Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com> Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Mike Pershin <mike.pershin@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4606 utils: Mount uses so for backing fstype Make mount/mkfs/tunefs functionality a per backing FSTYPE shared object that is loadable, and seperately buildable and installable in the appropriate lustre-osd-FSTYPE rpm. For ZFS this allows the shared object to be directly linked to libzfs and thus remove the hardcoding of a libzfs.so version in the lustre source. This also has the benefit of making lustre-osd-zfs explicitly requires libzfs (which it needs to do mount/mkfs operations). Adjust build system to allow building of loadable module. Including requiering libtool as part of the build. Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com> Change-Id: I8fc0f41161dc08405c1f951f12e675f364ff62c3 Reviewed-on: http://review.whamcloud.com/10193 Tested-by: Jenkins Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4193 ldiskfs: increase max journal to 4GB Increase the maximum journal size to 4GB to handle the increased metadata operation rate possible since MDT SMP scaling is done. Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Change-Id: I025b68f9f8b7c9d1084f704e2ebf8722753ebbe5 Reviewed-on: http://review.whamcloud.com/8111 Tested-by: Jenkins Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: James Simmons <uja.ornl@gmail.com> Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3030 build: Update Master Copyrights pre 2.4 split This is the output of the tool. Please note the tool changed to using commit dates over author dates and there are a few spots with erroneous 2011 copyrights that have been removed by the tool. Please see script update for further details. Signed-off-by: Keith Mannthey <keith.mannthey@intel.com> Change-Id: I6600369df53c01c425f33f62d5d6c4f8f1b48498 Reviewed-on: http://review.whamcloud.com/5841 Tested-by: Hudson Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
LU-2976 tools: ZFS upstream sonames are versioned Current zfsonlinux upstream has versioned zfs libs sonames, while in lustre/utils/mount_utils_zfs.c are set unversioned Versions are libzfs.so -> libzfs.so.1 libnvpair.so -> libnvpair.so.1 Signed-off-by: Alexey Shvetsov <alexxy@gentoo.org> Change-Id: I871613081c117731b5ec89fc2d79349df0668f94 Reviewed-on: http://review.whamcloud.com/5742 Tested-by: Hudson Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com> Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>