How to Install NDCTL and DAXCTL on Linux

How to Install NDCTL and DAXCTL on Linux

APPENDIX A How to Install NDCTL and DAXCTL on Linux The ndctl utility is used to manage the libnvdimm (non-volatile memory device) subsystem in the Linux kernel and to administer namespaces. The daxctl utility provides enumeration and provisioning commands for any device-dax namespaces you create. daxctl is only required if you work directly with device-dax namespaces. We presented a use-case for the ‘system-ram’ dax type in Chapter 10, that can use persistent memory capacity to dynamically extend the usable volatile memory capacity in Linux. Chapter 10 also showed how libmemkind can use device dax namespaces for volatile memory in addition to using DRAM. The default, and recommended, namespace for most developers is filesystem-dax (fsdax). Both Linux-only utilities - ndctl and daxctl - are open source and are intended to be persistent memory vendor neutral. Microsoft Windows has integrated graphical utilities and PowerShell Commandlets to administer persistent memory. libndctl and libdaxctl are required for several Persistent Memory Development Kit (PMDK) features if compiling from source. If ndctl is not available, the PMDK may not build all components and features, but it will still successfully compile and install. In this appendix, we describe how to install ndctl and daxctl using the Linux package repository only. To compile ndctl from source code, refer to the README on the ndctl GitHub repository (https://github.com/pmem/ndctl) or https://docs.pmem.io. Prerequisites Installing ndctl and daxctl using packages automatically installs any missing dependency packages on the system. A full list of dependencies is usually listed when installing the package. You can query the package repository to list dependencies or use an online package took such as https://pkgs.org to find the package for your operating 389 © The Author(s) 2020 S. Scargall, Programming Persistent Memory, https://doi.org/10.1007/978-1-4842-4932-1 APPENDIX A HOW to INSTaLL NDCTL and DAXCTL on LINUX system and list the package details. For example, Figure A-1 shows the packages required for ndctl v64.1 on Fedora 30 (https://fedora.pkgs.org/30/fedora-x86_64/ ndctl-64.1-1.fc30.x86_64.rpm.html). Figure A-1. Detailed package information for ndctl v64.1 on Fedora 30 Installing NDCTL and DAXCTL Using the Linux Distribution Package Repository The ndctl and daxctl utilities are delivered as runtime binaries with the option to install development header files which can be used to integrate their features in to your application or when compiling PMDK from source code. To create debug binaries, you need to compile ndctl and daxctl from source code. Refer to the README on the project page https://github.com/pmem/ndctl or https://docs.pmem.io for detailed instructions. 390 APPENDIX A HOW to INSTaLL NDCTL and DAXCTL on LINUX Searching for Packages Within a Package Repository The default package manager utility for your operating system will allow you to query the package repository using regular expressions to identify packages to install. Table A-1 shows how to search the package repository using the command-line utility for several distributions. If you prefer to use a GUI, feel free to use your favorite desktop utility to perform the same search and install operations described here. Table A-1. Searching for ndctl and daxctl packages in different Linux distributions Operating System Command Fedora 21 or Earlier $ yum search ndctl $ yum search daxctl Fedora 22 or Later $ dnf search ndctl $ dnf search daxctl RHEL AND CENTOS $ yum search ndctl $ yum search daxctl SLES AND OPENSUSE $ zipper search ndctl $ zipper search daxctl CANONICAL/Ubuntu $ aptitude search ndctl $ apt-cache search ndctl $ apt search ndctl $ aptitude search daxctl $ apt-cache search daxctl $ apt search daxctl Additionally, you can use an online package search tools such as https://pkgs.org that allow you to search for packages across multiple distros. Figure A-2 shows the results for many distros when searching for “libpmem.” 391 APPENDIX A HOW to INSTaLL NDCTL and DAXCTL on LINUX Figure A-2. https://pkgs.org search results for “ndctl” Installing NDCTL and DAXCTL from the Package Repository Instructions for some popular Linux distributions follow. Skip to the section for your operating system. If your operating system is not listed here, it may share the same package family as one listed here so you can use the same instructions. Should your operating system not meet either criteria, see the ndctl project home page https:// github.com/pmem/ndctl or https://docs.pmem.io for installation instructions. 392 APPENDIX A HOW to INSTaLL NDCTL and DAXCTL on LINUX Note The version of the ndctl and daxctl available with your operating system may not match the most current project release. If you require a newer release than your operating system delivers, consider compiling the projects from the source code. We do not describe compiling and installing from the source code in this book. Instructions can be found on https://docs.pmem.io/getting-­ started-­guide/installing-ndctl#installing-ndctl-from-source- on-­linux and https://github.com/pmem/ndctl. Installing PMDK on Fedora 22 or Later To install individual packages, you can execute $ sudo dnf install <package> For example, to install just the ndctl runtime utility and library, use $ sudo dnf install ndctl To install all packages, use Runtime: $ sudo dnf install ndctl daxctl Development library: $ sudo dnf install ndctl-devel Installing PMDK on RHEL and CentOS 7.5 or Later To install individual packages, you can execute $ sudo yum install <package> For example, to install just the ndctl runtime utility and library, use $ sudo yum install ndctl 393 APPENDIX A HOW to INSTaLL NDCTL and DAXCTL on LINUX To install all packages, use Runtime: $ yum install ndctl daxctl Development: $ yum install ndctl-devel Installing PMDK on SLES 12 and OpenSUSE or Later To install individual packages, you can execute $ sudo zypper install <package> For example, to install just the ndctl runtime utility and library, use $ sudo zypper install ndctl To install all packages, use All Runtime: $ zypper install ndctl daxctl All Development: $ zypper install libndctl-devel Installing PMDK on Ubuntu 18.04 or Later To install individual packages, you can execute $ sudo zypper install <package> For example, to install just the ndctl runtime utility and library, use $ sudo zypper install ndctl To install all packages, use All Runtime: $ sudo apt-get install ndctl daxctl All Development: $ sudo apt-get install libndctl-dev 394 APPENDIX B How to Install the Persistent Memory Development Kit (PMDK) The Persistent Memory Development Kit (PMDK) is available on supported operating systems in package and source code formats. Some features of the PMDK require additional packages. We describe instructions for Linux and Windows. PMDK Prerequisites In this appendix, we describe installing the PMDK libraries using the packages available in your operating system package repository. To enable all PMDK features, such as advanced reliability, accessibility, and serviceability (RAS), PMDK requires libndctl and libdaxctl. Package dependencies automatically install these requirements. If you are building and installing using the source code, you should install NDCTL first using the instructions provided in Appendix C. Installing PMDK Using the Linux Distribution Package Repository The PMDK is a collection of different libraries; each one provides different functionality. This provides greater flexibility for developers as only the required runtime or header files need to be installed without installing unnecessary libraries. 395 © The Author(s) 2020 S. Scargall, Programming Persistent Memory, https://doi.org/10.1007/978-1-4842-4932-1 AppENdIX B HoW to INstall thE PErsIstENt MEmorY DEVElopmENt KIt (PMDK) Package Naming Convention Libraries are available in runtime, development header files (∗-devel), and debug (∗-debug) versions. Table B-1 shows the runtime (libpmem), debug (libpmem-debug), and development and header files (libpmem-devel) for Fedora. Package names may differ between Linux distributions. We provide instructions for some of the common Linux distributions later in this section. Table B-1. Example runtime, debug, and development package naming convention Library Description LIBPMEM Low-level persistent memory support library LIBPMEM-DEBUG Debug variant of the libpmem low-level persistent memory library LIBPMEM-DEVEL Development files for the low-level persistent memory library Searching for Packages Within a Package Repository Table B-2 shows the list of available libraries as of PMDK v1.6. For an up-to-date list, see https://pmem.io/pmdk. Table B-2. PMDK libraries as of PMDK v1.6 Library Description LIBPMEM Low-level persistent memory support library LIBRPMEM Remote Access to persistent memory library LIBPMEMBLK Persistent Memory Resident Array of Blocks library LIBPMEMCTO Close-to-Open Persistence library (Deprecated in PMDK v1.5) LIBPMEMLOG Persistent Memory Resident Log File library LIBPMEMOBJ Persistent Memory Transactional Object Store library LIBPMEMPOOL Persistent Memory pool management library PMEMPOOL Utilities for Persistent Memory 396 AppENdIX B HoW to INstall thE PErsIstENt MEmorY DEVElopmENt KIt (PMDK) The default package manager utility for your operating system will allow you to query the package repository using regular expressions to identify packages to install. Table B-3 shows how to search the package repository using the command-line utility for several distributions. If you prefer to use a GUI, feel free to use your favorite desktop utility to perform the same search and install operations described here. Table B-3. Searching for ∗pmem∗ packages on different Linux operating systems Operating System Command Fedora 21 or Earlier $ yum search pmem Fedora 22 or Later $ dnf search pmem $ dnf repoquery *pmem* RHEL AND CENTOS $ yum search pmem SLES AND OPENSUSE $ zipper search pmem CANONICAL/Ubuntu $ aptitude search pmem $ apt-cache search pmem $ apt search pmem Additionally, you can use an online package search tools such as https://pkgs.org that allow you to search for packages across multiple distros.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    48 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us