Managing Systems and Workgroups: A Guide for HP-UX System Administrators

Contents
22
Copying a File System Across Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613
Dealing with File System Corruption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 613
Diagnosing a Corrupt File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 614
Locating and Correcting Corruption Using fsck . . . . . . . . . . . . . . . . . . . . . . . . . . 614
Checking an HFS File System. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 615
Checking a JFS File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 618
Differences between HFS and JFS File Checking . . . . . . . . . . . . . . . . . . . . . . 618
Replacing an Existing File System with a Smaller One . . . . . . . . . . . . . . . . . . . . . 619
If You Are Using JFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 619
If You Are Not Using Logical Volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 619
If You Are Using Logical Volumes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 620
Managing Disk Space Usage with Quotas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 620
Setting Up and Turning On Disk Quotas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 621
Turning Off Disk Quotas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625
What To Do When Exceeding a Soft Limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 625
What To Do When Exceeding a Hard Limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 626
Managing Mirrored File Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 627
Creating and Modifying Mirrored Logical Volumes . . . . . . . . . . . . . . . . . . . . . . . 628
Doing an Online Backup by Splitting a Logical Volume . . . . . . . . . . . . . . . . . . . 630
Achieving I/O Channel Separation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 630
Mirroring Root, Boot, and Primary Swap Logical Volumes for HP 9000 (PA-RISC)
Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 631
Mirroring a Boot Disk with LVM on HP-UX 11i for HP Integrity Servers . . . . . 634
Mirroring Tasks that Must be Done Using HP-UX Commands . . . . . . . . . . . . . 637
Moving a Mirrored Logical Volume to Another Disk . . . . . . . . . . . . . . . . . . . . 637
Synchronizing a Mirrored Logical Volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . 638
Replacing a Mirrored Disk. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 638
Maintaining High Availability in the Event of Disk Failure . . . . . . . . . . . . . . 640
Reinstating a Spare Disk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 642
Defragmenting a JFS File System. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 643
To defragment a JFS file system using SAM. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 643
To defragment a JFS file system using fsadm . . . . . . . . . . . . . . . . . . . . . . . . . . . 643
Daily Defragmentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 644
Converting Existing File Systems to JFS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 644
Method 1: Copying the HFS to JFS on a New Logical Volume. . . . . . . . . . . . . . . 646
Method 2: Replacing the HFS with JFS on the Existing Logical Volume . . . . . . 648
Method 3: Converting from HFS to JFS Using vxfsconvert . . . . . . . . . . . . . . . . . 650