Storage Administration Guide Storage Administration Guide SUSE Linux Enterprise Server 15 SP2
Total Page:16
File Type:pdf, Size:1020Kb
SUSE Linux Enterprise Server 15 SP2 Storage Administration Guide Storage Administration Guide SUSE Linux Enterprise Server 15 SP2 Provides information about how to manage storage devices on a SUSE Linux Enterprise Server. Publication Date: September 24, 2021 SUSE LLC 1800 South Novell Place Provo, UT 84606 USA https://documentation.suse.com Copyright © 2006– 2021 SUSE LLC and contributors. All rights reserved. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or (at your option) version 1.3; with the Invariant Section being this copyright notice and license. A copy of the license version 1.2 is included in the section entitled “GNU Free Documentation License”. For SUSE trademarks, see https://www.suse.com/company/legal/ . All other third-party trademarks are the property of their respective owners. Trademark symbols (®, ™ etc.) denote trademarks of SUSE and its aliates. Asterisks (*) denote third-party trademarks. All information found in this book has been compiled with utmost attention to detail. However, this does not guarantee complete accuracy. Neither SUSE LLC, its aliates, the authors nor the translators shall be held liable for possible errors or the consequences thereof. Contents About This Guide xii 1 Available Documentation xii 2 Giving Feedback xiv 3 Documentation Conventions xiv 4 Product Life Cycle and Support xvi Support Statement for SUSE Linux Enterprise Server xvii • Technology Previews xviii I FILE SYSTEMS AND MOUNTING 1 1 Overview of File Systems in Linux 2 1.1 Terminology 3 1.2 Btrfs 3 Key Features 4 • The Root File System Setup on SUSE Linux Enterprise Server 4 • Migration from ReiserFS and Ext File Systems to Btrfs 9 • Btrfs Administration 10 • Btrfs Quota Support for Subvolumes 10 • Swapping on Btrfs 12 • Btrfs send/ receive 12 • Data Deduplication Support 16 • Deleting Subvolumes from the Root File System 17 1.3 XFS 18 High Scalability by Using Allocation Groups 18 • High Performance through Efficient Management of Disk Space 18 • Preallocation to Avoid File System Fragmentation 19 1.4 Ext2 19 1.5 Ext3 20 Easy and Highly Reliable Upgrades from Ext2 20 • Reliability and Performance 21 • Converting an Ext2 File System into Ext3 21 • Ext3 File System Inode Size and Number of Inodes 22 iii Storage Administration Guide 1.6 Ext4 26 1.7 ReiserFS 26 1.8 Other Supported File Systems 27 1.9 Large File Support in Linux 28 1.10 Linux Kernel Storage Limitations 29 1.11 Troubleshooting File Systems 30 Btrfs Error: No space is left on device 30 • Freeing Unused File System Blocks 32 • Btrfs: Balancing Data across Devices 33 • No Defragmentation on SSDs 34 1.12 Additional Information 34 2 Resizing File Systems 35 2.1 Use Cases 35 2.2 Guidelines for Resizing 35 File Systems that Support Resizing 36 • Increasing the Size of a File System 36 • Decreasing the Size of a File System 37 2.3 Changing the Size of a Btrfs File System 37 2.4 Changing the Size of an XFS File System 38 2.5 Changing the Size of an Ext2, Ext3, or Ext4 File System 39 3 Using UUIDs to Mount Devices 40 3.1 Persistent Device Names with udev 40 3.2 Understanding UUIDs 40 3.3 Additional Information 41 4 Multi-tier Caching for Block Device Operations 42 4.1 General Terminology 42 4.2 Caching Modes 43 iv Storage Administration Guide 4.3 bcache 44 Main Features 44 • Setting Up a bcache Device 44 • bcache Configuration Using sysfs 46 4.4 lvmcache 46 Configuring lvmcache 46 • Removing a Cache Pool 48 II LOGICAL VOLUMES (LVM) 50 5 LVM Configuration 51 5.1 Understanding the Logical Volume Manager 51 5.2 Creating Volume Groups 53 5.3 Creating Logical Volumes 56 Thinly Provisioned Logical Volumes 59 • Creating Mirrored Volumes 60 5.4 Automatically Activating Non-Root LVM Volume Groups 61 5.5 Resizing an Existing Volume Group 62 5.6 Resizing a Logical Volume 63 5.7 Deleting a Volume Group or a Logical Volume 65 5.8 Using LVM Commands 66 Resizing a Logical Volume with Commands 69 • Using LVM Cache Volumes 71 5.9 Tagging LVM2 Storage Objects 72 Using LVM2 Tags 73 • Requirements for Creating LVM2 Tags 73 • Command Line Tag Syntax 74 • Configuration File Syntax 74 • Using Tags for a Simple Activation Control in a Cluster 76 • Using Tags to Activate On Preferred Hosts in a Cluster 76 6 LVM Volume Snapshots 80 6.1 Understanding Volume Snapshots 80 6.2 Creating Linux Snapshots with LVM 82 6.3 Monitoring a Snapshot 82 v Storage Administration Guide 6.4 Deleting Linux Snapshots 83 6.5 Using Snapshots for Virtual Machines on a Virtual Host 83 6.6 Merging a Snapshot with the Source Logical Volume to Revert Changes or Roll Back to a Previous State 85 III SOFTWARE RAID 88 7 Software RAID Configuration 89 7.1 Understanding RAID Levels 89 RAID 0 89 • RAID 1 90 • RAID 2 and RAID 3 90 • RAID 4 90 • RAID 5 90 • RAID 6 91 • Nested and Complex RAID Levels 91 7.2 Soft RAID Configuration with YaST 91 RAID Names 94 7.3 Monitoring software RAIDs 95 7.4 For More Information 95 8 Configuring Software RAID for the Root Partition 96 8.1 Prerequisites for Using a Software RAID Device for the Root Partition 96 8.2 Setting Up the System with a Software RAID Device for the Root (/) Partition 97 9 Creating Software RAID 10 Devices 101 9.1 Creating Nested RAID 10 Devices with mdadm 101 Creating Nested RAID 10 (1+0) with mdadm 102 • Creating Nested RAID 10 (0+1) with mdadm 104 9.2 Creating a Complex RAID 10 106 Number of Devices and Replicas in the Complex RAID 10 107 • Layout 108 • Creating a Complex RAID 10 with the YaST Partitioner 110 • Creating a Complex RAID 10 with mdadm 113 vi Storage Administration Guide 10 Creating a Degraded RAID Array 116 11 Resizing Software RAID Arrays with mdadm 118 11.1 Increasing the Size of a Software RAID 119 Increasing the Size of Component Partitions 120 • Increasing the Size of the RAID Array 121 • Increasing the Size of the File System 122 11.2 Decreasing the Size of a Software RAID 123 Decreasing the Size of the File System 123 • Decreasing the Size of the RAID Array 123 • Decreasing the Size of Component Partitions 124 12 Storage Enclosure LED Utilities for MD Software RAIDs 127 12.1 The Storage Enclosure LED Monitor Service 128 12.2 The Storage Enclosure LED Control Application 129 Pattern Names 130 • List of Devices 133 • Examples 134 12.3 Additional Information 134 13 Toubleshooting software RAIDs 135 13.1 Recovery after Failing Disk is Back Again 135 IV NETWORK STORAGE 137 14 iSNS for Linux 138 14.1 How iSNS Works 138 14.2 Installing iSNS Server for Linux 140 14.3 Configuring iSNS Discovery Domains 141 Creating iSNS Discovery Domains 142 • Adding iSCSI Nodes to a Discovery Domain 143 14.4 Starting the iSNS Service 145 14.5 Further Information 145 vii Storage Administration Guide 15 Mass Storage over IP Networks: iSCSI 146 15.1 Installing the iSCSI LIO Target Server and iSCSI Initiator 147 15.2 Setting Up an iSCSI LIO Target Server 148 iSCSI LIO Target Service Start-up and Firewall Settings 148 • Configuring Authentication for Discovery of iSCSI LIO Targets and Initiators 149 • Preparing the Storage Space 151 • Setting Up an iSCSI LIO Target Group 152 • Modifying an iSCSI LIO Target Group 155 • Deleting an iSCSI LIO Target Group 156 15.3 Configuring iSCSI Initiator 157 Using YaST for the iSCSI Initiator Configuration 157 • Setting Up the iSCSI Initiator Manually 160 • The iSCSI Initiator Databases 161 15.4 Setting Up Software Targets Using targetcli-fb 163 15.5 Using iSCSI Disks when Installing 167 15.6 Troubleshooting iSCSI 168 Portal Error When Setting Up Target LUNs on an iSCSI LIO Target Server 168 • iSCSI LIO Targets Are Not Visible from Other Computers 169 • Data Packets Dropped for iSCSI Traffic 169 • Using iSCSI Volumes with LVM 169 • iSCSI Targets Are Mounted When the Configuration File Is Set to Manual 170 15.7 iSCSI LIO Target Terminology 170 15.8 Additional Information 172 16 Fibre Channel Storage over Ethernet Networks: FCoE 173 16.1 Configuring FCoE Interfaces during the Installation 174 16.2 Installing FCoE and the YaST FCoE Client 175 16.3 Managing FCoE Services with YaST 176 16.4 Configuring FCoE with Commands 179 16.5 Managing FCoE Instances with the FCoE Administration Tool 181 viii Storage Administration Guide 16.6 Additional Information 183 17 NVMe over Fabric 184 17.1 Overview 184 17.2 Setting Up an NVMe over Fabric Host 184 Installing Command Line Client 184 • Discovering NVMe over Fabric Targets 185 • Connecting to NVMe over Fabric Targets 185 • Multipathing 186 17.3 Setting Up an NVMe over Fabric Target 186 Installing Command Line Client 186 • Configuration Steps 186 • Back Up and Restore Target Configuration 188 17.4 Special Hardware Configuration 189 Overview 189 • Broadcom 189 • Marvell 189 17.5 More Information 190 18 Managing Multipath I/O for Devices 191 18.1 Understanding Multipath I/O 191 18.2 Hardware Support 191 Storage Arrays That Are Automatically Detected for Multipathing 192 • Tested Storage Arrays for Multipathing Support 194 • Storage Arrays that Require Specific Hardware Handlers 195 18.3 Planning for Multipathing 195 Prerequisites 195 • Disk Management Tasks 196 • Software RAIDs 196 • High-Availability Solutions 197 • Always Keep the initrd in Synchronization with the System Configuration 197 18.4 Multipath Management Tools 197 Device Mapper Multipath Module 198 • Multipath I/O Management Tools 200 • Using MDADM for Multipathed Devices 201 • The multipath Command 201 • The mpathpersist Utility 204 ix Storage Administration Guide 18.5 Configuring the System for Multipathing 205 Enabling, Disabling, Starting and Stopping