suse - storage admin

Upload: rolhan17

Post on 16-Oct-2015

37 views

Category:

Documents


0 download

TRANSCRIPT

  • www.novell.com/documentationStorage Administration GuideSUSE Linux Enterprise Server 11 SP1 December 15, 2011

  • Legal NoticesNovell,Inc.,makesnorepresentationsorwarrantieswithrespecttothecontentsoruseofthisdocumentation,andspecificallydisclaimsanyexpressorimpliedwarrantiesofmerchantabilityorfitnessforanyparticularpurpose.Further,Novell,Inc.,reservestherighttorevisethispublicationandtomakechangestoitscontent,atanytime,withoutobligationtonotifyanypersonorentityofsuchrevisionsorchanges.Further,Novell,Inc.,makesnorepresentationsorwarrantieswithrespecttoanysoftware,andspecificallydisclaimsanyexpressorimpliedwarrantiesofmerchantabilityorfitnessforanyparticularpurpose.Further,Novell,Inc.,reservestherighttomakechangestoanyandallpartsofNovellsoftware,atanytime,withoutanyobligationtonotifyanypersonorentityofsuchchanges.AnyproductsortechnicalinformationprovidedunderthisAgreementmaybesubjecttoU.S.exportcontrolsandthetradelawsofothercountries.Youagreetocomplywithallexportcontrolregulationsandtoobtainanyrequiredlicensesorclassificationtoexport,reexportorimportdeliverables.YouagreenottoexportorreexporttoentitiesonthecurrentU.S.exportexclusionlistsortoanyembargoedorterroristcountriesasspecifiedintheU.S.exportlaws.Youagreetonotusedeliverablesforprohibitednuclear,missile,orchemicalbiologicalweaponryenduses.SeetheNovellInternationalTradeServicesWebpage(http://www.novell.com/info/exports/)formoreinformationonexportingNovellsoftware.Novellassumesnoresponsibilityforyourfailuretoobtainanynecessaryexportapprovals.Copyright20092011Novell,Inc.Allrightsreserved.Nopartofthispublicationmaybereproduced,photocopied,storedonaretrievalsystem,ortransmittedwithouttheexpresswrittenconsentofthepublisher.Novell, Inc.1800 South Novell PlaceProvo, UT 84606U.S.A.www.novell.com

    OnlineDocumentation:ToaccessthelatestonlinedocumentationforthisandotherNovellproducts,seetheNovellDocumentationWebpage(http://www.novell.com/documentation).

    Novell Trademarks

    ForNovelltrademarks,seetheNovellTrademarkandServiceMarklist(http://www.novell.com/company/legal/trademarks/tmlist.html).

    Third-Party Materials

    Allthirdpartytrademarksandcopyrightsarethepropertyoftheirrespectiveowners.

  • Contents

    About This Guide 9

    1 Overview of File Systems in Linux 111.1 Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111.2 Major File Systems in Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

    1.2.1 Ext2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121.2.2 Ext3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131.2.3 ReiserFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141.2.4 XFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

    1.3 Other Supported File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161.4 Large File Support in Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161.5 Additional Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

    2 Whats New for Storage in SLES 11 192.1 Whats New in SLES 11 SP1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

    2.1.1 Saving iSCSI Target Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192.1.2 Modifying Authentication Parameters in the iSCSI Initiator . . . . . . . . . . . . . . . . . . . . . . . . . 192.1.3 Allowing Persistent Reservations for MPIO Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202.1.4 MDADM 3.0.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202.1.5 Boot Loader Support for MDRAID External Metadata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202.1.6 YaST Install and Boot Support for MDRAID External Metadata . . . . . . . . . . . . . . . . . . . . . 202.1.7 Improved Shutdown for MDRAID Arrays that Contain the Root File System . . . . . . . . . . . 202.1.8 MD over iSCSI Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212.1.9 MD-SGPIO. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212.1.10 Resizing LVM 2 Mirrors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212.1.11 Updating Storage Drivers for Adapters on IBM Servers . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

    2.2 Whats New in SLES 11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222.2.1 EVMS2 Is Deprecated . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222.2.2 Ext3 as the Default File System. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222.2.3 JFS File System Is Deprecated . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222.2.4 OCFS2 File System Is in the High Availability Release. . . . . . . . . . . . . . . . . . . . . . . . . . . . 222.2.5 /dev/disk/by-name Is Deprecated . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232.2.6 Device Name Persistence in the /dev/disk/by-id Directory . . . . . . . . . . . . . . . . . . . . . . . . . 232.2.7 Filters for Multipathed Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232.2.8 User-Friendly Names for Multipathed Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232.2.9 Advanced I/O Load-Balancing Options for Multipath. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242.2.10 Location Change for Multipath Tool Callouts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242.2.11 Change from mpath to multipath for the mkinitrd -f Option . . . . . . . . . . . . . . . . . . . . . . . . . 242.2.12 Change from Multibus to Failover as the Default Setting for the MPIO Path

    Grouping Policy24

    3 Planning a Storage Solution 253.1 Partitioning Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253.2 Multipath Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253.3 Software RAID Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25Contents 3

    3.4 File System Snapshots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253.5 Backup and Antivirus Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

    3.5.1 Open Source Backup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

  • 4 Con

    3.5.2 Commercial Backup and Antivirus Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264 LVM Configuration 274.1 Understanding the Logical Volume Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274.2 Creating LVM Partitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294.3 Creating Volume Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304.4 Configuring Physical Volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324.5 Configuring Logical Volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 334.6 Resizing a Volume Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364.7 Resizing a Logical Volume with YaST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364.8 Resizing a Logical Volume with Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374.9 Deleting a Volume Group. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384.10 Deleting an LVM Partition (Physical Volume) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

    5 Resizing File Systems 395.1 Guidelines for Resizing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

    5.1.1 File Systems that Support Resizing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 395.1.2 Increasing the Size of a File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405.1.3 Decreasing the Size of a File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

    5.2 Increasing the Size of an Ext2, Ext3, or Ext4 File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405.3 Increasing the Size of a Reiser File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415.4 Decreasing the Size of an Ext2, Ext3, or Ext4 File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425.5 Decreasing the Size of a Reiser File System. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

    6 Using UUIDs to Mount Devices 456.1 Naming Devices with udev. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456.2 Understanding UUIDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

    6.2.1 Using UUIDs to Assemble or Activate File System Devices . . . . . . . . . . . . . . . . . . . . . . . . 466.2.2 Finding the UUID for a File System Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

    6.3 Using UUIDs in the Boot Loader and /etc/fstab File (x86) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466.4 Using UUIDs in the Boot Loader and /etc/fstab File (IA64) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476.5 Additional Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

    7 Managing Multipath I/O for Devices 497.1 Understanding Multipathing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

    7.1.1 What Is Multipathing? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497.1.2 Benefits of Multipathing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

    7.2 Planning for Multipathing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507.2.1 Guidelines for Multipathing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507.2.2 Using By-ID Names for Multipathed Devices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527.2.3 Using LVM2 on Multipath Devices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527.2.4 Using mdadm with Multipath Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537.2.5 Using --noflush with Multipath Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537.2.6 SAN Timeout Settings When the Root Device Is Multipathed . . . . . . . . . . . . . . . . . . . . . . . 537.2.7 Partitioning Multipath Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 547.2.8 Supported Architectures for Multipath I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 547.2.9 Supported Storage Arrays for Multipathing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55

    7.3 Multipath Management Tools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577.3.1 Device Mapper Multipath Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577.3.2 Multipath I/O Management Tools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 597.3.3 Using MDADM for Multipathed Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 607.3.4 The Linux multipath(8) Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60tents

  • 7.4 Configuring the System for Multipathing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62

    7.4.1 Preparing SAN Devices for Multipathing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 627.4.2 Partitioning Multipathed Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 637.4.3 Configuring the Server for Multipathing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 637.4.4 Adding multipathd to the Boot Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 637.4.5 Creating and Configuring the /etc/multipath.conf File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

    7.5 Enabling and Starting Multipath I/O Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 717.6 Configuring Path Failover Policies and Priorities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

    7.6.1 Configuring the Path Failover Policies. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 717.6.2 Configuring Failover Priorities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 727.6.3 Using a Script to Set Path Priorities. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 777.6.4 Configuring ALUA (mpath_prio_alua) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 787.6.5 Reporting Target Path Groups. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79

    7.7 Configuring Multipath I/O for the Root Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 797.7.1 Enabling Multipath I/O at Install Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 807.7.2 Enabling Multipath I/O for an Existing Root Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 827.7.3 Disabling Multipath I/O on the Root Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82

    7.8 Configuring Multipath I/O for an Existing Software RAID. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 827.9 Scanning for New Devices without Rebooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 847.10 Scanning for New Partitioned Devices without Rebooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 867.11 Viewing Multipath I/O Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 877.12 Managing I/O in Error Situations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 887.13 Resolving Stalled I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 897.14 Troubleshooting MPIO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 897.15 Whats Next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89

    8 Software RAID Configuration 918.1 Understanding RAID Levels. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91

    8.1.1 RAID 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 928.1.2 RAID 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 928.1.3 RAID 2 and RAID 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 928.1.4 RAID 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 928.1.5 RAID 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 928.1.6 Nested RAID Levels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92

    8.2 Soft RAID Configuration with YaST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 938.3 Troubleshooting Software RAIDs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 948.4 For More Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94

    9 Configuring Software RAID for the Root Partition 959.1 Prerequisites for the Software RAID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 959.2 Enabling iSCSI Initiator Support at Install Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 969.3 Enabling Multipath I/O Support at Install Time. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 969.4 Creating a Software RAID Device for the Root (/) Partition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

    10 Managing Software RAIDs 6 and 10 with mdadm 10110.1 Creating a RAID 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101

    10.1.1 Understanding RAID 6. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10110.1.2 Creating a RAID 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102

    10.2 Creating Nested RAID 10 Devices with mdadm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10210.2.1 Understanding Nested RAID Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10210.2.2 Creating Nested RAID 10 (1+0) with mdadm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10310.2.3 Creating Nested RAID 10 (0+1) with mdadm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104

    10.3 Creating a Complex RAID 10 with mdadm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105Contents 5

  • 6 Con

    10.3.1 Understanding the mdadm RAID10. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105

    10.3.2 Creating a RAID 10 with mdadm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

    10.4 Creating a Degraded RAID Array. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108

    11 Resizing Software RAID Arrays with mdadm 11111.1 Understanding the Resizing Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

    11.1.1 Guidelines for Resizing a Software RAID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11111.1.2 Overview of Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112

    11.2 Increasing the Size of a Software RAID. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11211.2.1 Increasing the Size of Component Partitions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11211.2.2 Increasing the Size of the RAID Array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11411.2.3 Increasing the Size of the File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114

    11.3 Decreasing the Size of a Software RAID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11611.3.1 Decreasing the Size of the File System. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11611.3.2 Decreasing the Size of Component Partitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11811.3.3 Decreasing the Size of the RAID Array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119

    12 iSNS for Linux 12112.1 How iSNS Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12112.2 Installing iSNS Server for Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12212.3 Configuring iSNS Discovery Domains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123

    12.3.1 Creating iSNS Discovery Domains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12412.3.2 Creating iSNS Discovery Domain Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12512.3.3 Adding iSCSI Nodes to a Discovery Domain. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12612.3.4 Adding Discovery Domains to a Discovery Domain Set . . . . . . . . . . . . . . . . . . . . . . . . . . 128

    12.4 Starting iSNS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12812.5 Stopping iSNS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12812.6 For More Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128

    13 Mass Storage over IP Networks: iSCSI 12913.1 Installing iSCSI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130

    13.1.1 Installing iSCSI Target Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13013.1.2 Installing the iSCSI Initiator Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130

    13.2 Setting Up an iSCSI Target . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13113.2.1 Preparing the Storage Space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13113.2.2 Creating iSCSI Targets with YaST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13213.2.3 Configuring an iSCSI Target Manually . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13513.2.4 Configuring Online Targets with ietadm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136

    13.3 Configuring iSCSI Initiator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13713.3.1 Using YaST for the iSCSI Initiator Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13713.3.2 Setting Up the iSCSI Initiator Manually . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14013.3.3 The iSCSI Client Databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141

    13.4 Troubleshooting iSCSI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14113.4.1 Hotplug Doesnt Work for Mounting iSCSI Targets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14213.4.2 Data Packets Dropped for iSCSI Traffic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14213.4.3 Using iSCSI Volumes with LVM. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142

    13.5 Additional Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143

    14 Volume Snapshots 14514.1 Understanding Volume Snapshots. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14514.2 Creating Linux Snapshots with LVM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14614.3 Monitoring a Snapshot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14614.4 Deleting Linux Snapshots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146tents

  • 15 Troubleshooting Storage Issues 147

    15.1 Is DM-MPIO Available for the Boot Partition? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14715.2 Issues for iSCSI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14715.3 Issues for Multipath I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14715.4 Issues for Software RAIDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147

    A Documentation Updates 149A.1 December 15, 2011 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149

    A.1.1 Managing Multipath I/O for Devices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150A.1.2 Resizing File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150

    A.2 September 8, 2011. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150A.2.1 Managing Multipath I/O for Devices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150

    A.3 July 12, 2011 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151A.3.1 Managing Multipath I/O for Devices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151

    A.4 June 14, 2011 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151A.4.1 Managing Multipath I/O for Devices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151A.4.2 Whats New for Storage in SLES 11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151

    A.5 May 5, 2011 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151A.6 January 2011 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152

    A.6.1 LVM Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152A.6.2 Managing Multipath I/O for Devices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152A.6.3 Resizing File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152

    A.7 September 16, 2010. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153A.7.1 LVM Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153

    A.8 June 21, 2010 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153A.8.1 LVM Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153A.8.2 Managing Multipath I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154A.8.3 Managing Software RAIDs 6 and 10 with mdadm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154A.8.4 Mass Storage on IP NetWork: iSCSI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154

    A.9 May 2010 (SLES 11 SP1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154A.9.1 Managing Multipath I/O for Devices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155A.9.2 Mass Storage over IP Networks: iSCSI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155A.9.3 Software RAID Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156A.9.4 Whats New . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156

    A.10 February 23, 2010 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156A.10.1 Configuring Software RAID for the Root Partition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156A.10.2 Managing Multipath I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156

    A.11 December 1, 2009 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157A.11.1 Managing Multipath I/O for Devices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157A.11.2 Resizing File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157A.11.3 Whats New . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157

    A.12 October 20, 2009 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158A.12.1 LVM Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158A.12.2 Managing Multipath I/O for Devices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158A.12.3 Whats New . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158

    A.13 August 3, 2009 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159A.13.1 Managing Multipath I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159

    A.14 June 22, 2009 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159A.14.1 Managing Multipath I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159A.14.2 Managing Software RAIDs 6 and 10 with mdadm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159A.14.3 Mass Storage over IP Networks: iSCSI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160

    A.15 May 21, 2009 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160A.15.1 Managing Multipath I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160Contents 7

  • 8 SLES 11 SP1: Storage Administration Guide

  • About This Guide

    ThisguideprovidesinformationabouthowtomanagestoragedevicesonaSUSELinuxEnterpriseServer11SupportPack1(SP1)server.

    AudienceThisguideisintendedforsystemadministrators.

    FeedbackWewanttohearyourcommentsandsuggestionsaboutthismanualandtheotherdocumentationincludedwiththisproduct.PleaseusetheUserCommentsfeatureatthebottomofeachpageoftheonlinedocumentation,orgotowww.novell.com/documentation/feedback.htmlandenteryourcommentsthere.

    Documentation UpdatesForthemostrecentversionoftheSUSELinuxEnterpriseServer11SP1StorageAdministrationGuide,visittheNovellDocumentationWebsiteforSUSELinuxEnterpriseServer11SP1(http://www.novell.com/documentation/sles11).

    Additional DocumentationForinformationaboutpartitioningandmanagingdevices,seeAdvancedDiskSetup(http://www.novell.com/documentation/sles11/book_sle_deployment/data/cha_advdisk.html)intheSUSELinuxEnterpriseServer11SP1DeploymentGuide(http://www.novell.com/documentation/sles11/book_sle_deployment/data/pre_sle.html).About This Guide 9

  • 10 SLES 11 SP1: Storage Administration Guide

  • 1 1Overview of File Systems in LinuxSUSELinuxEnterpriseServershipswithanumberofdifferentfilesystemsfromwhichtochoose,includingExt3,Ext2,ReiserFS,andXFS.Eachfilesystemhasitsownadvantagesanddisadvantages.Professionalhighperformancesetupsmightrequireahighlyavailablestoragesystems.Tomeettherequirementsofhighperformanceclusteringscenarios,SUSELinuxEnterpriseServerincludesOCFS2(OracleClusterFileSystem2)andtheDistributedReplicatedBlockDevice(DRBD)intheSLESHighAvailabilityStorageInfrastructure(HASI)release.Theseadvancedstoragesystemsarenotcoveredinthisguide.Forinformation,seetheSUSELinuxEnterpriseServer11SP1HighAvailabilityGuide(http://www.novell.com/documentation/sle_ha/book_sleha/data/book_sleha.html). Section 1.1,Terminology,onpage 11 Section 1.2,MajorFileSystemsinLinux,onpage 12 Section 1.3,OtherSupportedFileSystems,onpage 16 Section 1.4,LargeFileSupportinLinux,onpage 16 Section 1.5,AdditionalInformation,onpage 17

    1.1 Terminologymetadata

    Adatastructurethatisinternaltothefilesystem.Itassuresthatalloftheondiskdataisproperlyorganizedandaccessible.Essentially,itisdataaboutthedata.Almosteveryfilesystemhasitsownstructureofmetadata,whichisonreasonthatthefilesystemsshowdifferentperformancecharacteristics.Itisextremelyimportanttomaintainmetadataintact,becauseotherwisealldataonthefilesystemcouldbecomeinaccessible.

    inodeAdatastructureonafilesystemthatcontainsvariousinformationaboutafile,includingsize,numberoflinks,pointerstothediskblockswherethefilecontentsareactuallystored,anddateandtimeofcreation,modification,andaccess.

    journalInthecontextofafilesystem,ajournalisanondiskstructurecontainingatypeofloginwhichthefilesystemstoreswhatitisabouttochangeinthefilesystemsmetadata.Journalinggreatlyreducestherecoverytimeofafilesystembecauseithasnoneedforthelengthysearchprocessthatcheckstheentirefilesystematsystemstartup.Instead,onlythejournalisreplayed.Overview of File Systems in Linux 11

  • 1.2 Major File Systems in LinuxSUSELinuxEnterpriseServeroffersavarietyoffilesystemsfromwhichtochoose.Thissectioncontainsanoverviewofhowthesefilesystemsworkandwhichadvantagestheyoffer.Itisveryimportanttorememberthatnofilesystembestsuitsallkindsofapplications.Eachfilesystemhasitsparticularstrengthsandweaknesses,whichmustbetakenintoaccount.Inaddition,eventhemostsophisticatedfilesystemcannotreplaceareasonablebackupstrategy.Thetermsdataintegrityanddataconsistency,whenusedinthissection,donotrefertotheconsistencyoftheuserspacedata(thedatayourapplicationwritestoitsfiles).Whetherthisdataisconsistentmustbecontrolledbytheapplicationitself.

    IMPORTANT:Unlessstatedotherwiseinthissection,allthestepsrequiredtosetuporchangepartitionsandfilesystemscanbeperformedbyusingYaST.

    Section 1.2.1,Ext2,onpage 12 Section 1.2.2,Ext3,onpage 13 Section 1.2.3,ReiserFS,onpage 14 Section 1.2.4,XFS,onpage 15

    1.2.1 Ext2TheoriginsofExt2gobacktotheearlydaysofLinuxhistory.Itspredecessor,theExtendedFileSystem,wasimplementedinApril1992andintegratedinLinux0.96c.TheExtendedFileSystemunderwentanumberofmodificationsand,asExt2,becamethemostpopularLinuxfilesystemforyears.Withthecreationofjournalingfilesystemsandtheirshortrecoverytimes,Ext2becamelessimportant.AbriefsummaryofExt2sstrengthsmighthelpunderstandwhyitwasandinsomeareasstillisthefavoriteLinuxfilesystemofmanyLinuxusers. SolidityandSpeedonpage 12 EasyUpgradabilityonpage 13

    Solidity and SpeedBeingquiteanoldtimer,Ext2underwentmanyimprovementsandwasheavilytested.Thismightbethereasonwhypeopleoftenrefertoitasrocksolid.Afterasystemoutagewhenthefilesystemcouldnotbecleanlyunmounted,e2fsckstartstoanalyzethefilesystemdata.Metadataisbroughtintoaconsistentstateandpendingfilesordatablocksarewrittentoadesignateddirectory(calledlost+found).Incontrasttojournalingfilesystems,e2fsckanalyzestheentirefilesystemandnotjusttherecentlymodifiedbitsofmetadata.Thistakessignificantlylongerthancheckingthelogdataofajournalingfilesystem.Dependingonfilesystemsize,thisprocedurecantakehalfanhourormore.Therefore,itisnotdesirabletochooseExt2foranyserverthatneedshighavailability.However,becauseExt2doesnotmaintainajournalandusessignificantlylessmemory,itissometimesfasterthanotherfilesystems.12 SLES 11 SP1: Storage Administration Guide

  • Easy UpgradabilityBecauseExt3isbasedontheExt2codeandsharesitsondiskformataswellasitsmetadataformat,upgradesfromExt2toExt3areveryeasy.

    1.2.2 Ext3Ext3wasdesignedbyStephenTweedie.Unlikeallothernextgenerationfilesystems,Ext3doesnotfollowacompletelynewdesignprinciple.ItisbasedonExt2.Thesetwofilesystemsareverycloselyrelatedtoeachother.AnExt3filesystemcanbeeasilybuiltontopofanExt2filesystem.ThemostimportantdifferencebetweenExt2andExt3isthatExt3supportsjournaling.Insummary,Ext3hasthreemajoradvantagestooffer: EasyandHighlyReliableUpgradesfromExt2onpage 13 ReliabilityandPerformanceonpage 13 ConvertinganExt2FileSystemintoExt3onpage 13

    Easy and Highly Reliable Upgrades from Ext2ThecodeforExt2isthestrongfoundationonwhichExt3couldbecomeahighlyacclaimednextgenerationfilesystem.ItsreliabilityandsolidityareelegantlycombinedinExt3withtheadvantagesofajournalingfilesystem.Unliketransitionstootherjournalingfilesystems,suchasReiserFSorXFS,whichcanbequitetedious(makingbackupsoftheentirefilesystemandrecreatingitfromscratch),atransitiontoExt3isamatterofminutes.Itisalsoverysafe,becauserecreatinganentirefilesystemfromscratchmightnotworkflawlessly.ConsideringthenumberofexistingExt2systemsthatawaitanupgradetoajournalingfilesystem,youcaneasilyseewhyExt3mightbeofsomeimportancetomanysystemadministrators.DowngradingfromExt3toExt2isaseasyastheupgrade.JustperformacleanunmountoftheExt3filesystemandremountitasanExt2filesystem.

    Reliability and PerformanceSomeotherjournalingfilesystemsfollowthemetadataonlyjournalingapproach.Thismeansyourmetadataisalwayskeptinaconsistentstate,butthiscannotbeautomaticallyguaranteedforthefilesystemdataitself.Ext3isdesignedtotakecareofbothmetadataanddata.Thedegreeofcarecanbecustomized.EnablingExt3inthedata=journalmodeoffersmaximumsecurity(dataintegrity),butcanslowdownthesystembecausebothmetadataanddataarejournaled.Arelativelynewapproachistousethedata=orderedmode,whichensuresbothdataandmetadataintegrity,butusesjournalingonlyformetadata.Thefilesystemdrivercollectsalldatablocksthatcorrespondtoonemetadataupdate.Thesedatablocksarewrittentodiskbeforethemetadataisupdated.Asaresult,consistencyisachievedformetadataanddatawithoutsacrificingperformance.Athirdoptiontouseisdata=writeback,whichallowsdatatobewrittenintothemainfilesystemafteritsmetadatahasbeencommittedtothejournal.Thisoptionisoftenconsideredthebestinperformance.Itcan,however,allowolddatatoreappearinfilesaftercrashandrecoverywhileinternalfilesystemintegrityismaintained.Ext3usesthedata=orderedoptionasthedefault.

    Converting an Ext2 File System into Ext3ToconvertanExt2filesystemtoExt3:

    1 CreateanExt3journalbyrunningtune2fs -jastherootuser.ThiscreatesanExt3journalwiththedefaultparameters.Overview of File Systems in Linux 13

  • Tospecifyhowlargethejournalshouldbeandonwhichdeviceitshouldreside,runtune2fs -

    Jinsteadtogetherwiththedesiredjournaloptionssize=anddevice=.Moreinformationaboutthetune2fsprogramisavailableinthetune2fsmanpage.

    2 Editthefile/etc/fstabastherootusertochangethefilesystemtypespecifiedforthecorrespondingpartitionfromext2toext3,thensavethechanges.ThisensuresthattheExt3filesystemisrecognizedassuch.Thechangetakeseffectafterthenextreboot.

    3 TobootarootfilesystemthatissetupasanExt3partition,includethemodulesext3andjbdintheinitrd.3a Edit/etc/sysconfig/kernelasroot,addingext3andjbdtotheINITRD_MODULES

    variable,thensavethechanges.3b Runthemkinitrdcommand.

    Thisbuildsanewinitrdandpreparesitforuse.4 Rebootthesystem.

    1.2.3 ReiserFSOfficiallyoneofthekeyfeaturesofthe2.4kernelrelease,ReiserFShasbeenavailableasakernelpatchfor2.2.xSUSEkernelssinceversion6.4.ReiserFSwasdesignedbyHansReiserandtheNamesysdevelopmentteam.IthasprovenitselftobeapowerfulalternativetoExt2.Itskeyassetsarebetterdiskspaceutilization,betterdiskaccessperformance,fastercrashrecovery,andreliabilitythroughdatajournaling. BetterDiskSpaceUtilizationonpage 14 BetterDiskAccessPerformanceonpage 14 FastCrashRecoveryonpage 14 ReliabilitythroughDataJournalingonpage 15

    Better Disk Space UtilizationInReiserFS,alldataisorganizedinastructurecalledaB*balancedtree.ThetreestructurecontributestobetterdiskspaceutilizationbecausesmallfilescanbestoreddirectlyintheB*treeleafnodesinsteadofbeingstoredelsewhereandjustmaintainingapointertotheactualdisklocation.Inadditiontothat,storageisnotallocatedinchunksof1or4KB,butinportionsoftheexactsizeneeded.Anotherbenefitliesinthedynamicallocationofinodes.Thiskeepsthefilesystemmoreflexiblethantraditionalfilesystems,likeExt2,wheretheinodedensitymustbespecifiedatfilesystemcreationtime.

    Better Disk Access PerformanceForsmallfiles,filedataandstat_data(inode)informationareoftenstorednexttoeachother.TheycanbereadwithasinglediskI/Ooperation,meaningthatonlyoneaccesstodiskisrequiredtoretrievealltheinformationneeded.

    Fast Crash RecoveryUsingajournaltokeeptrackofrecentmetadatachangesmakesafilesystemcheckamatterofseconds,evenforhugefilesystems.14 SLES 11 SP1: Storage Administration Guide

  • Reliability through Data JournalingReiserFSalsosupportsdatajournalingandordereddatamodessimilartotheconceptsoutlinedinExt3onpage 13.Thedefaultmodeisdata=ordered,whichensuresbothdataandmetadataintegrity,butusesjournalingonlyformetadata.

    1.2.4 XFSOriginallyintendedasthefilesystemfortheirIRIXOS,SGIstartedXFSdevelopmentintheearly1990s.TheideabehindXFSwastocreateahighperformance64bitjournalingfilesystemtomeetextremecomputingchallenges.XFSisverygoodatmanipulatinglargefilesandperformswellonhighendhardware.However,evenXFShasadrawback.LikeReiserFS,XFStakesgreatcareofmetadataintegrity,butlesscareofdataintegrity.AquickreviewofXFSskeyfeaturesexplainswhyitmightprovetobeastrongcompetitorforotherjournalingfilesystemsinhighendcomputing. HighScalabilitythroughtheUseofAllocationGroupsonpage 15 HighPerformancethroughEfficientManagementofDiskSpaceonpage 15 PreallocationtoAvoidFileSystemFragmentationonpage 15

    High Scalability through the Use of Allocation GroupsAtthecreationtimeofanXFSfilesystem,theblockdeviceunderlyingthefilesystemisdividedintoeightormorelinearregionsofequalsize.Thosearereferredtoasallocationgroups.Eachallocationgroupmanagesitsowninodesandfreediskspace.Practically,allocationgroupscanbeseenasfilesystemsinafilesystem.Becauseallocationgroupsareratherindependentofeachother,morethanoneofthemcanbeaddressedbythekernelsimultaneously.ThisfeatureisthekeytoXFSsgreatscalability.Naturally,theconceptofindependentallocationgroupssuitstheneedsofmultiprocessorsystems.

    High Performance through Efficient Management of Disk SpaceFreespaceandinodesarehandledbyB+treesinsidetheallocationgroups.TheuseofB+treesgreatlycontributestoXFSsperformanceandscalability.XFSusesdelayedallocation,whichhandlesallocationbybreakingtheprocessintotwopieces.ApendingtransactionisstoredinRAMandtheappropriateamountofspaceisreserved.XFSstilldoesnotdecidewhereexactly(infilesystemblocks)thedatashouldbestored.Thisdecisionisdelayeduntilthelastpossiblemoment.Someshortlivedtemporarydatamightnevermakeitswaytodisk,becauseitisobsoletebythetimeXFSdecideswhereactuallytosaveit.Inthisway,XFSincreaseswriteperformanceandreducesfilesystemfragmentation.Becausedelayedallocationresultsinlessfrequentwriteeventsthaninotherfilesystems,itislikelythatdatalossafteracrashduringawriteismoresevere.

    Preallocation to Avoid File System FragmentationBeforewritingthedatatothefilesystem,XFSreserves(preallocates)thefreespaceneededforafile.Thus,filesystemfragmentationisgreatlyreduced.Performanceisincreasedbecausethecontentsofafilearenotdistributedalloverthefilesystem.Overview of File Systems in Linux 15

  • 1.3 Other Supported File SystemsTable11summarizessomeotherfilesystemssupportedbyLinux.Theyaresupportedmainlytoensurecompatibilityandinterchangeofdatawithdifferentkindsofmediaorforeignoperatingsystems.

    Table 1-1 FileSystemTypesinLinux

    1.4 Large File Support in LinuxOriginally,Linuxsupportedamaximumfilesizeof2 GB.ThiswasenoughbeforetheexplosionofmultimediaandaslongasnoonetriedtomanipulatehugedatabasesonLinux.Becomingmoreandmoreimportantforservercomputing,thekernelandClibraryweremodifiedtosupportfilesizeslargerthan2 GBwhenusinganewsetofinterfacesthatapplicationsmustuse.Today,almostallmajorfilesystemsofferLFSsupport,allowingyoutoperformhighendcomputing.Table12offersanoverviewofthecurrentlimitationsofLinuxfilesandfilesystems.

    File System Type Description

    cramfs Compressed ROM file system: A compressed read-only file system for ROMs.hpfs High Performance File System: The IBM OS/2 standard file system. Only supported

    in read-only mode.

    iso9660 Standard file system on CD-ROMs.minix This file system originated from academic projects on operating systems and was

    the first file system used in Linux. Today, it is used as a file system for floppy disks.

    msdos fat, the file system originally used by DOS, is today used by various operating systems.

    ncpfs File system for mounting Novell volumes over networks.nfs Network File System: Here, data can be stored on any machine in a network and

    access might be granted via a network.

    smbfs Server Message Block is used by products such as Windows to enable file access over a network.

    sysv Used on SCO UNIX, Xenix, and Coherent (commercial UNIX systems for PCs).ufs Used by BSD, SunOS, and NextStep. Only supported in read-only mode.umsdos UNIX on MS-DOS: Applied on top of a standard fat file system, achieves UNIX

    functionality (permissions, links, long filenames) by creating special files.

    vfat Virtual FAT: Extension of the fat file system (supports long filenames).ntfs Windows NT file system; read-only.16 SLES 11 SP1: Storage Administration Guide

  • Table 1-2 MaximumSizesofFileSystems(OnDiskFormat)IMPORTANT:Table12describesthelimitationsregardingtheondiskformat.The2.6Linuxkernelimposesitsownlimitsonthesizeoffilesandfilesystemshandledbyit.Theseareasfollows:FileSize

    On32bitsystems,filescannotexceed2TB(241bytes).FileSystemSize

    Filesystemscanbeupto273bytesinsize.However,thislimitisstilloutofreachforthecurrentlyavailablehardware.

    1.5 Additional InformationTheFileSystemPrimer(http://wiki.novell.com/index.php/File_System_Primer)ontheNovellWebsitedescribesavarietyoffilesystemsforLinux.Itdiscussesthefilesystems,whytherearesomany,andwhichonesarethebesttouseforwhichworkloadsanddata.Eachofthefilesystemprojectsdescribedabovemaintainsitsownhomepageonwhichtofindmailinglistinformation,furtherdocumentation,andFAQs: E2fsprogs:Ext2/3/4FilesystemUtilities(http://e2fsprogs.sourceforge.net/) IntroducingExt3(http://www.ibm.com/developerworks/linux/library/lfs7.html) UsingReiserFSwithLinux(http://www.ibm.com/developerworks/aix/library/auunixreiserFS/) XFS:AHighPerformanceJournalingFilesytem(http://oss.sgi.com/projects/xfs/) OCFS2Project(http://oss.oracle.com/projects/ocfs2/)

    AcomprehensivemultiparttutorialaboutLinuxfilesystemscanbefoundatIBM developerWorksintheAdvancedFilesystemImplementorsGuide(http://www106.ibm.com/developerworks/library/lfs.html).Anindepthcomparisonoffilesystems(notonlyLinuxfilesystems)isavailablefromtheWikipediaprojectinComparisonofFileSystems(http://en.wikipedia.org/wiki/Comparison_of_file_systems#Comparison).

    File System File Size (Bytes) File System Size (Bytes)

    Ext2 or Ext3 (1 KB block size) 234 (16 GB) 241 (2 TB)

    Ext2 or Ext3 (2 KB block size) 238 (256 GB) 243 (8 TB)

    Ext2 or Ext3 (4 KB block size) 241 (2 TB) 244 -4096 (16 TB-4096 Bytes)

    Ext2 or Ext3 (8 KB block size) (systems with 8 KB pages, like Alpha)

    246 (64 TB) 245 (32 TB)

    ReiserFS v3 246 (64 TB) 245 (32 TB)

    XFS 263 (8 EB) 263 (8 EB)

    NFSv2 (client side) 231 (2 GB) 263 (8 EB)

    NFSv3 (client side) 263 (8 EB) 263 (8 EB)Overview of File Systems in Linux 17

  • 18 SLES 11 SP1: Storage Administration Guide

  • 2 2Whats New for Storage in SLES 11ThefeaturesandbehaviorchangesnotedinthissectionweremadeforSUSELinuxEnterpriseServer11.

    Section 2.1,WhatsNewinSLES11SP1,onpage 19 Section 2.2,WhatsNewinSLES11,onpage 22

    2.1 Whats New in SLES 11 SP1Inadditiontobugfixes,thefeaturesandbehaviorchangesnotedinthissectionweremadefortheSUSELinuxEnterpriseServer11SP1release. Section 2.1.1,SavingiSCSITargetInformation,onpage 19 Section 2.1.2,ModifyingAuthenticationParametersintheiSCSIInitiator,onpage 19 Section 2.1.3,AllowingPersistentReservationsforMPIODevices,onpage 20 Section 2.1.4,MDADM3.0.2,onpage 20 Section 2.1.5,BootLoaderSupportforMDRAIDExternalMetadata,onpage 20 Section 2.1.6,YaSTInstallandBootSupportforMDRAIDExternalMetadata,onpage 20 Section 2.1.7,ImprovedShutdownforMDRAIDArraysthatContaintheRootFileSystem,on

    page 20

    Section 2.1.8,MDoveriSCSIDevices,onpage 21 Section 2.1.9,MDSGPIO,onpage 21 Section 2.1.10,ResizingLVM2Mirrors,onpage 21 Section 2.1.11,UpdatingStorageDriversforAdaptersonIBMServers,onpage 21

    2.1.1 Saving iSCSI Target InformationIntheYaST>NetworkServices>iSCSITargetfunction,aSaveoptionwasaddedthatallowsyoutoexporttheiSCSItargetinformation.Thismakesiteasiertoprovideinformationtoconsumersoftheresources.

    2.1.2 Modifying Authentication Parameters in the iSCSI InitiatorIntheYaST>NetworkServices>iSCSIInitiatorfunction,youcanmodifytheauthenticationparametersforconnectingtoatargetdevices.Previously,youneededtodeletetheentryandrecreateitinordertochangetheauthenticationinformation.Whats New for Storage in SLES 11 19

  • 2.1.3 Allowing Persistent Reservations for MPIO DevicesASCSIinitiatorcanissueSCSIreservationsforasharedstoragedevice,whichlocksoutSCSIinitiatorsonotherserversfromaccessingthedevice.ThesereservationspersistacrossSCSIresetsthatmighthappenaspartoftheSCSIexceptionhandlingprocess.ThefollowingarepossiblescenarioswhereSCSIreservationswouldbeuseful: InasimpleSANenvironment,persistentSCSIreservationshelpprotectagainstadministrator

    errorswhereaLUNisattemptedtobeaddedtooneserverbutitisalreadyinusebyanotherserver,whichmightresultindatacorruption.SANzoningistypicallyusedtopreventthistypeoferror.

    Inahighavailabilityenvironmentwithfailoversetup,persistentSCSIreservationshelpprotectagainsterrantserversconnectingtoSCSIdevicesthatarereservedbyotherservers.

    2.1.4 MDADM 3.0.2UsethelatestversionoftheMultipleDevicesAdministration(MDADM,mdadm)utilitytotakeadvantageofbugfixesandimprovements.

    2.1.5 Boot Loader Support for MDRAID External MetadataSupportwasaddedtousetheexternalmetadatacapabilitiesoftheMDADMutilityversion3.0toinstallandruntheoperatingsystemfromRAIDvolumesdefinedbytheIntelMatrixStorageTechnologymetadataformat.ThismovesthefunctionalityfromtheDeviceMapperRAID(DMRAID)infrastructuretotheMultipleDevicesRAID(MDRAID)infrastructure,whichoffersthemorematureRAID5implementationandoffersawiderfeaturesetoftheMDkernelinfrastructure.ItallowsacommonRAIDdrivertobeusedacrossallmetadataformats,includingIntel,DDF(commonRAIDdiskdataformat),andnativeMDmetadata.

    2.1.6 YaST Install and Boot Support for MDRAID External MetadataTheYaSTinstallertooladdedsupportforMDRAIDExternalMetadataforRAID0,1,10,5,and6.TheinstallercandetectRAIDarraysandwhethertheplatformRAIDcapabilitiesareenabled.IfRAIDisenabledintheplatformBIOSforIntelMatrixStorageManager,itoffersoptionsforDMRAID,MDRAID(recommended),ornone.TheinitrdwasalsomodifiedtosupportassemblingBIOSbasedRAIDarrays.

    2.1.7 Improved Shutdown for MDRAID Arrays that Contain the Root File SystemShutdownscriptsweremodifiedtowaituntilalloftheMDRAIDarraysaremarkedclean.TheoperatingsystemshutdownprocessnowwaitsforadirtybittobecleareduntilallMDRAIDvolumeshavefinishedwriteoperations.Changesweremadetothestartupscript,shutdownscript,andtheinitrdtoconsiderwhethertheroot(/)filesystem(thesystemvolumethatcontainstheoperatingsystemandapplicationfiles)residesonasoftwareRAIDarray.Themetadatahandlerforthearrayisstartedearlyintheshutdownprocesstomonitorthefinalrootfilesystemenvironmentduringtheshutdown.Thehandleris20 SLES 11 SP1: Storage Administration Guide

  • excludedfromthegeneralkillallevents.Theprocessalsoallowsforwritestobequiescedandfor

    thearraysmetadatadirtybit(whichindicateswhetheranarrayneedstoberesynchronized)tobeclearedattheendoftheshutdown.

    2.1.8 MD over iSCSI DevicesTheYaSTinstallernowallowsMDtobeconfiguredoveriSCSIdevices.IfRAIDarraysareneededonboot,theiSCSIinitiatorsoftwareisloadedbeforeboot.mdsothattheiSCSItargetsareavailabletobeautoconfiguredfortheRAID.Foranewinstall,Libstoragecreatesan/etc/mdadm.conffileandaddsthelineAUTO -all.Duringanupdate,thelineisnotadded.If/etc/mdadm.confcontainsthelineAUTO -allthennoRAIDarraysareautoassembledunlesstheyareexplicitlylistedin/etc/mdadm.conf.

    2.1.9 MD-SGPIOTheMDSGPIOutilityisastandaloneapplicationthatmonitorsRAIDarraysviasysfs(2).EventstriggeranLEDchangerequestthatcontrolsblinkingforLEDlightsthatareassociatedwitheachslotinanenclosureoradrivebayofastoragesubsystem.ItsupportstwotypesofLEDsystems: 2LEDsystems(ActivityLED,StatusLED) 3LEDsystems(ActivityLED,LocateLED,FailLED)

    2.1.10 Resizing LVM 2 Mirrors Thelvresize,lvextend,andlvreducecommandsthatareusedtoresizelogicalvolumesweremodifiedtoallowtheresizingofLVM2mirrors.Previously,thesecommandsreportederrorsifthelogicalvolumewasamirror.

    2.1.11 Updating Storage Drivers for Adapters on IBM ServersUpdatethefollowingstoragedriverstousethelatestavailableversionstosupportstorageadaptersonIBMservers: Adaptec:aacraid,aic94xx Emulex:lpfc LSI:mptas,megaraid_sas

    ThemptsasdrivernowsupportsnativeEEH(EnhancedErrorHandler)recovery,whichisakeyfeatureforalloftheIOdevicesforPowerplatformcustomers.

    qLogic:qla2xxx,qla3xxx,qla4xxxWhats New for Storage in SLES 11 21

  • 2.2 Whats New in SLES 11ThefeaturesandbehaviorchangesnotedinthissectionweremadefortheSUSELinuxEnterpriseServer11release. Section 2.2.1,EVMS2IsDeprecated,onpage 22 Section 2.2.2,Ext3astheDefaultFileSystem,onpage 22 Section 2.2.3,JFSFileSystemIsDeprecated,onpage 22 Section 2.2.4,OCFS2FileSystemIsintheHighAvailabilityRelease,onpage 22 Section 2.2.5,/dev/disk/bynameIsDeprecated,onpage 23 Section 2.2.6,DeviceNamePersistenceinthe/dev/disk/byidDirectory,onpage 23 Section 2.2.7,FiltersforMultipathedDevices,onpage 23 Section 2.2.8,UserFriendlyNamesforMultipathedDevices,onpage 23 Section 2.2.9,AdvancedI/OLoadBalancingOptionsforMultipath,onpage 24 Section 2.2.10,LocationChangeforMultipathToolCallouts,onpage 24 Section 2.2.11,ChangefrommpathtomultipathforthemkinitrdfOption,onpage 24 Section 2.2.12,ChangefromMultibustoFailoverastheDefaultSettingfortheMPIOPath

    GroupingPolicy,onpage 24

    2.2.1 EVMS2 Is DeprecatedTheEnterpriseVolumeManagementSystems(EVMS2)storagemanagementsolutionisdeprecated.AllEVMSmanagementmoduleshavebeenremovedfromtheSUSELinuxEnterpriseServer11packages.YourEVMSmanageddevicesshouldbeautomaticallyrecognizedandmanagedbyLinuxVolumeManager2(LVM2)whenyouupgradeyoursystem.Formoreinformation,seeEvolutionofStorageandVolumeManagementinSUSELinuxEnterprise(http://www.novell.com/linux/volumemanagement/strategy.html).

    ForinformationaboutmanagingstoragewithEVMS2onSUSELinuxEnterpriseServer10,seetheSUSELinuxEnterpriseServer10SP3:StorageAdministrationGuide(http://www.novell.com/documentation/sles10/stor_admin/data/bookinfo.html).

    2.2.2 Ext3 as the Default File SystemTheExt3filesystemhasreplacedReiserFSasthedefaultfilesystemrecommendedbytheYaSTtoolsatinstallationtimeandwhenyoucreatefilesystems.ReiserFSisstillsupported.Formoreinformation,seeFileSystemSupport(http://www.novell.com/linux/techspecs.html?tab=2)ontheSUSELinuxEnterprise11TechSpecsWebpage.

    2.2.3 JFS File System Is DeprecatedTheJFSfilesystemisnolongersupported.TheJFSutilitieswereremovedfromthedistribution.

    2.2.4 OCFS2 File System Is in the High Availability ReleaseTheOCFS2filesystemisfullysupportedaspartoftheSUSELinuxEnterpriseHighAvailabilityExtension.22 SLES 11 SP1: Storage Administration Guide

  • 2.2.5 /dev/disk/by-name Is DeprecatedThe/dev/disk/by-namepathisdeprecatedinSUSELinuxEnterpriseServer11packages.

    2.2.6 Device Name Persistence in the /dev/disk/by-id DirectoryInSUSELinuxEnterpriseServer11,thedefaultmultipathsetupreliesonudevtooverwritetheexistingsymboliclinksinthe/dev/disk/by-iddirectorywhenmultipathingisstarted.Beforeyoustartmultipathing,thelinkpointstotheSCSIdevicebyusingitsscsi-xxxname.Whenmultipathingisrunning,thesymboliclinkpointstothedevicebyusingitsdm-uuid-xxxname.Thisensuresthatthesymboliclinksinthe/dev/disk/by-idpathpersistentlypointtothesamedeviceregardlessofwhethermultipathingisstartedornot.Theconfigurationfiles(suchaslvm.confandmd.conf)donotneedtobemodifiedbecausetheyautomaticallypointtothecorrectdevice.Seethefollowingsectionsformoreinformationabouthowthisbehaviorchangeaffectsotherfeatures:

    Section 2.2.7,FiltersforMultipathedDevices,onpage 23 Section 2.2.8,UserFriendlyNamesforMultipathedDevices,onpage 23

    2.2.7 Filters for Multipathed DevicesThedeprecationofthe/dev/disk/by-namedirectory(asdescribedinSection 2.2.5,/dev/disk/bynameIsDeprecated,onpage 23)affectshowyousetupfiltersformultipatheddevicesintheconfigurationfiles.Ifyouusedthe/dev/disk/by-namedevicenamepathforthemultipathdevicefiltersinthe/etc/lvm/lvm.conffile,youneedtomodifythefiletousethe/dev/disk/by-idpath.Considerthefollowingwhensettingupfiltersthatusetheby-idpath: The/dev/disk/by-id/scsi-*devicenamesarepersistentandcreatedforexactlythispurpose. Donotusethe/dev/disk/by-id/dm-*nameinthefilters.Thesearesymboliclinkstothe

    DeviceMapperdevices,andresultinreportingduplicatePVsinresponsetoapvscancommand.ThenamesappeartochangefromLVM-pvuuidtodm-uuidandbacktoLVM-pvuuid.

    Forinformationaboutsettingupfilters,seeSection 7.2.3,UsingLVM2onMultipathDevices,onpage 52.

    2.2.8 User-Friendly Names for Multipathed DevicesAchangeinhowmultipatheddevicenamesarehandledinthe/dev/disk/by-iddirectory(asdescribedinSection 2.2.6,DeviceNamePersistenceinthe/dev/disk/byidDirectory,onpage 23)affectsyoursetupforuserfriendlynamesbecausethetwonamesforthedevicediffer.Youmustmodifytheconfigurationfilestoscanonlythedevicemappernamesaftermultipathingisconfigured.

    Forexample,youneedtomodifythelvm.conffiletoscanusingthemultipatheddevicenamesbyspecifyingthe/dev/disk/by-id/dm-uuid-.*-mpath-.*pathinsteadof/dev/disk/by-id.Whats New for Storage in SLES 11 23

  • 2.2.9 Advanced I/O Load-Balancing Options for MultipathThefollowingadvancedI/OloadbalancingoptionsareavailableforDeviceMapperMultipath,inadditiontoroundrobin: Leastpending Lengthloadbalancing Servicetime

    Forinformation,seepath_selectorinUnderstandingPriorityGroupsandAttributesonpage 72.

    2.2.10 Location Change for Multipath Tool CalloutsThempath_*prio_calloutsfortheDeviceMapperMultipathtoolhavebeenmovedtosharedlibrariesin/lib/libmultipath/lib*.Byusingsharedlibraries,thecalloutsareloadedintomemoryondaemonstartup.Thishelpsavoidasystemdeadlockonanallpathsdownscenariowheretheprogramsneedtobeloadedfromthedisk,whichmightnotbeavailableatthispoint.

    2.2.11 Change from mpath to multipath for the mkinitrd -f OptionTheoptionforaddingDeviceMapperMultipathservicestotheinitrdhaschangedfrom-f mpathto-f multipath.Tomakeanewinitrd,thecommandisnow:mkinitrd -f multipath

    2.2.12 Change from Multibus to Failover as the Default Setting for the MPIO Path Grouping PolicyThedefaultsettingforthepath_grouping_policyinthe/etc/multipath.conf filehaschangedfrommultibustofailover.Forinformationaboutconfiguringthepath_grouping_policy,seeSection 7.6,ConfiguringPathFailoverPoliciesandPriorities,onpage 71.24 SLES 11 SP1: Storage Administration Guide

  • 3 3Planning a Storage SolutionConsiderwhatyourstorageneedsareandhowyoucaneffectivelymanageanddivideyourstoragespacetobestmeetyourneeds.UsetheinformationinthissectiontohelpplanyourstoragedeploymentforfilesystemsonyourSUSELinuxEnterpriseServer11server. Section 3.1,PartitioningDevices,onpage 25 Section 3.2,MultipathSupport,onpage 25 Section 3.3,SoftwareRAIDSupport,onpage 25 Section 3.4,FileSystemSnapshots,onpage 25 Section 3.5,BackupandAntivirusSupport,onpage 26

    3.1 Partitioning DevicesForinformationaboutusingtheYaSTExpertPartitioner,seeUsingtheYaSTPartitionerintheSUSELinuxEnterpriseServer11InstallationandAdministrationGuide.

    3.2 Multipath SupportLinuxsupportsusingmultipleI/Opathsforfaulttolerantconnectionsbetweentheserveranditsstoragedevices.Linuxmultipathsupportisdisabledbydefault.Ifyouuseamultipathsolutionthatisprovidedbyyourstoragesubsystemvendor,youdonotneedtoconfiguretheLinuxmultipathseparately.

    3.3 Software RAID SupportLinuxsupportshardwareandsoftwareRAIDdevices.IfyouusehardwareRAIDdevices,softwareRAIDdevicesareunnecessary.YoucanusebothhardwareandsoftwareRAIDdevicesonthesameserver.

    TomaximizetheperformancebenefitsofsoftwareRAIDdevices,partitionsusedfortheRAIDshouldcomefromdifferentphysicaldevices.ForsoftwareRAID1devices,themirroredpartitionscannotshareanydisksincommon.

    3.4 File System SnapshotsLinuxsupportsfilesystemsnapshots.Planning a Storage Solution 25

  • 3.5 Backup and Antivirus Support Section 3.5.1,OpenSourceBackup,onpage 26 Section 3.5.2,CommercialBackupandAntivirusSupport,onpage 26

    3.5.1 Open Source BackupOpensourcetoolsforbackingupdataonLinuxincludetar,cpio,andrsync.Seethemanpagesforthesetoolsformoreinformation. PAX:POSIXFileSystemArchiver.Itsupportscpioandtar,whicharethetwomostcommon

    formsofstandardarchive(backup)files.Seethemanpageformoreinformation. Amanda:TheAdvancedMarylandAutomaticNetworkDiskArchiver.Seewww.amanda.org

    (http://www.amanda.org/).

    3.5.2 Commercial Backup and Antivirus SupportNovellOpenEnterpriseServer(OES)2SupportPack1forLinuxisaproductthatincludesSUSELinuxEnterpriseServer(SLES)10SupportPack2.AntivirusandbackupsoftwarevendorswhosupportOES2SP1alsosupportSLES10SP2.YoucanvisitthevendorWebsitestofindoutabouttheirscheduledsupportofSLES11.Foracurrentlistofpossiblebackupandantivirussoftwarevendors,seeNovellOpenEnterpriseServerPartnerSupport:BackupandAntivirusSupport(http://www.novell.com/products/openenterpriseserver/partners_communities.html).Thislistisupdatedquarterly.26 SLES 11 SP1: Storage Administration Guide

  • 4 4LVM ConfigurationThissectionbrieflydescribestheprinciplesbehindLogicalVolumeManager(LVM)anditsbasicfeaturesthatmakeitusefulundermanycircumstances.TheYaSTLVMconfigurationcanbereachedfromtheYaSTExpertPartitioner.ThispartitioningtoolenablesyoutoeditanddeleteexistingpartitionsandcreatenewonesthatshouldbeusedwithLVM.

    WARNING:UsingLVMmightbeassociatedwithincreasedrisk,suchasdataloss.Risksalsoincludeapplicationcrashes,powerfailures,andfaultycommands.SaveyourdatabeforeimplementingLVMorreconfiguringvolumes.Neverworkwithoutabackup.

    Section 4.1,UnderstandingtheLogicalVolumeManager,onpage 27 Section 4.2,CreatingLVMPartitions,onpage 29 Section 4.3,CreatingVolumeGroups,onpage 30 Section 4.4,ConfiguringPhysicalVolumes,onpage 32 Section 4.5,ConfiguringLogicalVolumes,onpage 33 Section 4.6,ResizingaVolumeGroup,onpage 36 Section 4.7,ResizingaLogicalVolumewithYaST,onpage 36 Section 4.8,ResizingaLogicalVolumewithCommands,onpage 37 Section 4.9,DeletingaVolumeGroup,onpage 38 Section 4.10,DeletinganLVMPartition(PhysicalVolume),onpage 38

    4.1 Understanding the Logical Volume ManagerLVMenablesflexibledistributionofharddiskspaceoverseveralfilesystems.Itwasdevelopedbecausetheneedtochangethesegmentationofharddiskspacemightariseonlyaftertheinitialpartitioninghasalreadybeendoneduringinstallation.Becauseitisdifficulttomodifypartitionsonarunningsystem,LVMprovidesavirtualpool(volumegrouporVG)ofmemoryspacefromwhichlogicalvolumes(LVs)canbecreatedasneeded.TheoperatingsystemaccessestheseLVsinsteadofthephysicalpartitions.Volumegroupscanspanmorethanonedisk,sothatseveraldisksorpartsofthemcanconstituteonesingleVG.Inthisway,LVMprovidesakindofabstractionfromthephysicaldiskspacethatallowsitssegmentationtobechangedinamucheasierandsaferwaythanthroughphysicalrepartitioning.Figure41comparesphysicalpartitioning(left)withLVMsegmentation(right).Ontheleftside,onesinglediskhasbeendividedintothreephysicalpartitions(PART),eachwithamountpoint(MP)assignedsothattheoperatingsystemcanaccessthem.Ontherightside,twodiskshavebeenLVM Configuration 27

  • dividedintotwoandthreephysicalpartitionseach.TwoLVMvolumegroups(VG 1andVG 2)have

    beendefined.VG 1containstwopartitionsfromDISK 1andonefromDISK 2.VG 2containstheremainingtwopartitionsfromDISK 2.Figure 4-1 PhysicalPartitioningversusLVM

    InLVM,thephysicaldiskpartitionsthatareincorporatedinavolumegrouparecalledphysicalvolumes(PVs).WithinthevolumegroupsinFigure41,fourlogicalvolumes(LV 1throughLV 4)havebeendefined,whichcanbeusedbytheoperatingsystemviatheassociatedmountpoints.Theborderbetweendifferentlogicalvolumesneednotbealignedwithanypartitionborder.SeetheborderbetweenLV 1andLV 2inthisexample.LVMfeatures: Severalharddisksorpartitionscanbecombinedinalargelogicalvolume. Providedtheconfigurationissuitable,anLV(suchas/usr)canbeenlargedwhenthefreespace

    isexhausted. UsingLVM,itispossibletoaddharddisksorLVsinarunningsystem.However,thisrequires

    hotswappablehardwarethatiscapableofsuchactions. Itispossibletoactivateastripingmodethatdistributesthedatastreamofalogicalvolumeover

    severalphysicalvolumes.Ifthesephysicalvolumesresideondifferentdisks,thiscanimprovethereadingandwritingperformancejustlikeRAID 0.

    Thesnapshotfeatureenablesconsistentbackups(especiallyforservers)intherunningsystem.Withthesefeatures,usingLVMalreadymakessenseforheavilyusedhomePCsorsmallservers.Ifyouhaveagrowingdatastock,asinthecaseofdatabases,musicarchives,oruserdirectories,LVMisespeciallyuseful.Itallowsfilesystemsthatarelargerthanthephysicalharddisk.AnotheradvantageofLVMisthatupto256LVscanbeadded.However,keepinmindthatworkingwithLVMisdifferentfromworkingwithconventionalpartitions.Startingfromkernelversion 2.6,LVMversion 2isavailable,whichisdownwardcompatiblewiththepreviousLVMandenablesthecontinuedmanagementofoldvolumegroups.Whencreatingnewvolumegroups,decidewhethertousethenewformatorthedownwardcompatibleversion.LVM 2

    PART PART PART PART PART

    DISK

    PART PART PART

    MP MP MP MP MP MP MP

    DISK 1 DISK 2

    VG 1 VG 2

    LV 1 LV 2 LV 3 LV 428 SLES 11 SP1: Storage Administration Guide

  • doesnotrequireanykernelpatches.Itmakesuseofthedevicemapperintegratedinkernel2.6.This

    kernelonlysupportsLVMversion 2.Therefore,whentalkingaboutLVM,thissectionalwaysreferstoLVMversion 2.YoucanmanageneworexistingLVMstorageobjectsbyusingtheYaSTPartitioner.InstructionsandfurtherinformationaboutconfiguringLVMisavailableintheofficialLVMHOWTO(http://tldp.org/HOWTO/LVMHOWTO/).

    4.2 Creating LVM PartitionsForeachdisk,partitionthefreespacethatyouwanttouseforLVMas0x8E Linux LVM.YoucancreateoneormultipleLVMpartitionsonasingledevice.ItisnotnecessaryforallofthepartitionsonadevicetobeLVMpartitions.YoucanusetheVolumeGroupfunctiontogrouponeormoreLVMpartitionsintoalogicalpoolofspacecalledavolumegroup,thencarveoutoneormorelogicalvolumesfromthespaceinthevolumegroup.IntheYaSTPartitioner,onlythefreespaceonthediskismadeavailabletoyouasyouarecreatingLVMpartitions.IfyouwanttousetheentirediskforasingleLVMpartitionandotherpartitionsalreadyexistsonthedisk,youmustfirstremovealloftheexistingpartitionstofreethespacebeforeyoucanusethatspaceinanLVMpartition.

    WARNING:Deletingapartitiondestroysallofthedatainthepartition.

    1 Loginastherootuser,thenopenYaST.2 InYaST,openthePartitioner.3 (Optional)Removeoneormoreexistingpartitionstofreethatspaceandmakeitavailablefor

    theLVMpartitionyouwanttocreate.Forinformation,seeSection 4.10,DeletinganLVMPartition(PhysicalVolume),onpage 38.

    4 OnthePartitionspage,clickAdd.5 UnderNewPartitionType,selectPrimaryPartitionorExtendedPartition,thenclickNext.6 SpecifytheNewPartitionSize,thenclickNext.

    Maximum Size: Use all of the free available space on the disk.

    Custom Size: Specify a size up the amount of free available space on the disk.

    Custom Region: Specify the start and end cylinder of the free available space on the disk.LVM Configuration 29

  • 7 Configurethepartitionformat:8 ClickFinish.ThepartitionsarenotactuallycreateduntilyouclickNextandFinishtoexitthepartitioner.

    9 RepeatStep 4throughStep 8foreachLinuxLVMpartitionyouwanttoadd.10 ClickNext,verifythatthenewLinuxLVMpartitionsarelisted,thenclickFinishtoexitthe

    partitioner.

    11 (Optional)ContinuewiththeVolumeGroupconfigurationasdescribedinSection 4.3,CreatingVolumeGroups,onpage 30.

    4.3 Creating Volume GroupsAnLVMvolumegrouporganizestheLinuxLVMpartitionsintoalogicalpoolofspace.Youcancarveoutlogicalvolumesfromtheavailablespaceinthegroup.TheLinuxLVMpartitionsinagroupcanbeonthesameordifferentdisks.YoucanaddLVMpartitionsfromthesameordifferentdiskstoexpandthesizeofthegroup.AssignallpartitionsreservedforLVMtoavolumegroup.Otherwise,thespaceonthepartitionremainsunused.

    1 Loginastherootuser,thenopenYaST.2 InYaST,openthePartitioner.3 Intheleftpanel,clickVolumeManagement.

    AlistofexistingVolumeGroupsarelistedintherightpanel.

    1. Under Formatting Options, select Do not format.

    2. From the File System ID drop-down list, select 0x8E Linux LVM as the partition identifier.

    3. Under Mounting Options, select Do not mount partition.30 SLES 11 SP1: Storage Administration Guide

  • 4 AtthelowerleftoftheVolumeManagementpage,clickAddVolumeGroup.5 SpecifytheVolumeGroupName.Ifyouarecreatingavolumegroupatinstalltime,thenamesystemissuggestedforavolumegroupthatwillcontaintheSUSELinuxEnterpriseServersystemfiles.

    6 SpecifythePhysicalExtentSize.ThePhysicalExtentSizedefinesthesizeofaphysicalblockinthevolumegroup.Allthediskspaceinavolumegroupishandledinchunksofthissize.Valuescanbefrom1KBto16GBinpowersof2.Thisvalueisnormallysetto4 MB.InLVM1,a4MBphysicalextentallowedamaximumLVsizeof256GBbecauseitsupportsonlyupto65534extentsperLV.VM2doesnotrestrictthenumberofphysicalextents.HavingalargenumberofextentshasnoimpactonI/Operformancetothelogicalvolume,butitslowsdowntheLVMtools.IMPORTANT:DifferentphysicalextentsizesshouldnotbemixedinasingleVG.Theextentshouldnotbemodifiedaftertheinitialsetup.

    7 IntheAvailablePhysicalVolumeslist,selecttheLinuxLVMpartitionsthatyouwanttomakepartofthisvolumegroup,thenclickAddtomovethemtotheSelectedPhysicalVolumeslist.

    8 ClickFinish.ThenewgroupappearsintheVolumeGroupslist.

    9 OntheVolumeManagementpage,clickNext,verifythatthenewvolumegroupislisted,thenclickFinish.LVM Configuration 31

  • 4.4 Configuring Physical VolumesWhentheLinuxLVMpartitionsareassignedtoavolumegroup,thepartitionsarethenreferredtoasaphysicalvolumes.Figure 4-2 PhysicalVolumesintheVolumeGroupNamedHome

    Toaddmorephysicalvolumestoanexistingvolumegroup:1 Loginastherootuser,thenopenYaST.2 InYaST,openthePartitioner.3 Intheleftpanel,selectVolumeManagementandexpandthelistofgroups.4 UnderVolumeManagement,selectthevolumegroup,thenclicktheOverviewtab.32 SLES 11 SP1: Storage Administration Guide

  • 5 Atthebottomofthepage,clickResize.6 Selectaphysicalvolume(LVMpartitions)fromtheAvailablePhysicalVolumeslistthenclickAddtomoveittotheSelectedPhysicalVolumeslist.

    7 ClickFinish.8 ClickNext,verifythatthechangesarelisted,thenclickFinish.

    4.5 Configuring Logical VolumesAfteravolumegrouphasbeenfilledwithphysicalvolumes,usetheLogicalVolumesdialog(seeFigure43)todefineandmanagethelogicalvolumesthattheoperatingsystemshoulduse.Thisdialoglistsallofthelogicalvolumesinthatvolumegroup.YoucanuseAdd,Edit,andRemoveoptionstomanagethelogicalvolumes.Assignatleastonelogicalvolumetoeachvolumegroup.Youcancreatenewlogicalvolumesasneededuntilallfreespaceinthevolumegrouphasbeenexhausted.LVM Configuration 33

  • Figure 4-3 LogicalVolumeManagementItispossibletodistributethedatastreaminthelogicalvolumeamongseveralphysicalvolumes(striping).Ifthesephysicalvolumesresideondifferentharddisks,thisgenerallyresultsinabetterreadingandwritingperformance(likeRAID 0).However,astripingLVwithnstripescanonlybecreatedcorrectlyiftheharddiskspacerequiredbytheLVcanbedistributedevenlytonphysicalvolumes.Forexample,ifonlytwophysicalvolumesareavailable,alogicalvolumewiththreestripesisimpossible.

    1 Loginastherootuser,thenopenYaST.2 InYaST,openthePartitioner.3 Intheleftpanel,selectVolumeManagementandexpandittoseethelistofvolumegroups.4 UnderVolumeManagement,selectthevolumegroup,thenclicktheLogicalVolumestab.5 Inthelowerleft,clickAddtoopentheAddLogicalVolumedialog.6 SpecifytheNameforthelogicalvolume,thenclickNext.34 SLES 11 SP1: Storage Administration Guide

  • 7 Specifythesizeofthevolumeandwhethertousemultiplestripes.8 Specifytheformattingoptionsforthelogicalvolume:

    9 ClickFinish.10 ClickNext,verifythatthechangesarelisted,thenclickFinish.

    1. Specify the size of the logical volume, up to the maximum size available.

    The amount of free space in the current volume group is shown next to the Maximum Size option.

    2. Specify the number of stripes.

    WARNING: YaST has no chance at this point to verify the correctness of your entries concerning striping. Any mistake made here is apparent only later when the LVM is implemented on disk.

    1. Under Formatting Options, select Format partition, then select the format type from the File system drop-down list, such as Ext3.

    2. Under Mounting Options, select Mount partition, then select the mount point.

    The files stored on this logical volume can be found at this mount point on the installed system.

    3. Click Fstab Options to add special mounting options for the volume.LVM Configuration 35

  • 4.6 Resizing a Volume GroupYoucanaddandremoveLinuxLVMpartitionsfromavolumegrouptoexpandorreduceitssize.

    WARNING:Removingapartitioncanresultindatalossifthepartitionisinusebyalogicalvolume.

    1 Loginastherootuser,thenopenYaST.2 InYaST,openthePartitioner.3 Intheleftpanel,selectVolumeManagementandexpandittoseethelistofvolumegroups.4 UnderVolumeManagement,selectthevolumegroup,thenclicktheOverviewtab.5 Atthebottomofthepage,clickResize.

    6 Dooneofthefollowing: Add:Expandthesizeofthevolumegroupbymovingoneormorephysicalvolumes(LVM

    partitions)fromtheAvailablePhysicalVolumeslisttotheSelectedPhysicalVolumeslist. Remove:ReducethesizeofthevolumegroupbymovingLoneormorephysicalvolumes

    (LVMpartitions)fromtheSelectedPhysicalVolumeslisttotheAvailablePhysicalVolumeslist.7 ClickFinish.8 ClickNext,verifythatthechangesarelisted,thenclickFinish.

    4.7 Resizing a Logical Volume with YaST1 Loginastherootuser,thenopenYaST.2 InYaST,openthePartitioner.3 Intheleftpanel,selectVolumeManagementandexpandittoseethelistofvolumegroups.4 UnderVolumeManagement,selectthevolumegroup,thenclicktheLogicalVolumestab.36 SLES 11 SP1: Storage Administration Guide

  • 5 Atthebottomofthepage,clickResizetoopentheResizeLogicalVolumedialog.6 Usetheslidertoexpandorreducethesizeofthelogicalvolume.WARNING:Reducingthesizeofalogicalvolumethatcontainsdatacancausedatacorruption.

    7 ClickOK.8 ClickNext,verifythatthechangeislisted,thenclickFinish.

    4.8 Resizing a Logical Volume with CommandsThelvresize,lvextend,andlvreducecommandsareusedtoresizelogicalvolumes.Seethemanpagesforeachofthesecommandsforsyntaxandoptionsinformation.YoucanalsoincreasethesizeofalogicalvolumebyusingtheYaSTPartitioner.YaSTusesparted(8)togrowthepartition.ToextendanLVtheremustbeenoughunallocatedspaceavailableontheVG.LVscanbeextendedorshrunkwhiletheyarebeingused,butthismaynotbetrueforafilesystemonthem.ExtendingorshrinkingtheLVdoesnotautomaticallymodifythesizeoffilesystemsinthevolume.Youmustuseadifferentcommandtogrowthefilesystemafterwards.Forinformationaboutresizingfilesystems,seeChapter 5,ResizingFileSystems,onpage 39.Makesureyouusetherightsequence: IfyouextendanLV,youmustextendtheLVbeforeyouattempttogrowthefilesystem. IfyoushrinkanLV,youmustshrinkthefilesystembeforeyouattempttoshrinktheLV.

    Toextendthesizeofalogicalvolume:1 Openaterminalconsole,loginastherootuser.2 Ifthelogicalvolumecontainsfilesystemsthatarehostedforavirtualmachine(suchasaXen

    VM),shutdowntheVM.3 Dismountthefilesystemsonthelogicalvolume.4 Attheterminalconsoleprompt,enterthefollowingcommandtogrowthesizeofthelogical

    volume:LVM Configuration 37

  • lvextend -L +size /dev/vgname/lvname

    Forsize,specifytheamountofspaceyouwanttoaddtothelogicalvolume,suchas10GB.Replace/dev/vgname/lvnamewiththeLinuxpathtothelogicalvolume,suchas/dev/vg1/v1.Forexample:lvextend -L +10GB /dev/vg1/v1

    Forexample,toextendanLVwitha(mountedandactive)ReiserFSonitby10GB:lvextend L +10G /dev/vgname/lvnameresize_reiserfs s +10GB f /dev/vgname/lvnameForexample,toshrinkanLVwithaReiserFSonitby5GB:umount /mountpointofLVresize_reiserfs s 5GB /dev/vgname/lvnamelvreduce /dev/vgname/lvnamemount /dev/vgname/lvname /mountpointofLV

    4.9 Deleting a Volume GroupWARNING:Deletingavolumegroupdestroysallofthedataineachofitsmemberpartitions.

    1 Loginastherootuser,thenopenYaST.2 InYaST,openthePartitioner.3 Intheleftpanel,selectVolumeManagementandexpandthelistofgroups.4 UnderVolumeManagement,selectthevolumegroup,thenclicktheOverviewtab.5 Atthebottomofthepage,clickDelete,thenclickYestoconfirmthedeletion.6 ClickNext,verifythatthedeletedvolumegroupislisted(deletionisindicatedbyaredcolored

    font),thenclickFinish.

    4.10 Deleting an LVM Partition (Physical Volume)WARNING:Deletingapartitiondestroysallofthedatainthepartition.

    1 Loginastherootuser,thenopenYaST.2 InYaST,openthePartitioner.3 IftheLinuxLVMpartitionisinuseasamemberofavolumegroup,removethepartitionfrom

    thevolumegroup,ordeletethevolumegroup.4 IntheYaSTPartitionerunderHardDisks,selectthedevice(suchassdc).5 OnthePartitionspage,selectapartitionthatyouwanttoremove,clickDelete,thenclickYesto

    confirmthedeletion.6 ClickNext,verifythatthedeletedpartitionislisted(deletionisindicatedbyaredcoloredfont),

    thenclickFinish.38 SLES 11 SP1: Storage Administration Guide

  • 5 5Resizing File SystemsWhenyourdataneedsgrowforavolume,youmightneedtoincreasetheamountofspaceallocatedtoitsfilesystem. Section 5.1,GuidelinesforResizing,onpage 39 Section 5.2,IncreasingtheSizeofanExt2,Ext3,orExt4FileSystem,onpage 40 Section 5.3,IncreasingtheSizeofaReiserFileSystem,onpage 41 Section 5.4,DecreasingtheSizeofanExt2,Ext3,orExt4FileSystem,onpage 42 Section 5.5,DecreasingtheSizeofaReiserFileSystem,onpage 42

    5.1 Guidelines for ResizingResizinganypartitionorfilesysteminvolvessomerisksthatcanpotentiallyresultinlosingdata.

    WARNING:Toavoiddataloss,makesuretobackupyourdatabeforeyoubeginanyresizingtask.

    Considerthefollowingguidelineswhenplanningtoresizeafilesystem. Section 5.1.1,FileSystemsthatSupportResizing,onpage 39 Section 5.1.2,IncreasingtheSizeofaFileSystem,onpage 40 Section 5.1.3,DecreasingtheSizeofaFileSystem,onpage 40

    5.1.1 File Systems that Support ResizingThefilesystemmustsupportresizinginordertotakeadvantageofincreasesinavailablespaceforthevolume.InSUSELinuxEnterpriseServer11,filesystemresizingutilitiesareavailableforfilesystemsExt2,Ext3,Ext4,andReiserFS.Theutilitiessupportincreasinganddecreasingthesizeasfollows:

    Table 5-1 FileSystemSupportforResizing

    File System Utility Increase Size (Grow) Decrease Size (Shrink)

    Ext2 resize2fs Offline only Offline only

    Ext3 resize2fs Online or offline Offline only

    Ext4 resize2fs Offline only Offline only

    ReiserFS resize_reiserfs Online or offline Offline onlyResizing File Systems 39

  • 5.1.2 Increasing the Size of a File SystemYoucangrowafilesystemtothemaximumspaceavailableonthedevice,orspecifyanexactsize.Makesuretogrowthesizeofthedeviceorlogicalvolumebeforeyouattempttoincreasethesizeofthefilesystem.Whenspecifyinganexactsizeforthefilesystem,makesurethenewsizesatisfiesthefollowingconditions:

    Thenewsizemustbegreaterthanthesizeoftheexistingdata;otherwise,datalossoccurs. Thenewsizemustbeequaltoorlessthanthecurrentdevicesizebecausethefilesystemsize

    cannotextendbeyondthespaceavailable.

    5.1.3 Decreasing the Size of a File SystemWhendecreasingthesizeofthefilesystemonadevice,makesurethenewsizesatisfiesthefollowingconditions:

    Thenewsizemustbegreaterthanthesizeoftheexistingdata;otherwise,datalossoccurs. Thenewsizemustbeequaltoorlessthanthecurrentdevicesizebecausethefilesystemsize

    cannotextendbeyondthespaceavailable.Ifyouplantoalsodecreasethesizeofthelogicalvolumethatholdsthefilesystem,makesuretodecreasethesizeofthefilesystembeforeyouattempttodecreasethesizeofthedeviceorlogicalvolume.

    5.2 Increasing the Size of an Ext2, Ext3, or Ext4 File SystemThesizeofExt2,Ext3,andExt4filesystemscanbeincreasedbyusingtheresize2fscommandwhenthefilesystemisunmounted.ThesizeofanExt3filesystemcanalsobeincreasedbyusingtheresize2fscommandwhenthefilesystemismounted.

    1 Openaterminalconsole,thenloginastherootuserorequivalent.2 IfthefilesystemisExt2orExt4,youmustunmountthefilesystem.TheExt3filesystemcanbe

    mountedorunmounted.3 Increasethesizeofthefilesystemusingoneofthefollowingmethods:

    Toextendthefilesystemsizetothemaximumavailablesizeofthedevicecalled/dev/sda1,enterresize2fs /dev/sda1Ifasizeparameterisnotspecified,thesizedefaultstothesizeofthepartition.

    Toextendthefilesystemtoaspecificsize,enterresize2fs /dev/sda1 sizeThesizeparameterspecifiestherequestednewsizeofthefilesystem.Ifnounitsarespecified,theunitofthesizeparameteristheblocksizeofthefilesystem.Optionally,thesizeparametercanbesuffixedbyoneofthefollowingtheunitdesignators:sfor512bytesectors;Kforkilobytes(1kilobyteis1024bytes);Mformegabytes;orGforgigabytes.

    Waituntiltheresizingiscompletedbeforecontinuing.4 Ifthefilesystemisnotmounted,mountitnow.40 SLES 11 SP1: Storage Administration Guide

  • Forexample,tomountanExt2filesystemforadevicenamed/dev/sda1atmountpoint/home,

    enter

    mount -t ext2 /dev/sda1 /home5 Checktheeffectoftheresizeonthemountedfilesystembyentering

    df -hTheDiskFree(df)commandshowsthetotalsizeofthedisk,thenumberofblocksused,andthenumberofblocksavailableonthefilesystem.Thehoptionprintsizesinhumanreadableformat,suchas1K,234M,or2G.

    5.3 Increasing the Size of a Reiser File SystemAReiserFSfilesystemcanbeincreasedinsizewhilemountedorunmounted.

    1 Openaterminalconsole,thenloginastherootuserorequivalent.2 Increasethesizeofthefilesystemonthedevicecalled/dev/sda2,usingoneofthefollowing

    methods:

    Toextendthefilesystemsizetothemaximumavailablesizeofthedevice,enterresize_reiserfs /dev/sda2Whennosizeisspecified,thisincreasesthevolumetothefullsizeofthepartition.

    Toextendthefilesystemtoaspecificsize,enterresize_reiserfs -s size /dev/sda2Replacesizewiththedesiredsizeinbytes.Youcanalsospecifyunitsonthevalue,suchas50000K(kilobytes),250M(megabytes),or2G(gigabytes).Alternatively,youcanspecifyanincreasetothecurrentsizebyprefixingthevaluewithaplus(+)sign.Forexample,thefollowingcommandincreasesthesizeofthefilesystemon/dev/sda2by500MB:resize_reiserfs -s +500M /dev/sda2

    Waituntiltheresizingiscompletedbeforecontinuing.3 Ifthefilesystemisnotmounted,mountitnow.

    Forexample,tomountanReiserFSfilesystemfordevice/dev/sda2atmountpoint/home,entermount -t reiserfs /dev/sda2 /home

    4 Checktheeffectoftheresizeonthemountedfilesystembyenteringdf -hTheDiskFree(df)commandshowsthetotalsizeofthedisk,thenumberofblocksused,andthenumberofblocksavailableonthefilesystem.Thehoptionprintsizesinhumanreadableformat,suchas1K,234M,or2G.Resizing File Systems 41

  • 5.4 Decreasing the Size of an Ext2, Ext3, or Ext4 File SystemYoucanshrinkthesizeoftheExt2,Ext3,orExt4filesystemswhenthevolumeisunmounted.

    1 Openaterminalconsole,thenloginastherootuserorequivalent.2 Unmountthefilesystem.3 Decreasethesizeofthefilesystemonthedevicesuchas/dev/sda1byentering

    resize2fs /dev/sda1 Replacesizewithanintegervalueinkilobytesforthedesiredsize.(Akilobyteis1024bytes.)Waituntiltheresizingiscompletedbeforecontinuing.

    4 Mountthefilesystem.Forexample,tomountanExt2filesystemforadevicenamed/dev/sda1atmountpoint/home,entermount -t ext2 /dev/md0 /home

    5 Checktheeffectoftheresizeonthemountedfilesystembyenteringdf -hTheDiskFree(df)commandshowsthetotalsizeofthedisk,thenumberofblocksused,andthenumberofblocksavailableonthefilesystem.Thehoptionprintsizesinhumanreadableformat,suchas1K,234M,or2G.

    5.5 Decreasing the Size of a Reiser File SystemReiserfilesystemscanbereducedinsizeonlyifthevolumeisunmounted.

    1 Openaterminalconsole,thenloginastherootuserorequivalent.2 Unmountthedevicebyentering

    umount /mnt/pointIfthepartitionyouareattemptingtodecreaseinsizecontainssystemfiles(suchastheroot(/)volume),unmountingispossibleonlywhenbootingfromabootableCDorfloppy.

    3 Decreasethesizeofthefilesystemonadevicecalled/dev/sda1byenteringresize_reiserfs -s size /dev/sda2Replacesizewiththedesiredsizeinbytes.Youcanalsospecifyunitsonthevalue,suchas50000K(kilobytes),250M(megabytes),or2G(gigabytes).Alternatively,youcanspecifyadecreasetothecurrentsizebyprefixingthevaluewithaminus()sign.Forexample,thefollowingcommandreducesthesizeofthefilesystemon/dev/md0by500MB:resize_reiserfs -s -500M /dev/sda2Waituntiltheresizingiscompletedbeforecontinuing.

    4 Mountthefilesystembyenteringmount -t reiserfs /dev/sda2 /mnt/point

    5 Checktheeffectoftheresizeonthemountedfilesystembyentering42 SLES 11 SP1: Storage Administration Guide

  • df -h

    TheDiskFree(df)commandshowsthetotalsizeofthedisk,thenumberofblocksused,andthenumberofblocksavailableonthefilesystem.Thehoptionprintsizesinhumanreadableformat,suchas1K,234M,or2G.Resizing File Systems 43

  • 44 SLES 11 SP1: Storage Administration Guide

  • 6 6Using UUIDs to Mount DevicesThissectiondescribestheoptionaluseofUUIDsinsteadofdevicenamestoidentifyfilesystemdevicesinthebootloaderfileandthe/etc/fstabfile. Section 6.1,NamingDeviceswithudev,onpage 45 Section 6.2,UnderstandingUUIDs,onpage 45 Section 6.3,UsingUUIDsintheBootLoaderand/etc/fstabFile(x86),onpage 46 Section 6.4,UsingUUIDsintheBootLoaderand/etc/fstabFile(IA64),onpage 47 Section 6.5,AdditionalInformation,onpage 48

    6.1 Naming Devices with udevIntheLinux2.6andlaterkernel,udevprovidesauserspacesolutionforthedynamic/devdirectory,withpersistentdevicenaming.Aspartofthehotplugsystem,udevisexecutedifadeviceisaddedtoorremovedfromthesystem.Alistofrulesisusedtomatchagainstspecificdeviceattributes.Theudevrulesinfrastructure(definedinthe/etc/udev/rules.ddirectory)providesstablenamesforalldiskdevices,regardlessoftheirorderofrecognitionortheconnectionusedforthedevice.Theudevtoolsexamineeveryappropriateblockdevicethatthekernelcreatestoapplynamingrulesbasedoncertainbuses,drivetypes,orfilesystems.Forinformationabouthowtodefineyourownrulesforudev,s