Tru64 AdvFS
Tru64 AdvFS
AdvFS Administration
July 1999
COMPAQ, the Compaq logo, and the Digital logo are registered in the U.S. Patent and Trademark Office.
Microsoft and Windows NT are registered trademarks of Microsoft Corporation. Intel, Pentium, and Intel
Inside are registered trademarks of Intel Corporation. UNIX is a registered trademark and The Open
Group is a trademark of The Open Group in the US and other countries. Other product names mentioned
herein may be the trademarks of their respective companies.
Possession, use, or copying of the software described in this publication is authorized only pursuant to a
valid written license from Compaq Computer Corporation or an authorized sublicensor.
Compaq Computer Corporation shall not be liable for technical or editorial errors or omissions contained
herein. The information in this document is subject to change without notice.
Contents
Preface
1 Introducing AdvFS
1.1 Advanced File System Features .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 1–2
1.2 What’s New in Tru64 UNIX Version 5.0 . .. . .. . .. . .. . . .. . .. . .. . .. . 1–3
1.3 File System Design . . .. . .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 1–3
1.3.1 Filesets, File Domains and Volumes . .. . .. . .. . .. . . .. . .. . .. . .. . 1–4
1.3.2 Transaction Log . .. . .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 1–5
1.3.3 File Storage Allocation .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 1–6
1.4 License Registration . .. . .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 1–7
1.5 Related Information . . .. . .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 1–8
Contents iii
2.4.1 Configuring Filesets .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 2–17
2.4.2 The /etc/fstab File . . .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 2–17
2.4.3 Displaying Fileset Information . . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 2–18
2.4.4 Creating a Fileset . . .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 2–19
2.4.5 Upgrading a Fileset .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 2–19
2.4.6 Mounting a Fileset . .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 2–20
2.4.7 Unmounting a Fileset . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 2–20
2.4.8 Removing a Fileset .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 2–21
2.4.9 Renaming a Fileset .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 2–21
2.5 Clone Filesets . . . .. . .. . .. . .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 2–22
2.5.1 How Cloning Works .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 2–23
2.5.2 Creating a Clone Fileset . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 2–25
2.5.3 Mounting a Clone . . .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 2–25
2.5.4 Removing a Clone . . .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 2–26
2.5.5 Renaming a Clone . .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 2–26
2.6 Configuring an AdvFS root File System .. . .. . .. . .. . . .. . .. . .. . .. . 2–26
2.6.1 Mounting the root File System in Single-User Mode . . .. . 2–27
2.6.2 Changing the Name of the root File Domain . . . .. . .. . .. . .. . 2–27
2.6.3 Changing the Name of the root Fileset . . .. . .. . . .. . .. . .. . .. . 2–28
2.7 Data Logging by the Transaction Log .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 2–29
2.8 Using AdvFS with LSM .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 2–30
2.8.1 Setting Up AdvFS with LSM Volumes .. . .. . .. . . .. . .. . .. . .. . 2–31
2.8.2 Mirroring LSM Volumes Under AdvFS .. . .. . .. . . .. . .. . .. . .. . 2–33
2.8.3 Striping LSM Volumes and Striping AdvFS Files .. . .. . .. . 2–33
3 Managing Quotas
3.1 Introducing Quotas . . .. . .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 3–1
3.1.1 Quota Limits . . .. . .. . .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 3–2
3.1.2 Grace Period .. . .. . .. . .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 3–2
3.2 User and Group Quotas .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 3–3
3.2.1 Quota Files . . .. . .. . .. . .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 3–3
3.2.2 Setting Quotas and Grace Periods . . . .. . .. . .. . .. . . .. . .. . .. . .. . 3–4
3.2.2.1 User Quotas Example .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 3–5
3.2.2.2 User Grace Period Example . . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 3–6
3.2.2.3 Group Quotas Example . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 3–7
3.2.2.4 Group Grace Period Example .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 3–8
3.2.3 Setting Quotas for Multiple Users and Groups . .. . .. . .. . .. . 3–9
3.2.3.1 Prototype User Example .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 3–9
3.2.3.2 Prototype Group Example . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 3–10
3.2.4 Verifying File and Disk Space Usage .. . .. . .. . .. . . .. . .. . .. . .. . 3–11
3.2.4.1 Printing the Tag and Full Path Name for Each File . 3–12
iv Contents
3.2.4.2 Summarizing Fileset Ownership .. . .. . .. . .. . . .. . .. . .. . .. . 3–12
3.2.4.3 Displaying Disk Usage and Limits . .. . .. . .. . . .. . .. . .. . .. . 3–12
3.2.4.4 Verifying Quota Consistency . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 3–13
3.2.4.5 Summarizing Quotas by Fileset . .. . .. . .. . .. . . .. . .. . .. . .. . 3–14
3.2.5 Activating Quotas at System Startup . . .. . .. . .. . . .. . .. . .. . .. . 3–15
3.2.6 Activating Quotas Manually .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 3–16
3.2.7 Deactivating Quotas .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 3–17
3.3 Fileset Quotas . . . .. . .. . .. . .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 3–17
3.3.1 Quota Files . . .. . .. . .. . .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 3–17
3.3.2 Setting Quotas and Grace Periods . . . .. . .. . .. . .. . . .. . .. . .. . .. . 3–17
3.3.2.1 Fileset Quotas Example . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 3–18
3.3.2.2 Setting the Grace Period .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 3–19
3.3.3 Setting Quotas for Multiple Filesets .. . .. . .. . .. . . .. . .. . .. . .. . 3–20
3.3.4 Verifying File and Disk Space Usage .. . .. . .. . .. . . .. . .. . .. . .. . 3–21
3.3.4.1 Displaying Used and Available Disk Space for
Filesets . . .. . .. . .. . .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 3–21
3.3.4.2 Displaying Used and Available Disk Space for File
Domains and Filesets . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 3–22
3.3.4.3 Displaying Fileset Attributes .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 3–23
3.3.4.4 Displaying File Domain Attributes .. . .. . .. . . .. . .. . .. . .. . 3–23
3.3.5 Activating Quotas .. . .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 3–24
3.3.6 Deactivating Quotas .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 3–24
Contents v
4.5 AdvFS and NetWorker . . .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 4–9
5 Optimizing Performance
5.1 Configuring AdvFS .. . .. . .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 5–1
5.1.1 Configuring File Domains .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 5–1
5.1.2 Configuring Volumes . . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 5–1
5.1.3 Improving Transaction Log Performance .. . .. . . .. . .. . .. . .. . 5–2
5.1.4 Improving Data Transfer Rate with Direct I/O . .. . .. . .. . .. . 5–3
5.2 Tuning AdvFS . . . .. . .. . .. . .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 5–4
5.2.1 Increasing the AdvFS Buffer Cache . .. . .. . .. . .. . . .. . .. . .. . .. . 5–4
5.2.2 Defragmenting a File Domain . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 5–4
5.2.2.1 Choosing to Defragment .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 5–6
5.2.2.2 Defragment Example . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 5–7
5.2.3 Balancing a Multivolume File Domain . .. . .. . .. . . .. . .. . .. . .. . 5–8
5.2.3.1 Choosing to Balance . . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 5–9
5.2.3.2 Balance Example . . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 5–10
5.2.4 Moving Files to Different Volumes . . .. . .. . .. . .. . . .. . .. . .. . .. . 5–10
5.2.4.1 Choosing to Migrate . . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 5–12
5.2.4.2 Migrate Example . . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 5–13
5.2.5 Striping Files in a File Domain . . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 5–14
5.2.5.1 Choosing to Stripe . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 5–16
5.2.5.2 Stripe Example . .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 5–16
5.2.5.3 Removing Striping . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 5–17
5.2.6 Changing Attributes to Improve System Performance . .. . 5–17
5.2.7 Controlling Domain Panic Information .. . .. . .. . . .. . .. . .. . .. . 5–19
5.3 Using a Trashcan . . .. . .. . .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 5–19
vi Contents
6.3.2 Main Window . . .. . .. . .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 6–7
6.3.3 Devices and Volumes Window . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 6–8
6.4 Performing File System Operations . . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 6–9
6.4.1 Operations on a File Domain . . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 6–9
6.4.1.1 Creating a File Domain .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 6–10
6.4.1.2 Setting a Free Space Alert for a File Domain . .. . .. . .. . 6–11
6.4.1.3 Enlarging a File Domain . . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 6–11
6.4.1.4 Removing a File Domain .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 6–12
6.4.1.5 Renaming a File Domain . . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 6–13
6.4.2 Operations on a Fileset .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 6–13
6.4.2.1 Creating a Fileset . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 6–13
6.4.2.2 Mounting a Fileset . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 6–14
6.4.2.3 Unmounting a Fileset .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 6–14
6.4.2.4 Setting a Free Space Alert for a Fileset . .. . . .. . .. . .. . .. . 6–14
6.4.2.5 Setting Fileset Quotas .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 6–15
6.4.2.6 Removing a Fileset . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 6–15
6.4.2.7 Renaming a Fileset .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 6–16
6.4.3 Operations on a Clone Fileset . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 6–16
6.4.3.1 Creating a Clone Fileset .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 6–16
6.4.3.2 Mounting a Clone . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 6–17
6.4.3.3 Unmounting a Clone . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 6–17
6.4.3.4 Removing a Clone . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 6–17
6.4.4 Operations on a Volume . . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 6–18
6.4.4.1 Setting a Free Space Alert for a Volume .. . . .. . .. . .. . .. . 6–18
6.4.4.2 Adding a Volume . . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 6–18
6.4.4.3 Removing a Volume .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 6–18
6.4.5 Maintaining AdvFS . .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 6–19
6.4.5.1 Balancing a Multivolume File Domain . . .. . . .. . .. . .. . .. . 6–19
6.4.5.2 Defragmenting a File Domain . . . .. . .. . .. . .. . . .. . .. . .. . .. . 6–19
6.5 Troubleshooting GUI Operation . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 6–20
7 Troubleshooting
7.1 Managing Disk Space .. . .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 7–1
7.1.1 Checking Free Space and Disk Usage . . .. . .. . .. . . .. . .. . .. . .. . 7–1
7.1.2 Limiting Disk Space Usage . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 7–2
7.1.2.1 Setting User and Group Quotas . .. . .. . .. . .. . . .. . .. . .. . .. . 7–3
7.1.2.2 Setting Fileset Quotas .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 7–3
7.1.2.3 Running into Quota Limits .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 7–4
7.2 Disk File Structure Incompatibility . . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 7–4
7.2.1 Utility Incompatibility . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 7–5
7.2.2 Transaction log Incompatiblity .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 7–5
Contents vii
7.3 Memory Mapping and Data Logging Incompatibility . .. . .. . .. . 7–5
7.4 Handling Poor Performance . . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 7–5
7.5 Handling Disk Problems . . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 7–8
7.5.1 Recovering from Disk Failure . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 7–8
7.5.2 Errors Restoring from Disk . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 7–9
7.5.3 Recovering from a Domain Panic .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 7–9
7.5.4 Recovering from Filesets Mounted Read-Only . . .. . .. . .. . .. . 7–11
7.5.5 Possible Data Problems Prior to Version 4.0D . . .. . .. . .. . .. . 7–12
7.5.6 Reusing AdvFS Volumes . . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 7–15
7.5.7 Checking AdvFS Disk Structure . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 7–16
7.5.8 Salvaging File Data from a Damaged AdvFS File Domain 7–16
7.6 Restoring an AdvFS File System . . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 7–19
7.6.1 Restoring the /etc/fdmns Directory . . . .. . .. . .. . .. . . .. . .. . .. . .. . 7–19
7.6.1.1 Reconstructing the /etc/fdmns Directory Manually .. . 7–20
7.6.1.2 Reconstructing the /etc/fdmns Directory Using
advscan . .. . .. . .. . .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 7–21
7.6.2 Recovering from Failure of the root Domain .. . . .. . .. . .. . .. . 7–25
7.6.3 Restoring a Multivolume usr Domain . . .. . .. . .. . . .. . .. . .. . .. . 7–26
7.7 Recovering from a System Crash . . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 7–28
7.7.1 Verifying File System Consistency . . . .. . .. . .. . .. . . .. . .. . .. . .. . 7–28
7.7.2 Displaying Disk Structures . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 7–30
7.7.3 Moving an AdvFS Disk to Another Machine .. . . .. . .. . .. . .. . 7–30
7.7.4 Changing Operating Systems . . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 7–32
A AdvFS Commands
A.1 AdvFS Base System Commands . . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . A–1
A.2 AdvFS Utilities Commands . . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . A–4
viii Contents
B.4.2 Converting a Fileset to UFS .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . B–15
Glossary
Index
Figures
1–1 AdvFS File System Design . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 1–4
2–1 Single-Volume File Domain .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 2–9
2–2 Enlarging a File Domain . . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 2–11
2–3 Cloning a Fileset .. . .. . .. . .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 2–23
5–1 Defragmenting a File Domain .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 5–4
5–2 Balancing a File Domain . . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 5–9
5–3 Migrating Files . . .. . .. . .. . .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 5–12
5–4 Creating Striped Files . . .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 5–15
6–1 Main Window Showing Disk Usage Information .. . . .. . .. . .. . .. . 6–8
6–2 Main Window Showing Fileset Quota Information . .. . .. . .. . .. . 6–8
6–3 Devices and Volumes Window .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 6–9
Tables
1–1 AdvFS Features and Benefits .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 1–2
3–1 Quota Size Limits . .. . .. . .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 3–2
3–2 User and Group Usage Commands .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 3–11
3–3 Fileset Disk Usage Commands . . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 3–21
5–1 Trashcan Commands . .. . .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 5–20
6–1 AdvFS GUI Subsets . . .. . .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 6–2
6–2 Disk Space Requirements for the AdvFS GUI .. . .. . . .. . .. . .. . .. . 6–2
6–3 GUI Troubleshooting . .. . .. . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 6–20
7–1 Disk Space Usage Information Commands .. . .. . .. . . .. . .. . .. . .. . 7–2
7–2 User and Group Quotas Commands . . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 7–3
7–3 Fileset Quota Commands . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 7–4
7–4 Fileset Anomalies and Corrections .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 7–22
7–5 Fileset Anomalies and Corrections .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 7–23
7–6 Fileset Anomalies and Corrections .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 7–23
7–7 Disk Structure Dumping Utilities . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . 7–30
A–1 AdvFS Configuration Commands . . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . A–1
A–2 AdvFS Information Display Commands . .. . .. . .. . .. . . .. . .. . .. . .. . A–2
Contents ix
A–3 AdvFS Backup Commands . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . A–2
A–4 AdvFS Check and Repair Commands . . . .. . .. . .. . .. . . .. . .. . .. . .. . A–2
A–5 AdvFS Quota Commands . . . .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . A–3
A–6 AdvFS Disk Structure Commands . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . A–3
A–7 AdvFS Utilities Commands .. . .. . .. . .. . .. . . .. . .. . .. . .. . . .. . .. . .. . .. . A–4
x Contents
Preface
Advanced File System (AdvFS) is the default file system for the Compaq
Tru64TM UNIX® (formerly DIGITAL UNIX) operating system. It provides
rapid crash recovery and a flexible structure that allows you to manage
your file system while it is on line.
AdvFS Utilities is a layered product that extends the file system
capabilities by including utilities to add volumes, create clones, stripe files,
and balance file domains. AdvFS Utilities also includes a graphical user
interface (GUI) to simplify AdvFS management.
This guide describes AdvFS and AdvFS Utilities in detail. It provides
information on features and functions, and it gives suggestions on how to
use these functions. Many functions can be accomplished through either
the command line or GUI. The AdvFS GUI provides online help for
completing specific procedures.
Preface xi
• The Glossary contains definitions of terms unique to AdvFS or that
need clarification.
Conventions
This guide uses the following conventions:
%
$ A percent sign represents the C shell system
prompt. A dollar sign represents the system prompt
for the Bourne, Korn, and POSIX shells.
[|]
{|} In syntax definitions, brackets indicate items that
are optional and braces indicate items that are
required. Vertical bars separating items inside
brackets or braces indicate that you choose one item
from among those listed.
...
In syntax definitions, a horizontal ellipsis indicates
that the preceding item can be repeated one or
more times.
Ctrl/x This symbol indicates that you hold down the first
named key while pressing the key or mouse button
that follows the slash. In examples, this key
combination is enclosed in a box (for example,
Ctrl/C ).
xii Preface
1
Introducing AdvFS
This decoupled file system structure enables you to manage the physical
storage layer apart from the directory hierarchy layer. This means that you
can move files between a defined group of disk volumes without changing
path names for your files. Because the path names remain the same, the
action is completely transparent to end users.
AdvFS can incorporate Logical Storage Manager (LSM) volumes into the
file system structure. AdvFS configured with LSM improves file system
reliability and availability because AdvFS can take advantage of LSM
features (see Section 2.8).
Fileset A
Fileset B
Domain
ZS0820
Volume 1
Volume 2
Volume 3
When a file domain is created, AdvFS creates a transaction log for it. The
first time the domain is activated, 4 megabytes of storage are allocated for
the log. It is separate from the user data but can be stored on the same
device.
During crash recovery, AdvFS consults the transaction log to confirm file
system transactions. All completed transactions are committed to disk and
uncompleted transactions are undone. The number of uncommitted records
in the log, not the amount of data in the file system, dictates the speed of
recovery. This means that recovery usually takes only a few seconds.
Traditional UNIX file systems rely on the fsck utility to recover from a
system failure. The fsck utility can take hours to check and repair a large
file system.
By default, only file structures are logged, but you can choose to log file
data (see Section 2.7). A file that has data logging turned on will remain
internally consistent in the event of a system crash. However, enabling
data logging can slow system performance.
AdvFS differs from the traditional UNIX File System (UFS). The UFS
model is rigid. Each disk (or disk partition) contains one separate file
system; you mount the file system into the logical name space using mount
points.
The directory hierarchy layer of UFS is bound tightly to the physical
storage layer. When a file system becomes full, this tight binding makes it
impossible to move selected files onto another disk without changing the
full path names of those files. The task of dividing a logical directory into
directory subtrees and mapping the subtrees onto separate disks requires
careful consideration. Even with extensive planning, adjustments to the
directory structure are limited with the UFS model.
In contrast, with AdvFS you can modify your system configuration at any
time without taking down the system. As your system requirements
change, AdvFS allows you to easily adjust your storage up or down to meet
your requirements.
2.2 Volumes
A volume on AdvFS can be a single disk partition, an entire disk, an
aggregate volume provided by Logical Storage Manager (LSM), or hardware
or software redundant array of independent disks (RAID) storage.
A volume can be assigned to only one file domain. It is associated with its
file domain by a file domain ID, which is automatically stored in the file
domain attributes table of the volume. Each volume in a file domain is
assigned a volume index number, starting with 1, when it is initialized.
Numbers are reused when volumes are removed and new ones added.
When a volume is removed from a file domain, the file domain ID is cleared
in the file domain attributes table.
If you have the optional AdvFS Utilities, adding volumes allows you to
create a multivolume file domain, increase the disk capacity of an existing
file domain, increase the storage available for the filesets, and perform
preventative disk maintenance. You can add volumes immediately after
creating the file domain, even before creating and mounting filesets. To
perform preventative disk maintenance, you can add a new volume to the
file domain, migrate your files to the new volume, and then remove the old
volume.
For AdvFS to function properly, the number of volumes in a file domain
with the same file domain ID must remain consistent with the number of
volumes identified in the file domain attributes table. In addition, each file
domain is defined by an entry in the /etc/fdmns directory (see
Section 2.3.2). This directory must be up-to-date; that is, the file domain
entries must correctly reference the volumes associated with the domains.
The number of links to the volumes in the /etc/fdmns directory must
equal the number of volumes identified in the domain attributes table.
Establishing multiple file domains allows greater control over your physical
resources. You can create file domains to be used by specific projects,
groups of users, departments, or any division that makes sense for your
organization. For example, you could create file domains for each of your
organization’s departments, such as engineering, finance, and personnel.
When you create a file domain, a soft link is created from the file domain
entry in the /etc/fdmns directory to the block device. You cannot create a
file domain simply by creating a link in the directory.
Back up the /etc/fdmns directory regularly. If the contents of the
directory become corrupted or deleted, restore the directory from your most
recent backup. A damaged directory prevents access to the file domain
because the information matching the file domain to the physical volume
containing the filesets is incorrect; the filesets are not affected.
If you attempt to mount a fileset from a file domain with a damaged
directory, a message similar to the following for the file domain accounts
will be displayed:
Volume count mismatch for file domain accounts.
accounts expects 2 volumes, /etc/fdmns/accounts has 1 links.
All file domains created under Version 5.0 automatically have a DVN of 4.
Therefore, if you do a full install of Version 5.0, all the file domains created
in the process will have the new structure. If you update install Version
5.0, your existing file domains will retain the DVN of 3. This means that
/root, /usr, and /var will also have a DVN of 3. You will have to
upgrade the DVN 3 files manually. There is no conversion utility.
If you are running Version 5.0 and if you are running an application that
requires quota limits larger than 2 terabytes or that uses directories
containing thousands of files, you can improve performance by upgrading
your old file domain to a file domain with a DVN of 4.
To upgrade a file domain, create a new file domain on a Version 5.0 or later
system and copy all the information from the old file domain to it. If you
are unfamiliar with creating file domains, read Section 2.3.5 first. To
upgrade a file domain:
1. Back up the filesets in the domain to tape with the vdump command. It
is a good idea to use the -x option for additional protection from
saveset errors. You will lose all the data in your file domain if you
cannot restore it after creating a new domain.
ZS0826
You can set up a file domain with an LSM volume by naming the volume in
the mkfdmn command. See Section 2.8 for information about using AdvFS
with LSM. If you have AdvFS Utilities, you can change the size of your file
domain by adding more volumes. You can transform a single-volume file
domain (except the root file domain) into a multivolume file domain (see
Section 2.3.6 and Chapter 6).
If you try to create a file domain on a volume that is in use, you will get an
error message. You can override the message and create the domain. For
example, if /dev/disk/dsk3g is in use and you try to create the file
domain usr_domain, you will get the following message:
# mkfdmn /dev/disk/dsk3g usr_domain
Warning: /dev/rdisk/dsk3g is marked in use for 4.2BSD.
If you continue with the operation you can
possibly destroy existing data.
CONTINUE? [y/n] <y>
addvo
l
A newly created file domain consists of one volume, which can be a disk,
disk partition, or logical volume. To add volumes, use the AdvFS GUI (see
Chapter 6) or, from the command line, enter the addvol command:
addvol device_name domain_name
This functionality is also available from the SysMan menu.
For example, to add volume dsk3c to the file domain resources:
# addvol /dev/disk/dsk3c resources
You can add volumes immediately after creating a file domain, or you can
wait until the file domain requires additional space. You can add a volume
to an active file domain while its filesets are mounted and in use.
You cannot add a volume to the root file domain unless you are running a
cluster (see Cluster Administration). If you are running a cluster
configuration, adding another root volume is the same procedure as adding
any volume.
If you do not have AdvFS Utilities and want to increase the size of your file
domain, you must move the domain to a different volume with the vdump
and vrestore commands process (see Section 5.2.4).
To increase the size of a file domain if you have AdvFS Utilities:
1. Use the showfdmn command to display the contents of the file domain
and the current disk capacity of each volume. This step is optional.
2. Add the new volume to the file domain.
3. Remove the old volume if you do not want it.
4. Run the balance utility to even the file distribution between the
volumes. This step is not required.
AdvFS will not add a volume that would overlap a mounted file system. If
you try to add a volume that would cause partitions to overlap with
another volume that is mounted for another file system, a swap area, or a
reserved partition (by a database, for example), the system displays an
error message and does not permit the addvol procedure to complete:
You cannot add a volume with partitions that overlap with an unmounted
partition that has a disk label for a file system, a swap area, or a reserved
partition. If you attempt to add a volume that would overlap, you will get
an error message.
# addvol /dev/disk/dsk2c domain_1
Error: Partition(s) that overlap /dev/rdisk/dsk2c are marked
in use.
To edit an incorrect disklabel, use the -e flag with disklabel;
for more information see the disklabel(8) reference page.
addvol: Can’t add volume ’/dev/disk/dsk2c’ to domain ’domain_1’
If you want to overwrite partitions that are labeled in use, use the addvol
-F command. Using the -F option allows the volume to be added and
overwrites any partition that has a disk label but is not mounted.
To remove a volume, use the AdvFS GUI (see Chapter 6) or, from the
command line, enter the rmvol command:
rmvol device_name domain_name
This functionality is also available from the SysMan menu.
For example, to remove dsk3c from the file domain inventory:
# rmvol /dev/disk/dsk3c inventory
1. Use the showfdmn command to display the contents of the file domain
and the current disk capacity of each volume. This step is optional.
2. Remove the volume.
3. Run the balance utility to even the file distribution between the
remaining volumes. This step is not required.
The following example shows how to remove one disk of the domain_2 file
domain, /dev/disk/dsk2c:
# showfdmn domain_2
Id Date Created LogPgs Version Domain Name
2bb0c594.00008570 Wed Jun 9 10:23 1999 512 4 domain_2
Vol 512-Blks Free % Used Cmode Rblks Wblks Vol Name
If you remove an AdvFS volume that contains a stripe segment, the rmvol
utility moves the segment to another volume that does not already contain
a stripe segment of the same file. When a file is striped across all volumes
in the file domain, a confirmation is required before removing the volume.
If you allow the removal process to continue, more than one stripe segment
will be placed on the remaining volumes. See Section 5.2.5 for details on
file striping.
If you attempt this command when there are mounted filesets, the system
displays an error message. AdvFS will not remove an active file domain.
to
advertising#fset /fset advfs,userquota,groupquota rw 0 2
2.4 Filesets
A fileset represents a mountable portion of the directory hierarchy of a file
system. Filesets and traditional UNIX file systems are equivalent in many
ways. Like traditional file systems, you mount AdvFS filesets. Similarly,
filesets contain files, are units on which you enable quotas, and are units
for backing up data.
In contrast with traditional file systems, the directory hierarchy of AdvFS
is independent of the storage. Therefore, you can change file placement
without affecting the logical structure of the filesets.
Fileset names may be associated with their file domain names as in
filedomain#fileset. Here the pound sign (#) is part of the naming
syntax and does not represent a comment. Fileset names must be unique
within a file domain.
AdvFS also supports clone filesets. A clone fileset is a read-only copy of an
existing fileset that you create to capture your data at one instant in time
(see Section 2.5).
You can create and mount AdvFS filesets until the system runs out of
system resources (such as memory or disk space). The AdvFS SPD contains
information about this and other system limits.
For example, to automatically mount the credit fileset with user and
group quotas (assuming the fileset’s mount point exists), add the following
line to the /etc/fstab file:
acct_domain#credit /usr/credit advfs rw,userquota,groupquota 0 2
showfsets domain_name
The following example displays the file domain big_domain, which has
four filesets:
# showfsets big_domain
staff1_fs
Id : 2cb9d009.000419f4.1.8001
Files : 18554, SLim= 0, HLim= 0
Blocks(512) : 712230, SLim= 0, HLim= 0
Quota Status : user=on group=on
guest_fs
Id : 2cb9d009.000419f4.2.8001
Files : 4765, SLim= 0, HLim= 0
Blocks(512) : 388698, SLim= 0, HLim= 0
Quota Status : user=on group=on
staff2_fs
Id : 2cb9d009.000419f4.3.8001
Files : 12987, SLim= 0, HLim= 0
Blocks(512) : 842862, SLim= 0, HLim= 0
Quota Status : user=on group=on
staff3_fs
Id : 2cb9d009.000419f4.4.8001
Files : 48202, SLim= 0, HLim= 0
Blocks(512) : 1341436, SLim= 0, HLim= 0
Quota Status : user=on group=on
You can use the AdvFS GUI (see Chapter 6) to obtain similar information.
To create a fileset in a file domain, use the AdvFS GUI (see Chapter 6) or,
from the command line, enter the mkfset command:
For example, to create the fileset coupons in the file domain advertising:
See also Section 2.3.5 which contains examples for configuring an active
(filesets mounted) file domain.
To mount a fileset, use the AdvFS GUI (see Chapter 6) or, from the
command line, enter the mount command, where mnt_point is the path to
the mount point:
# umount /coupons
You can use the AdvFS GUI (see Chapter 6) to remove a fileset or, from the
command line, enter the rmfset command:
The fastest way to remove all filesets in a file domain is with the rmfdmn
command. However, the salvage command (see Section 7.5.8) may be able
to access some of the data. The rmfdmn command removes the definition of
the domain in the /etc/fdmns/ directory and relabels the volumes, but it
does not touch any data on the volume. Filesets removed with the rmfset
commmand are not recoverable with the salvage utility because the
utility destroys pointers to the fileset data (metadata) and all the files in
the fileset.
You can use the AdvFS GUI, which updates the /etc/fstab file (see
Chapter 6) to rename a fileset or, from the command line, enter the
renamefset command:
COPY-O
N-WRIT ORIGIN
E AL
OF MO VERSIONS
DIFIED
FILES
ZS0822
Once a page has been added to the clone, it is marked. If the same page is
updated again, the clone does not change. It already contains the
information that existed when the clone was created.
AdvFS allocates clone fileset space by pages (8 kilobytes). If you modify one
page in a large file, then only one additional page is allocated by the clone.
Note that if a file is modified so that pages are appended, these pages will
not appear in the clone because they were created after the clone was
created.
Unless you modify every page of every file in the original fileset during the
life of the clone, the clone fileset occupies less disk space than the original
fileset.
When you delete a file that existed when the clone was created, it remains
available (but not visible in the original fileset) for the life of the clone. The
file is not copied to the clone, but the actual delete is delayed until the
clone is deleted. The version of the file that is retained is the one that
existed when the clone was created. Later updates are lost.
The size of the clone fileset depends upon the number of updates that occur
during the life of the clone. The df command, which displays statistics on
free disk space, does not accurately reflect the size of the clone fileset
because it constantly changes as files are updated.
To remove a clone, use the AdvFS GUI (see Chapter 6) or, from the
command line, unmount the clone, and then enter the rmfset command:
rmfset domain_name clone_name
This functionality is also available from the SysMan menu.
You can put the root file system on AdvFS during the initial base-system
installation or you can convert your existing root file system after
installation. Note that when you install AdvFS as root during the initial
installation, root will default to the a partition.
If you construct your own root file system, you can configure it on the a or
c partition. See Section B.2 for instructions on converting an existing UFS
root file system to AdvFS. See the Installation Guide for instructions on
installing AdvFS as the root file system during the initial installation.
mount -u /
Use this procedure when you need to make modifications to the root
configuration. For example, use it if you need to modify your /etc/fstab
file.
Use an editor to change the entry in the /etc/fstab file that mounts the
root file domain:
root_domain#root / advfs rw,userquota,groupquota 0 2
to
root_dmn#root / advfs rw,userquota,groupquota 0 2
1. Boot a partition other than the one you want to change. (It can be
UFS.)
2. Make a new entry in the /etc/fdmns directory of the booted partition
for the fileset whose name you want to change.
3. Change to the new directory and make a symbolic link to the device
holding the original fileset.
4. Use the renamefset command to rename the root fileset.
5. Mount the newly named root fileset at a temporary location in order to
update its /etc/fstab file.
6. Change the fstab entry to correspond to the new root fileset name.
7. Shut down the alternate system.
8. Reboot the original AdvFS system.
The chfile command can be used on AdvFS files that are NFS mounted.
Both forced synchronous writes and atomic write data logging can slow
system performance. In addition, files that use atomic write data logging
cannot be memory mapped through the mmap system call to determine the
I/O. See Section 7.3 for information on improving transaction log
performance.
AdvFS treats LSM volumes just like any other volume such as a disk or a
disk partition. You can use LSM to create and manage the volumes that
you use in AdvFS file domains.
Do not use the grow or shrink LSM options to change the size
of AdvFS file domains. Use the addvol and rmvol commands.
You will get an error message if you try to create an AdvFS file domain on
an LSM volume that is already opened or on a volume that is already
labeled as in use by either UFS or AdvFS.
If you already have an AdvFS file domain, you can encapsulate the domain
into LSM using the encapsulation tools.
If mirrored or striped LSM volumes are part of an AdvFS file domain that
also includes non-LSM volumes, you do not have control over which files go
to the mirrored or striped LSM volumes. To place specific data on mirrored
or striped volumes, create an AdvFS file domain that contains only LSM
volumes with the attributes that you want. Then, put the files you want
mirrored or striped in that file domain.
The showfdmn command and the AdvFS GUI (see Chapter 6) include LSM
volumes in the file domain information display. In addition, you can use the
advscan command to locate AdvFS volumes in LSM disk groups.
It is better to add multiple small LSM volumes rather than a single, large,
striped or concatenated volume to an AdvFS file domain. This enables
AdvFS to balance and stripe I/O across volumes if necessary.
Note that you must use the full LSM path name when referencing an LSM
volume.
The following example creates a file domain on an existing LSM volume:
Once a mirror is created, you would not ordinarily split it. If you wish to
back up a mirrored volume (see Logical Storage Manager), you can mount a
mirror that has been split using the mount command with the dual option.
If you do not use the dual option, you will get the error message:
E_DOMAIN_ALREADY_EXISTS
The following example assumes that volume1 is the split mirror volume.
To remount the data from domain1#fset1 on the same system in
domain2 after a mirror has been split:
# mkdir /fileset2
# mkdir /etc/fdmns/domain2
# ln -s /dev/vol/rootdg/volume1 /etc/fdmns/domain2/volume1
# mount -o dual domain2#fset1 /fileset2
You can stripe an AdvFS file at any time (see Section 5.2.5). Therefore, if
you find that a file has become large or has heavy I/O requirements, you
can use the AdvFS stripe command to stripe it.
It is not advisable to do both LSM and AdvFS striping because this may
degrade system performance.
The following example creates a striped LSM volume and then creates an
AdvFS file domain using that striped LSM volume. All files created in this
AdvFS file domain will be striped across LSM volumes:
# volassist make vol06 600m layout=stripe nstripe=3
# mkfdmn /dev/vol/rootdg/vol06 striped_domain
AdvFS allows you to activate quotas to track and control the amount of
physical storage that each user, group, or fileset consumes. You must have
root user privilege to set and edit quotas. The root user is never restricted
by quota limits; quota limits only apply to nonroot users.
The AdvFS quota system is compatible with the Berkeley-style quotas of
UFS. However, the AdvFS quota system differs in two ways:
• AdvFS differentiates between quota maintenance and quota
enforcement. Quota information is always maintained, but enforcement
can be activated and deactivated.
• AdvFS supports fileset quotas; that is, you can set quota limits for the
filesets in a file domain.
* Prior to Version 5.0, the disk usage limit for user and group quotas was 2
terabytes. If your file domain was created prior to Version 5.0, and if you
are now running Version 5.0 or later, you must upgrade your file domain if
you wish to take advantage of the new limits (see Section 2.3.3).
All quotas can have two types of limits: hard and soft. A hard limit cannot
be exceeded. No more space can be allocated or files created. A soft limit
permits a period of time during which the limit can be exceeded as long as
the hard limit has not been exceeded.
Hard and soft limits can be set or changed by the root user at any time and
take effect the next time quotas are activated. Hard and soft limits can be
set for users, for groups, and for filesets.
The default is no quota limit. You can also:
• Set the hard limit to 0 blocks or files to impose no quota limits.
• Set the hard limit to 1 block or file to permit no disk space allocations.
• Set the soft limit to 1 block or file and the hard limit to 0 blocks or files
to permit disk-space allocations on a temporary basis. These limits
remain in effect until you unmount the fileset.
See Section 7.1.2.3 for directions if your activities cause you to run into
limits.
Use the ls command with the -s option to display how many blocks the
file actually uses:
# ls -s quota.user
16 quota.user
To enforce user and group quotas for a fileset, the /etc/fstab file must
have the following quota mount point options for the fileset:
advfs rw,userquota,groupquota 0 2
You can relocate the quota.user and quota.group files to subdirectories
of the fileset. However, you cannot relocate them to other filesets nor delete
them. If you relocate your files, you must update the /etc/fstab file entry
to include the path and name of the relocated file(s) in the userquota and
groupquota parameters.
For example, to relocate the quota.user file to the subdirectory d4 and
rename itnquot, change the /etc/fstab entry to:
dom_1#fset /mnt advfs rw,userquota=/mnt/d4/nquot,groupquota 0 2
Use the edquota command to set the quotas for users and groups and
again to change the grace period. The fileset must be mounted before you
can set quotas and grace periods. Note that for each fileset, only one grace
period can be set for all users and one grace period can be set for all
groups. However, you do not have to set the same grace period for the
number of blocks and for the number of files. The group grace period you
set is also entered as the fileset grace period (see Section 3.3.2.2).
Follow these general steps to set user and group quotas and grace periods:
To change the default editor and for more information, see edquota(8).
The quota limits you set for a fileset do not take effect until you activate
them. Use the quotaon command to activate quotas (see Section 3.2.5 and
Section 3.2.6). If you are changing quota limits and quotas have already
been activated for a fileset, the new limits become effective immediately.
If you have set quotas for a single user, you can use the edquota command
with the -p option to create prototype quota files. Then you can apply the
prototype quota to other users that you specify (see Section 3.2.3).
If quotas have already been activated for fileset test3, the new limits
become effective immediately. If quotas are not yet activated for the fileset,
the limits become effective as soon as quotas are activated (see
Section 3.2.6).
Quotas set for the group to which the user belongs take precedence over
quotas set for the user of the fileset.
When you impose soft limits for a fileset, you can set a grace period for that
fileset. If you do not specify a grace period, the grace period remains at the
AdvFS default of 7 days. You can set different grace periods for the number
of blocks and for the number of files. If the group grace period is less than a
user grace period, the user is limited by the group grace period.
1. Run the edquota command with the user grace period options. The
command creates a temporary file with an ASCII representation of the
current grace period and invokes an editor to allow you to modify the
file:
# edquota -ut
Time units may be: days, hours, minutes, or seconds
Grace period before enforcing soft limits for users:
/test1: block grace period: 7 days,file grace period: 7 days
/test3: block grace period: 7 days,file grace period: 7 days
/test4: block grace period: 7 days,file grace period: 7 days
2. To set the user grace period for the number of blocks and for the
number of files for test3, edit the file to change the existing grace
period:
Time units may be: days, hours, minutes, or seconds
Grace period before enforcing soft limits for users:
/test1: block grace period: 7 days,file grace period:7 days
/test3: block grace period: 2 days,file grace period:3 days
/test4: block grace period: 7 days,file grace period:7 days
3. Exit the editor, saving the changes.
If quotas have already been activated for the fileset test3, the new grace
period becomes effective immediately. If a user has already exceeded the
soft limit, the grace period becomes effective once the usage drops below
the soft limit. If quotas are not yet activated for the fileset, the grace period
becomes effective as soon as quotas are activated (see Section 3.2.6).
The following example sets quotas on test3 for the group rsgusers:
If quotas have already been activated for fileset test3, these limits become
effective immediately. If quotas are not yet activated for test3, these
limits become effective as soon as quotas are activated (see Section 3.2.6).
Quotas set for the group take precedence over quotas set for the individual.
When you impose soft limits, you can set one grace period per fileset for all
groups. If you do not specify a grace period, the grace period remains the
AdvFS default of 7 days. You can set different grace periods for the number
of blocks and for the number of files. The group grace period takes
precedence over all user grace periods.
The following example sets the grace period for all groups for fileset test3:
1. Run the edquota command with the group grace period options. The
command creates a temporary file with an ASCII representation of the
current grace period and invokes an editor to allow you to modify the
file:
# edquota -gt
Time units may be: days, hours, minutes, or seconds
Grace period before enforcing soft limits for groups:
/test1: block grace period: 7 days,file grace period:7 days
/test3: block grace period: 7 days,file grace period:7 days
/test4: block grace period: 7 days,file grace period:7 days
If quotas have already been activated, this grace period becomes effective
immediately unless a group has already exceeded the soft limit for test3.
In that case, the new grace period becomes effective for that group once the
group usage drops below the soft limit. If quotas are not yet activated, the
group grace period becomes effective as soon as they are activated (see
Section 3.2.6).
Use the edquota command with the -p option to take existing quota
information and establish it as a prototype user or group quota. Then apply
the prototype to one or more users or groups.
For example, to set up all student accounts to have the same disk usage
quota:
The following example sets up prototype-user quotas that are then used to
modify the quotas for other users:
The following example sets up prototype group quotas that are then used to
modify the quotas for another group:
The ncheck command lists files by tag (inode) number. By piping the
output to the sort command, you can use the sorted output as input for
the quot command to list all files and their owners. Use the following
format to generate the listing:
ncheck domain#fileset |sort +0n| quot -n domain#fileset
The quot command displays block usage and the number of files in the
fileset that each user owns. If you do not specify a fileset, the command
processes all filesets in the /etc/fstab file that include the ro, rw, and
rq mount options.
The quot command entered with no options displays only blocks:
# quot domain_1#set_1
domain_1#set_1:
34128 root
816 user5
The quot command entered with the -f option displays both blocks and
files:
# quot -f domain_1#set_1
domain_1#set_1:
34128 125 root
816 9 user5
The quota command displays the block usage, number of files, and quotas
for a user or group. Users can run this command to look at their own disk
space usage. The root user can look at usage for the whole system.
You can choose to display quota information for users or groups, for all
filesets with usage over quota, or for all mounted filesets regardless of
whether quotas are activated.
The quota command displays the block usage of the fileset, soft limit
(quota), hard limit (limit), grace period, and number of files used for each
user. An asterisk (*) in a column means that a soft quota limit has been
exceeded. Note that the grace period is not displayed unless the soft limit
has been exceeded. Use the edquota command to view complete quota
specifications.
The following example shows quota information for the group rsgusers:
# quota -g rsgusers
Disk quotas for group rsgusers (gid 15):
Filesystem blocks quota limit grace files quota limit grace
/ 118 200 300 2 20 40
/usr 13184* 10000 20000 7days 2 40 80
/test1 36136 100000 200000 124 10000 20000
/test2 44064 200000 400000 4 2000 4000
/test3 3587 30000 60000 628 3000 5000
/test4 51071 150000 300000 6 1050 1800
/test5 61044 100000 200000 3 10000 20000
The quotacheck command verifies that actual block use and number of
files are consistent with the established limits. It examines user and group
files, builds a table of current disk usage, and compares this table with that
stored in the disk quota file. If any inconsistencies are detected, AdvFS
updates both the quota file(s) and the current system copy.
If you do not activate quotas automatically at system startup (see
Section 3.2.5), it is a good practice to run the quotacheck command when
quotas are first activated (see Section 3.2.6). To ensure accuracy, run this
command when there is no activity on the system.
The quotacheck command only checks filesets that have the userquota
or groupquota option specified in the /etc/fstab file (see Section 3.2.2).
By default both user and group quotas are checked, but you can specify
either by selecting the -u option for user or the -g option for group.
The quotacheck command requires that filesets be mounted with quotas
activated. Select the -v option (verbose) to display inconsistencies found
and procedures performed during the checking process.
The following example shows a verbose check of the fileset set_1 that
displays no inconsistencies:
The following example checks all filesets that have quotas defined in the
/etc/fstab file. In this example the quotacheck command fixes
inconsistencies in /usr:
# quotacheck -va
*** Checking user and group quotas for /dev/rdisk/dsk0g (/usr)
*** Checking user and group quotas for domain_1#set_1 (/test1)
/usr: root fixed: inodes 3057 -> 3022 blocks 100616 -> 123440
/usr: system fixed: inodes 2483 -> 2488 blocks 91721 -> 114568
/usr: adm fixed: inodes 280 -> 240 blocks 487 -> 464
In this display, inodes is the number of files and blocks is the block
usage.
The repquota command displays the actual disk usage and quotas for the
specified filesets. To be included in the summary, the fileset must have a
quota entry in the /etc/fstab file. By default both user and group quotas
are reported, but you can specify either by using the -u option for user or
the -g option for group.
For each user or group, the repquota command prints the current number
of files, the amount of space used, and the quota limits established with the
edquota command.
The following example displays user and group quota information for all
filesets in /etc/fstab that have quotas defined. Note that this example
contains both UFS and AdvFS files:
You can automatically start user and group quota enforcement during
system initialization by modifying the /etc/rc.config option. Edit the
QUOTA_CONFIG option to read:
QUOTA_CONFIG=YES
1. Edit the /etc/fstab file entry for your fileset to add userquota and
groupquota to the mount point.
2. Run the edquota command to enter the hard and soft limits and to
enter the grace period.
3. Run the quotaon command to activate the quotas you have chosen.
If your system is set up to initialize quotas (see Section 3.2.5), you do not
need to run the quotaon command again unless you have unmounted your
fileset. If you have initialized your system without quota enforcement, you
must run the quotaon command to start enforcement each time you reboot.
The following example activates quotas for the filesets for which quota
values were set in the previous sections:
# quotaon -av
/test1: group quotas turned on
/test1: user quotas turned on
/test3: group quotas turned on
/test3: user quotas turned on
/test4: group quotas turned on
/test4: user quotas turned on
The quotaoff command turns off quota enforcement until the quotaon
command is run again either manually or through system initialization
that turns quotas on.
The umount command turns off quotas before it unmounts a fileset. If you
remount the fileset, you must run the quotaon command to enforce user
and group quotas for the fileset.
If you want to permanently turn quotas off for a user or group, use the
edquota command to set quota limits to 0 (zero). To prevent quotas from
ever being activated for a fileset, run the quotaoff command. Then,
remove the userquota and groupquota entries for the fileset in the
/etc/fstab file.
Use the chfsets command to define fileset quota values. You can set a soft
limit for the number of files (-F option), a hard limit for the number of files
(-f option), a soft limit for block usage (-B option), and a hard limit for
block usage (-b option). The command displays both the old and new limits.
The following example sets fileset quotas for the set_1 fileset in dmn_2.
Note that unlike the quota commands, the showfsets command displays
block usage in 512-byte blocks. If you wish to display kilobyte values, use
the -k option.
The fileset grace period is the same as the group grace period and cannot
be modified independently (see Section 3.2.2). Therefore, if you use the
edquota -gt command to change the grace period for which a fileset can
exceed its soft limits, you will also change the group grace period and vice
versa. The default AdvFS grace period of 7 days remains in effect until you
change it.
You can set only one grace period per fileset, but you can set different grace
period values for block usage and number of files. The grace period applies
to all users and all groups. If the grace period is reset, the new grace period
for the fileset takes effect immediately unless the fileset has already
exceeded its soft limits. In that case, the new grace period becomes effective
once the fileset drops below the soft limit.
The following example sets the grace period for the filesets test1, test3,
and test4:
1. Run the edquota command with the group grace period options. The
command creates a temporary file with an ASCII representation of the
current grace period and invokes an editor to allow you to modify the
file:
# edquota -gt
Time units may be: days, hours, minutes, or seconds
Grace period before enforcing soft limits for groups:
/test1: block grace period: 7 days,file grace period:7 days
/test3: block grace period: 7 days,file grace period:7 days
/test4: block grace period: 7 days,file grace period:7 days
Run the showfsets command with the -q option to see the time (if
exceeded) and fileset usage and limits:
# showfsets -q test_domain
Block (512) Limits File Limits
Fileset BF used soft hard grace used soft hard grace
fileset1 +- 1750 1500 2000 11:32 35 300 400
In this example, the plus sign (+) in the BF field means that the soft limit
for block usage is exceeded. An asterisk (*) indicates that the hard limit
has been reached.
To examine how system resources are being used, look at fileset activity.
Table 3–3 contains commands that are useful for examining disk space and
the file usage of filesets.
You can display the available disk space and the disk space used for a
fileset with the df command (see Section 3.3.4.2 for file domain
information). The command calculates capacity using the lower (hard or
soft) limit for the amount of space available:
• If a fileset quota has been set, the command displays the amount of
space remaining until the quota limit is reached.
• When both soft and hard quota limits are set, the command calculates
the disk space available using the lower limit.
• If there is less space in the domain than is allowed by the fileset quota,
the command displays the actual space available in the file domain.
• If fileset quotas have not been established, the command displays the
available domain size; all unused space is available to each fileset.
3.3.4.2 Displaying Used and Available Disk Space for File Domains and Filesets
You can specify either a file domain or a fileset name for the vdf command.
If you specify only a fileset name, the output is the same as that of the df
command. If you specify a file domain, the utility also displays the number
of disk blocks used for metadata. If you specify the -l option with either a
file domain or a fileset, both domain and fileset information will be
displayed. The domain metadata displayed is the total metadata shared by
all filesets in the file domain.
The following example shows the summary information for the file domain
usr_domain:
# vdf usr_domain
Domain 512-blocks Metadata Used Available Capacity
usr_domain 65536 11219 47549 6768 89%
The following example examines the domain test that contains two
filesets. Each has a quota limit of 60,000 blocks.
The following example shows the domain test that contains two filesets
with no quota limits. In this case, the total space available to each fileset is
the same as the domain total.
# vdf -l test
Domain 512-blocks Metadata Used Available Capacity
test 266240 5824 29128 231288 13%
The showfsets command with the -q option shows file usage, hard and
soft limits, and grace period information for the filesets in the specified
domain. It shows the block usage, the block usage limit, the number of
files, and the file limit. The correct information will be displayed only if the
fileset is mounted.
In this example, the plus sign (+) in the BF field means that the soft limit
for block usage is exceeded. An asterisk (*) would indicate that the hard
limit has been reached.
AdvFS provides extended file system backup capabilities with the vdump
and vrestore commands. The rvdump and rvrestore commands provide
the same capabilities for remote storage devices. In addition, the AdvFS
clonefset utility can be used with the vdump command to back up online
AdvFS filesets. Clone filesets provide a static snapshot of files for the
backup.
The vdump command can be used to back up AdvFS filesets as well as UFS
and other standard file systems. This means that you can have a single
backup utility for your facility. The dump and restore commands function
differently from the vdump and vrestore commands. The dump command
works at the inode level so it can handle only UFS files. The vdump
command works at the file level. It scans the directories and uses regular
POSIX file system calls to access directories and files. See vdump(8) and
vrestore(8) for more information.
In the discussion that follows, only the vdump and vrestore commands
are mentioned, but the rvdump and rvrestore commands can be
substituted for remote operation.
You do not have to be root user to use the vdump and vrestore commands.
However, the AdvFS quota files and the fileset quotas for the fileset can be
saved and restored only when the root user initiates the command. You
must have write permission for the directory to which you want to restore
files.
A saveset can span multiple tapes or a tape can contain multiple savesets.
Savesets on tapes are delimited by file marks that are written when the
saveset is closed by the vdump command.
Do not combine the output from the dump and vdump utilities on the same
tape. If the vrestore command is used to recover files from a tape created
by the dump utility, the results are unpredictable and can result in data loss.
To correctly dump the first disk block, begin by clearing the disk label with
the disklabel command and the -z flag. See vdump(8) and vrestore(8)
for more information.
Dumping with error protection requires saving one extra block for every n
blocks. It can correct only one block in each series of n blocks when the
blocks are restored. This means there is a trade-off:
• If you believe tapes are error prone or you require extremely accurate
backups and you have many tapes available for backup, set the value of
-x to 2. This will permit error correction of one bad block for every two
The rvdump command has the same options as the vdump command, but
you must specify the node name for the device that you are backing your
files to. The following example dumps a fileset sar to a tape on node
rachem:
# rvdump -0f rachem:/dev/tape/tape0 /sar
The following example backs up the pssm fileset on line by creating the
pssm_clone fileset and backing it up to the default device. The file domain
in this example is domain1.
# clonefset domain1 pssm pssm_clone
# mkdir /pssm_clone
# mount -t advfs domain1#pssm_clone /pssm_clone
# vdump -0 -u -C /pssm_clone
1. Shut down the database so that all database buffers are flushed and
the fileset has a complete, consistent copy of the database files.
2. Clone the fileset and mount the clone.
3. Reactivate the database.
4. When you want to back up the clone fileset, run a backup procedure
such as the vdump utility or DIGITAL NetWorker.
5. Unmount and delete the clone.
If your database has files spread over multiple AdvFS filesets, it is a good
idea to create a clone on each of the filesets at the same time. This ensures
a consistent back up of all the database information.
You do not have to be root user to run the vrestore command, but you
must have write privilege for the directory you will restore to. Only the root
user can restore quota files and fileset quotas. See vrestore(8) for details.
The vrestore command can also selectively restore files from your saveset
with the -x option followed by the file names. You can specify a destination
path other than the current directory for the restored files.
The following example restores the file named data_file from the
/mnt/fdump saveset. It is restored to the /mnt directory.
# vrestore -f /mnt/fdump -D /mnt -x data_file
vrestore: Date of the vdump save-set: Tue Jun 15 15:27:36 1999
AdvFS provides a number of ways to configure and tune your file system.
Some of the tuning functions are available through the AdvFS GUI (see
Chapter 6). The System Configuration and Tuning manual provides
detailed information.
It is helpful to understand how your system will be used before you
configure and tune your system. Be careful not to optimize toward a
workload that is not easily understood or that may change.
1. Use the showfdmn command to determine the location of the log. The
letter L after the volume number indicates the volume on which the
log resides.
2. Use the switchlog command to move the log to another volume:
switchlog domain_name new_volume_number
For example, to move the transaction log for the file domain january:
# showfdmn january
Id Date Created LogPgs Version Domain Name
31bf51ba.0001be10 Wed Jun 9 16:24 1999 512 4 january
Moving the transaction log may also be useful when you are using LSM
and wish to increase reliability by placing your transaction log on a volume
that is mirrored.
Direct I/O is particularly suited for files that are used exclusively by a
database. However, if an application tends to access data multiple times,
direct I/O can adversely impact performance because caching will not occur.
As soon as you specify direct I/O, it takes precedence and any data already
in the buffer cache for that file will automatically be flushed to disk.
To open a file for direct I/O, use the open() function and specify the
O_DIRECTIO flag. If the file is already open for direct I/O or is in cached
mode, the new mode will be direct I/O and will remain so until the last
close of the file. Note that direct I/O, atomic write data logging, and
mmapping are mutually exclusive modes. Therefore, if the file is already
open for atomic write data logging or is mmapped, then calling the open
function to initiate direct I/O will fail.
The fcntl() function can be used to determine whether the file is open in
cached or in direct I/O mode. See fnctl(2) and open(2) or the
Programmer’s Guide for more information.
ZS0823
defra
gment
You can improve the efficiency of the defragment process by deleting any
unneeded files in the file domain before running the defragment utility.
Aborting the defragment process does not damage the file system. Files
that have been defragmented remain in their new locations.
To defragment a file domain, use the AdvFS GUI (see Chapter 6) or, from
the command line, enter the defragment command:
defragment domain_name
You can use the showfile command to check the number of file extents of
individual files. For example, to show the attributes and extent information
for the orig_file_1 file:
Pass 1;
Volume 2: area at block 144 ( 130800 blocks): 0% full
Volume 1: area at block 468064 ( 539008 blocks): 49% full
Domain data as of the start of this pass:
Extents: 7717
Files w/extents: 6436
Avg exts per file w/exts: 1.20
Aggregate I/O perf: 78%
Free space fragments: 904
<100K <1M <10M >10M
Free space: 4% 5% 12% 79%
Fragments: 825 60 13 6
Pass 3;
Domain data as of the start of this pass:
Extents: 6522
Files w/extents: 6436
Avg exts per file w/exts: 1.01
Aggregate I/O perf: 99%
Free space fragments: 710
<100K <1M <10M >10M
Free space: 3% 11% 21% 65%
Fragments: 546 126 32 6
Files are moved from one volume to another, as illustrated in Figure 5–2,
until the percentage of used space on each volume in the domain is as
equal as possible. Because the balance utility does not generally split
files, file domains with very large files may not balance as evenly as file
domains with smaller files.
To redistribute files across volumes use the AdvFS GUI (see Chapter 6) or,
from the command line, enter the balance command:
balance domain_name
This functionality is also available from the SysMan menu.
If you interrupt the balance process, all relocated files remain at their new
locations. The rest of the files remain in their original locations.
The following restrictions apply to running the balance utility:
• You must have root user privileges.
• All filesets in the file domain must be mounted. If you try to balance an
active file domain that includes unmounted filesets, you will get an
error message.
• A minimum free space of 1% of the total space or 5 megabytes per
volume (whichever is less) must exist in order to run.
• The balance utility cannot run while the addvol, rmvol,
defragment, or rmfset command is running in the same file domain.
See balance(8) for more information.
To determine if you need to balance your files across volumes, use the
showfdmn command to display file domain information. From the % used
field you can determine if the files are evenly distributed.
1. Make a new file domain on the new device. It must have a temporary
new name.
2. For each fileset in the old file domain, create a fileset with the same
name in the corresponding new file domain.
3. Create a temporary mount point directory.
4. Mount the new filesets on the temporary mount point.
5. Use the vdump command to copy the filesets from the old device. Use
the vrestore command to restore them to the newly mounted filesets.
6. Unmount the old and new filesets.
7. Rename the new file domain to the old name. Since you have not
changed the file domain and fileset names, it is not necessary to edit
the /etc/fstab file.
8. Mount the new filesets using the mount points of the old filesets. The
directory tree will then be unchanged. Delete the temporary mount
point directory.
If you are running Version 5.0 or later, the new file domain is created with
the new DVN of 4 (see Section 2.3.3). However, if you must retain the DVN
of 3 in order to use earlier versions of the operating system, see mkfdmn(8).
The vdump and vrestore utilities are not affected by the change of DVN.
The following example moves the file domain accounts with the fileset
technical to volume dsk3c using the same fileset names. The file domain
new_accounts is the temporary file domain. Assume the fileset
accounts#technical is mounted on /technical. Assume that the
/etc/fstab file has an entry to mount accounts#technical on
/technical.
# mkfdmn /dev/disk/dsk3c new_accounts
# mkfset new_accounts technical
# mkdir /tmp_mnt
# mount new_accounts#technical /tmp_mnt
# vdump -dxf - /technical|vrestore -xf - -D /tmp_mnt
# umount /technical
# umount /tmp_mnt
# rmfdmn accounts
# mv /etc/fdmns/new_accounts/ /etc/fdmns/accounts/
# mount /technical
# rmdir /tmp_mnt
migra
te
ZS0829
To move an entire file to a specific volume, use the migrate command with
the -d option:
migrate -s -d destination_vol_index file_name
Choose the migrate utility over the balance utility when you want to
control the files that are moved. The balance utility moves files only to
optimize distribution. For example, it might move many small files when
moving a single larger one would be a better solution for your system.
The file src consists of 11 file extents. This file would be a good candidate
to move to another volume to reduce the number of file extents.
The following example migrates the file src examined above. The number
of file extents is decreased:
# migrate -d 2 src
# showfile -x src
Id Vol PgSz Pages XtntType Segs SegSz I/O Perf File
8.8002 1 16 11 simple ** ** async 100% src
extentMap: 1
pageOff pageCnt vol volBlock blockCnt
0 11 2 45536 176
extentCnt: 1
The file src now resides on volume 2, consists of one file extent, and has a
100% performance efficiency. Note that in the output above, the first data
ZS0830
strip
e
The stripe utility, as illustrated in Figure 5–4, lets you direct a file to
distribute segments across specific disks (or volumes) within a file domain.
Zero-length files are striped before data is written to the file. The stripe
width is 64 kilobytes. However, you can specify the number of volumes over
which your file is striped.
As the file is appended, AdvFS determines the number of pages per stripe
segment; the segments alternate among the disks in a sequential pattern.
For example, the file system allocates the first segment of a two-disk
striped file on the first disk and the next segment on the second disk. This
completes one sequence, or stripe. The next stripe starts on the first disk,
and so on. Because AdvFS spreads the I/O of the striped file across the
specified disks, the sequential read/write performance of the file increases.
To stripe a file and specify the number of volumes in the file domain over
which the file should be striped, enter the stripe command:
stripe -n volume_count filename
To stripe a file:
For example, to stripe the file shift, which already contains data, across
two volumes in the file domain:
# touch newshift
# stripe -n 2 newshift
# cp shift newshift
Before you use the stripe utility, run the iostat utility (see iostat(1)) to
determine if disk I/O is the bottleneck operation. The blocks per second and
transactions per second should be cross checked with the drive’s sustained
transfer rate. If the disk access is slow, then striping is one of the ways to
improve performance (see Section 7.4). Maximum stripe performance will
be achievable if each stripe disk is on its own disk controller.
Do not use LSM striping and AdvFS striping at the same time. This has
the potential to degrade performance (see Section 2.8.3).
The following example creates an empty file, stripes it, copies data into the
striped file, then shows the extents of the striped file:
1. Create the empty file file_1 and stripe it across three volumes in a
domain:
# touch file_1
# ls -l file_1
-rw-r--r-- 1 root system 0 Oct 14 11:06 file_1
# stripe -n 3 file_1
2. Copy the data from the original file to the striped file:
# cp orig_file_1 file_1
3. Examine the extents of the new striped file:
# showfile -x file_1
Id Vol PgSz Pages XtntType Segs SegSz I/O Perf File
7.8001 1 16 71 stripe 3 8 async 100% file_1
extentMap: 1
pageOff pageCnt volIndex volBlock blockCnt
0 8 2 42400 384
24 8
48 8
extentCnt: 1
extentMap: 3
pageOff pageCnt volIndex volBlock blockCnt
16 8 1 186784 368
40 8
64 7
extentCnt: 1
The AdvFS Graphical User Interface (GUI), available with AdvFS Utilities,
provides a visual representation of the AdvFS file system. The GUI is
designed to run under the Common Desktop Environment (CDE). You can
use the GUI as a remote manager to monitor your system or to search for
available volumes. The GUI does not exactly duplicate the file system
management tasks available from the command line. Rather, it allows you
to visualize your file system structure and perform the most common
operations on volumes, file domains, filesets, and clones.
To access this utility, you must register the AdvFS Utilities license and you
must have root-user privilege. For information about license activation see
Section 1.4.
Table 6–1 contains the subset titles, names, and descriptions of the subsets
that make up the AdvFS GUI. The disk space requirements for loading and
running AdvFS Utilities software subsets are shown in Table 6–2.
Managing the Advanced File System with the AdvFS GUI 6–1
Table 6–1: AdvFS GUI Subsets
Subset Name Description
AdvFS Utilities (OSFADVFS500) Contains a set of advanced
utilities licensed for managing
AdvFS
AdvFS Graphical (OSFXADVFS500) Contains the AdvFS Graphical
User Interface User Interface and online help
(dtadvfs) files
AdvFS Agent (OSFADVFSDAEMON500) Contains the AdvFS agent,
(advfsd) which runs in the traditional
style of the UNIX daemon
AdvFS Japanese (OISJPXADVFS500) Localization files that must
Graphical User also be loaded when the
Interface Japanese version of the GUI
is run
Under normal conditions, advfsd does not need to be run manually. If you
wish to start or stop the agent, do so from the command line (see
advfsd(8)). Only one agent can be running on a system at a given time. If
you attempt to start a second copy of advfsd, it will fail.
6–2 Managing the Advanced File System with the AdvFS GUI
The agent allows Simple Network Management Protocol (SNMP) clients
such as NetView® or Performance Manager (PM) to request AdvFS
information. This is not a two-way path: SNMP clients cannot issue system
configuration commands to advfsd.
If the agent is not running, the GUI cannot operate. The agent periodically
asks for information from the system on which it is running. It then
updates the file systems and the storage device information passed to the
GUI display. It also evaluates any free space alert conditions. The time
interval for when the agent scans the system disks is the agent state
monitor interval. To change the agent state monitor interval, see
Section 6.3.1. The interval is saved between restarts of the agent.
Each Tru64 UNIX system that the GUI will manage has two optional
security files associated with it: a password file and a file of allowable
hosts. The password file restricts the use of the GUI managing a particular
system to administrators who know the password. The allowable hosts file
allows only GUIs running on systems listed in the file to remotely manage
Managing the Advanced File System with the AdvFS GUI 6–3
it. These files are configured through an editor of your choice. They cannot
be accessed directly from the GUI.
The root user creates the password file,
/var/advfs/daemon/socket/gui.passwd, on the system for which the
password is to be used. There is one password file containing one password
per system. (It is not a good idea to use the root password.) The file
contains the password in plain text. Only users who enter the correct
password can run a GUI connected to the system. A user wishing to use the
GUI to manage the system from a remote location must know this
password in order to connect to the system.
The allowable hosts file, /var/advfs/daemon/socket/hosts.allow, is
also created by the root user. It contains a plain text list of all systems
(hosts) on which a GUI may operate to manage the system. The
hosts.allow file will automatically include the GUI running locally on the
system; that is, it will include itself. If you want to allow others to remotely
manage your system, you must include them in your hosts.allow file to
authorize the agent to send your file system information to their system. If
you have protected your system with a password in the system’s
gui.passwd file, remote users will also have to know that password.
See advfsd(8) and dtadvfs(8) for more information.
6–4 Managing the Advanced File System with the AdvFS GUI
/var/advfs/gui/advfs_gui.log, as processing proceeds. It is a good
idea to periodically check these files. Both the agent and the GUI log files
are periodically renamed to prevent unrestricted consumption of disk space.
6.2.2.4 Help
The help system contains background information about the AdvFS file
system as well as specific information about the GUI. Each operation is
described. Detailed explanations of the dialog boxes used to perform file
system activities are provided.
From your system you can remotely monitor file systems that have your
system listed in their hosts.allow file. You can attach to these systems
through the GUI:
If you try to connect to a host but are unsuccessful, you are no longer
connected to any host so you must repeat the connection process for
another system.
Note that the host list is for convenience only. It does not provide any
additional security. You can always type a host name in the Selection block
of the Select a Host dialog box.
If you are using LSM volumes, it is important to know how the GUI treats
these volumes:
• An LSM volume will be listed as available if it is labeled unused.
• Do not use LSM to change the size of an LSM volume that is in use by
an AdvFS file domain. AdvFS is unable to accommodate this change.
• If you have added the LSM volume /dev/vol/volname to the file
domain from the command line, the AdvFS GUI does not recognize that
it is the same as /dev/vol/rootdg/volname. If the volume has
mounted filesets, it will appear as unknown in the Devices and Volumes
window; if it has no mounted filesets, it will appear as unavailable. If
Managing the Advanced File System with the AdvFS GUI 6–5
you try to add it to a file domain, you will get an error message saying
it is in use.
• If you encapsulate a volume in use by AdvFS into LSM while the GUI
is running, the volume name will not be updated in the GUI window.
You must exit and restart the GUI to display the correct name.
6–6 Managing the Advanced File System with the AdvFS GUI
does not work for hosts, devices, or partitions or for the volume icon in the
Devices and Volumes window. Single-clicking an object in an object tree
only highlights it. No new information is presented.
Clicking the right mouse button on an object brings up a list of commands
appropriate for that object.
If you attempt to access a menu item and find it unavailable (grayed out),
check that the appropriate object is highlighted. For example, you need to
select a fileset before you can create a clone for it.
Managing the Advanced File System with the AdvFS GUI 6–7
Figure 6–1: Main Window Showing Disk Usage Information
From the Main window you can also view fileset quota information, as
shown in Figure 6–2, by choosing Fileset Quotas from the View menu.
You can return to viewing file domain, fileset, and volume information by
selecting the items you wish to view from the same View menu.
The Devices and Volumes window, as shown in Figure 6–3, shows disk
groups and logical volumes. It identifies the size and type of disks and what
each partition is used for. This view is particularly useful if you wish to
enlarge your file domain and need to locate a volume to use. From the View
6–8 Managing the Advanced File System with the AdvFS GUI
menu of the Devices and Volumes window, you can sort your objects, choose
to show only available volumes, or choose to show overlapped volumes.
Managing the Advanced File System with the AdvFS GUI 6–9
6.4.1.1 Creating a File Domain
To create a file domain, you must assign a name and select an initial
volume. You can set a free space alert.
If your system predates DIGITAL UNIX 4.0D, you will have the option to
access Advanced options that modify the bitfile metadata table (BMT).
This will allow you to avoid out-of-space messages that may occur for file
systems that contain a very large number of files (over about 50,000), such
as file systems that support Usenet news servers. (Later versions of the
operating system do not have this problem and the option is not offered.)
A file domain is not completely defined until you have created at least one
fileset. A file domain is not active unless there is a mounted fileset. To
create a file domain using the Main window:
If you are not certain what storage device to use for the new file domain,
work from the Devices and Volumes window (on the Configuration menu) to
get a complete view of the storage on your system:
6–10 Managing the Advanced File System with the AdvFS GUI
see the Main window instructions above for directions on using the
Advanced button.
Set a free space alert to inform you when the free space threshold in the
file domain is reached or passed. When you set the alert, you can choose to
automatically run a script when the alert threshold is crossed. See
/usr/advfs/daemon/scripts for examples of scripts used by the agent
to execute commands.
To set the free space alert from the Main window:
You must reset the free space alert when the size of a file domain has
changed. Free space alert values are evaluated using actual size (for
example, kilobytes), not percentage of space.
Add volumes to transform a single-volume file domain (except the root file
domain, which can only have one volume) into a multivolume file domain or
to enlarge a multivolume file domain (see Section 2.3.6).
To add a volume to a file domain:
If you do not know which volume to add to your file domain, work from the
Devices and Volumes window to get a complete view of the storage on your
system:
Managing the Advanced File System with the AdvFS GUI 6–11
2. In the Devices and Volumes window, choose Show available volumes
only from the View menu.
3. Click a volume that is labeled available.
4. Choose Add to file domain from the Configuration menu.
5. In the Add Volume dialog box, choose the file domain to which the new
volume will be added.
It is a good idea to balance your file domain after you have added a volume.
This will distribute existing files to the new volume.
You can delete a file domain only after all filesets and clone filesets in the
file domain are unmounted. You will get an error message if you try to
remove a domain with mounted filesets. When you remove a file domain as
a method of deleting all filesets, its entry in the /etc/fdmns directory is
removed. However, this may present a security hole since only pointers are
changed and no data on the volume is removed. It may be possible to
access the fileset data from the command line with the salvage utility (see
Section 7.5.8). If you need the increased security, remove each fileset
individually.
The deleted file domain name remains in the /etc/fstab file unless you
modify the file by choosing the Modify /etc/fstab option in the dialog box or
change it from the command line. If you do not update this file, you will get
error messages when you reboot the system or when you enter a mount -a
command from the command line. If you do not delete the file name from
the /etc/fstab file, you can do so at a later time from the command line.
To remove a file domain:
6–12 Managing the Advanced File System with the AdvFS GUI
6.4.1.5 Renaming a File Domain
You can assign a new name to an existing file domain (see Section 2.3.9).
The old name remains in the /etc/fstab file unless you modify the file by
choosing the Modify /etc/fstab option in the dialog box or change it from the
command line. If you do not update the /etc/fstab file, the filesets in this
domain will not mount when you reboot the system or when you enter the
mount -a command from the command line. If you must update the
/etc/fstab file at a later time, do so from the command line.
Unmount all filesets before renaming the file domain. An error will occur if
you try to rename a file domain with mounted filesets. You cannot rename
a file domain with the name of an existing file domain.
You cannot create a fileset until you have a file domain with which to
associate it (see Section 6.4.1.1).
To create a fileset:
1. In the object tree, highlight the file domain for which the fileset will be
created.
2. Choose Fileset from the Configuration menu.
Managing the Advanced File System with the AdvFS GUI 6–13
3. Choose New from the Fileset menu.
4. In the New Fileset dialog box, create the fileset, mount the fileset, back
up and modify the /etc/fstab file, set a free space alert, and set
fileset quotas (as desired).
Note that when you create a fileset, you can set the free space alert only as
a percentage of the available space.
When you mount a fileset, you make its files available. The display in the
Main window indicates which filesets are mounted. A file domain is active
when at least one fileset is mounted.
To mount a fileset:
When you unmount a fileset, its files are no longer available. You must
unmount the fileset before you can remove it or remove the file domain to
which it belongs. The display in the Main window indicates which filesets
are not mounted.
To unmount a fileset:
Set a free space alert to warn when the free space threshold in the fileset is
reached or passed. You must mount the fileset before you can set the alert.
After you set the alert, you can choose to automatically run a script when
the alert threshold is crossed.
6–14 Managing the Advanced File System with the AdvFS GUI
To set the free space alert:
You must reset the free space alert when the size of a fileset has changed.
Free space alert values are evaluated using actual size (for example,
kilobytes), not percentage of space.
Set fileset quotas to limit the amount of space the fileset can consume. If
you do not set quotas, any fileset can use all the available space in the file
domain. You can only set quotas on mounted filesets.
You can view fileset quota information from the Main window by choosing
Fileset Quotas from the View menu. To return to viewing disk usage,
choose the items you wish to view from the View menu.
You must unmount a fileset before you can delete it. You can do this as part
of the removal process. You cannot remove a fileset that has a clone. You
must remove the clone first. Removing a fileset removes all files in that
fileset.
To remove a fileset:
Managing the Advanced File System with the AdvFS GUI 6–15
If all the filesets are unmounted, the fastest way to remove all filesets is to
remove the file domain to which they belong. However, this may present a
security hole because it may be possible to access the data with the
salvage utility (see Section 7.5.8).
You must unmount a fileset before you can rename it. You can do this as
part of the renaming process. The new fileset name must be unique within
the file domain.
To rename a fileset:
If you rename a fileset that has never been mounted (does not
already have an /etc/fstab file entry) and check the modify
/etc/fstab box, you do not get a new entry for the fileset
name. You must manually edit the /etc/fstab file to add the
new entry.
If you rename a fileset, its clone can no longer track it. You must delete the
old clone and create a new one because clones cannot be renamed.
Creating a clone fileset allows you to back up files while the file system is
on line (see Section 4.2). You can create only one clone for a fileset.
6–16 Managing the Advanced File System with the AdvFS GUI
To create a clone:
1. In the object tree, highlight the fileset that you want to clone.
2. Choose Clone from the Configuration menu.
3. Choose New from the Clone menu.
4. In the New Clone dialog box, enter a clone name, create a mount point,
and back up and modify the /etc/fstab file.
You must mount a clone in order to access it. An unmounted clone tracks
changes to a fileset but cannot be read. Clones are mounted as read-only.
To mount a clone:
You cannot access an unmounted clone, but it still tracks fileset changes.
To unmount a clone:
You must unmount a clone before you can remove it. You can do this as
part of the removal process.
To remove a clone:
Managing the Advanced File System with the AdvFS GUI 6–17
3. Choose Delete from the Clone menu.
4. In the Delete Clone dialog box, unmount the clone, delete it, and back
up and modify the /etc/fstab file.
Set a free space alert to inform you when the free space threshold in the
volume is reached or passed.
When you set the alert, you can choose to automatically run a script when
the threshold is crossed.
You can remove a volume from a file domain at any time without
interrupting the logical structure of the filesets in the file domain (see
Section 2.3.7). The data that was stored on that volume will be moved to
other volumes in the domain. In order to complete successfully, there must
be room for all domain data on the remaining volumes.
Before you can remove a volume from a file domain, all filesets in that file
domain must be mounted. You cannot remove a volume while you are
balancing or defragmenting a file domain associated with that volume.
6–18 Managing the Advanced File System with the AdvFS GUI
To remove a volume:
You can use the GUI to initiate the balance process to evenly distribute
files among volumes (see Section 5.2.3). You cannot balance a file domain
while you are defragmenting, adding or removing volumes, or removing
filesets on the same file domain. You can choose to abort the operation at
any time. The file domain you want to balance must have all filesets
mounted. If you try to balance a file domain that includes unmounted
filesets, you will get an error message.
You can make files in a file domain more contiguous by defragmenting the
file domain. Defragmenting also consolidates free space so files created
later are also less fragmented (see Section 5.2.2). You cannot defragment a
file domain while you are balancing, adding or removing volumes, or
removing filesets on the same file domain. You can choose to abort the
defragment operation at any time. The file domain you want to defragment
must have all filesets mounted. If you try to defragment a file domain that
includes unmounted filesets, you will get an error message.
Managing the Advanced File System with the AdvFS GUI 6–19
To defragment a file domain:
# /sbin/init.d/advfsd stop
Then restart the agent and the GUI:
# /sbin/init.d/advfsd start
# /usr/bin/X11/dtadvfs
6–20 Managing the Advanced File System with the AdvFS GUI
Table 6–3: GUI Troubleshooting (cont.)
Incorrect error message Configuration tasks are running simultaneously and
more than one task failed.
Free space alert value Reset. Alert values are evaluated using actual size
incorrect (for example, in kilobytes), not percentage of space.
File domain deleted but Manually change the disk label on the device; use
associated volumes shown as the command line disklabel command or the CDE
in use Disk Configuration utility.
Volume removed but shown Manually change the disklabel on the device; use
the command line disklabel command or the CDE
Disk Configuration utility.
advfsd consuming high Change the agent state monitor interval to reduce
CPU and I/O resources the polling frequency (see Section 6.2.1).
Decrease the number of LSM disk groups and
volumes.
Decrease the number of unmounted filesets. Inactive
domains are particularly slow. Use the
disks.ignore file (see Section 6.2.2.2 ).
If Performance Manager (PM) is not running, exit
the GUI and stop the agent:
# /sbin/init.d/advfsd stop
Then restart the agent and the GUI:
# /sbin/init.d/advfsd start
# /usr/bin/X11/dtadvfs
System panics at boot time Check for a bad file domain. Panic will occur even if
the domain has been removed from the /etc/fstab
file. Do one of the following in single-user mode,
then reboot to multiuser mode:
- Repair the file domain.
- Move the bad file domain from the /etc/fdmns
directory to another directory. (This will make
repair difficult.)
Sort gives incorrect results Check that no data fields to be sorted are marked
unavailable. Mount filesets if needed.
Volume in use message, Check that this is not an unrecognized LSM volume
when adding a volume (see Section 6.2.2.6).
Managing the Advanced File System with the AdvFS GUI 6–21
Table 6–3: GUI Troubleshooting (cont.)
PM metrics incorrect To use PM 5.0 to monitor Version 4.0x operating
systems, the Version 4.0x systems must have the
appropriate PM 4.0x kit with the cluster subset
installed.
X or Motif® problems Failures related to these can be ignored. Full
keyboard support as defined in the Motif style guide
is not implemented.
6–22 Managing the Advanced File System with the AdvFS GUI
7
Troubleshooting
This chapter examines problems that, while universal for file systems, may
have unique solutions for AdvFS. See System Configuration and Tuning for
related information about diagnosing performance problems.
Troubleshooting 7–1
Table 7–1: Disk Space Usage Information Commands
Command Description
du Displays information about block allocation for files; use
the -a option to display information for individual files.
df Displays disk space usage by fileset; available space for a
fileset is limited by the fileset quota if it is set
showfdmn Displays the attributes and block usage for each volume
in an active file domain; for multivolume file domains,
additional volume information is displayed.
showfile Displays block usage and volume information for a file or
for the contents of a directory.
showfsets Displays information about the filesets in a file domain;
use to display fileset quota limits.
vdf Displays disk space used and available disk space for a
fileset or a file domain.
See the reference pages for the commands for more complete information.
Under certain conditions, the disk usage information for AdvFS may
become corrupt. To correct this, change the entry in the /etc/fstab file to
enable the quotacheck command to run. The quotacheck command only
checks filesets that have the userquota and groupquota options
specified. For example, for the fileset usr_domain#usr:
usr_domain#usr /usr advfs rw,userquota,groupquota 0 2
Then run the quotacheck command for the fileset:
# quotacheck usr_domain#usr
This should correct the disk usage information.
7–2 Troubleshooting
7.1.2.1 Setting User and Group Quotas
User and group quotas limit the amount of space a user or group can
allocate for a fileset (see Section 3.2). Table 7–2 shows the command-line
commands that operate on user and group quotas.
Troubleshooting 7–3
Table 7–3: Fileset Quota Commands
Command Description
chfsets Sets limits (quotas) for block usage and number of files
in a fileset.
df Displays the limits and actual number of blocks used in
a fileset.
showfdmn Displays disk space usage for a file domain.
showfile Displays block usage and volume location of a file.
showfsets Displays files and block usage for a fileset.
vdf Displays disk space used and available disk space for a
fileset or a file domain.
If you are working in an editor and realize that the information you need to
save will put you over your quota limit, do not abort the editor or write the
file because data may be lost. Instead, remove files to make room for the
edited file prior to writing it. You can also write the file to another fileset,
such as tmp, remove files from the fileset whose quota you exceeded, and
then move the file back to that fileset.
AdvFS will impose quota limits in the rare case that you are 8 kilobytes
below the user, group, or fileset quota and are attempting to use some or all
of the space you have left. This is because AdvFS allocates storage in units
of 8 kilobytes. If adding 8 kilobytes to a file would exceed the quota limit,
then that file cannot be extended.
7–4 Troubleshooting
If you try to mount a fileset belonging to a file domain with a DVN of 4
when you are running a version of the operating system earlier than
Version 5.0, you will get an error message.
There is no tool that upgrades all file domains with a DVN of 3 to domains
with DVN of 4. You must upgrade each file domain (see Section 2.3.3.2).
chfile file_name
If the I/O mode indicates atomic write data logging and you want to turn it
off to allow memory mapping to occur, use the following command format:
Troubleshooting 7–5
To discover the causes of poor performance:
• Check disk activity
There are a number of ways to gather this information:
– The iostat utility reports I/O statistics for terminals, disks, and
the CPU. It displays the number of transfers per second (tps) and
bytes per second in kilobytes (bps). From this you can determine
where I/O bottlenecks are occurring. That is, if one device shows
sustained high throughput, this device is being utilized more than
others. Then you can decide what action might increase throughput:
moving files, obtaining faster volumes, striping files, etc. See
iostat(1) for more information.
– The advfsstat utility displays detailed information about the
activity of filesets and file domains over time. You can examine, for
example, the activity of the buffer cache, volume reads/writes, and
the BMT record. See advfsstat(8) for more information.
– Performance Manager has three performance analysis scripts
related to AdvFS. AdvFS domain examines disk space used on each
volume to identify uneven usage that can be corrected with the
balance command. AdvFSIO determines whether there are
excessive I/O problems that can be alleviated by changing
system-tunable parameters. AdvFSTuner looks at the percentage of
volumes used and the buffer cache hit ratio. It checks whether the
log needs to be moved to a less-used volume and whether the cache
needs tuning.
PM documentation is available online at
http://www.unix.digital.com/unix/sysman/perf_mgr and
in the distribution kit on the CD-ROM labeled Version 5.0 Associated
Products Volume 2 in the /Performance_Manager/doc/ directory.
• Upgrade file domains
Files belonging to file domains created under Version 5.0 and later are
accessed through an improved directory structure that is faster than
earlier versions. However, the increased speed of operation will only be
seen in cases where there are thousands of files in the same directory
(see Section 2.4.5).
• Eliminate disk access incompatibility
If you have initiated direct I/O (which turns off caching) to read and
write data to a file, any application that accesses the same file will also
have direct I/O. This may prove inefficient (see Section 5.1.4).
7–6 Troubleshooting
• Defragment file domains
As files grow, contiguous space on disk often is not available to
accommodate new data, so files become fragmented. File fragmentation
can reduce system performance because more I/O is required to read or
write a file. Use the AdvFS GUI (see Chapter 6) or run the
defragment utility from the command line (see Section 5.2.2).
If you have AdvFS Utilities, you can also:
• Balance a multivolume file domain
System performance improves if you distribute files evenly over all your
volumes. Files that are distributed unevenly can degrade system
performance. Use the balance command to redistribute the files (see
Section 5.2.3).
When a volume is added to a domain with the addvol command, all
the files of the file domain remain on the previously existing volume(s)
and the new one is empty. To even the file distribution, use the AdvFS
GUI (see Chapter 6) or run the balance utility from the command line.
• Stripe individual files
AdvFS allows you to stripe individual files across multiple volumes (see
Section 5.2.5). If your system has very large files with heavy I/O
requirements, consider striping these files across volumes so that I/O
will be directed to more than one disk. It is not advisable to do both
LSM and AdvFS striping because this may degrade system performance
(see Section 2.8.3),2
• Migrate individual files
You can use the migrate utility to move a heavily accessed file or
selected pages of a file to another volume in the file domain. You can
move the file to a specific volume or you can let the system choose (see
Section 5.2.4).
• Change AdvFS resources
You can change your file system size in the following ways:
– Increase the size of a file domain by adding a volume with the
addvol command (see Section 2.3.6). For optimum performance,
each volume you add should consist of the entire disk (typically,
partition c). Do not add a volume containing any data you want to
keep. When you run the addvol command, data on the added disk
is destroyed.
– Shrink a file domain by removing a volume with the rmvol
command (see Section 2.3.7). You can interrupt the rmvol process
Troubleshooting 7–7
without damaging your file domain. Files already removed from the
volume will remain in their new location. Striped file segments will
be moved to a volume that does not contain a stripe. If this is not
possible, the system requests confirmation before doubling up on
stripes (see Section 5.2.5).
If the volume that has had the files removed does not allow new file
allocations after an aborted rmvol operation, use the chvol
command with the -A option to reactivate the volume.
– Change the size of a file domain by changing volumes. Add a new
one, move your files to it, then remove the old (see Section 5.2.4).
1. If you can read data from your disk, you can remove the volume with
the rmvol utility (see Section 2.3.7).
2. If you cannot remove the volume, try to back it up.
a. If you are successful, remove the file domain containing the bad
disk, recreate the file domain and filesets on another volume, and
restore the data from the backup.
Remember that if you are recreating your file domain under
Version 5.0, your file domains will have a DVN of 4 by default (see
Section 2.3.3).
b. If a disk error prevents you from performing the backup, use the
salvage command to extract information from the file domain and
send the retrieved files to a new file domain (see Section 7.5.8).
7–8 Troubleshooting
7.5.2 Errors Restoring from Disk
If you have used the dump or rvdump command to write to a disk partition
that contains a valid disk label, the device driver has not written over the
label. The restore or vrestore command will interpret the disk label as
part of the saveset, returning an error message (see Section 4.1.4).
When a domain panic occurs, an EVM event is logged (see EVM(5)) and the
following message is printed to the system log and the console:
To recover from a domain panic, perform the following steps. If you cannot
successfully complete steps 1 through 8, go to step 10.
1. Run the mount command with the -t option and look for all mounted
filesets in the file domain. For example:
# mount -t advfs
staffb_dmn#staff3_fs on /usr/staff3 type advfs (rw)
staffb_dmn#staff4_fs on /usr/staff4 type advfs (rw)
2. Use the umount command to unmount all filesets in the file domain
affected by the domain panic. For example:
# umount /usr/staff3
# umount /usr/staff4
Troubleshooting 7–9
3. Use the ls command with the -l option to examine the /etc/fdmns
directory to obtain a list of the AdvFS volumes in the domain that
panicked. For example:
# ls -l /etc/fdmns/staffb_dmn
!
lrwxr-xr-x 1 root system 10 Aug 25 16:46
dsk35c /dev/disk/dsk3c
!
lrwxr-xr-x 1 root system 10 Aug 25 16:50
dsk36c /dev/disk/dsk6c
!
lrwxr-xr-x 1 root system 10 Aug 25 17:00
dsk37c /dev/disk/dsk1c
4. Use the savemeta command (see savemeta(8)) to collect information
about the metadata files for each volume in the domain. The savemeta
command will save information about the BMT and the storage bitmap
for each volume in the domain. It will save the transaction log and the
root tag file for the domain. These saved files will be written in the
dirctory specified. For example, to save the metadata for the domain
staffb_dmn in the directory, /tmp/saved_dmn:
# /sbin/advfs/savemeta staffb_dmn /tmp/saved_dmn
7–10 Troubleshooting
If you have recurring domain panics, it may be helpful to adjust the
AdvfsDomainPanicLevel attribute (see Section 5.2.7) in order to facilitate
debugging.
1. Remove the volume from the domain using the rmvol command. (This
will automatically migrate the data to the remaining volumes.)
2. Correct the disk label of the volume with the disklabel command.
3. Add the corrected volume back to the domain with the addvol
command.
4. Run the balance command to distribute the data across the new
volumes.
For example, if /dev/disk/dsk2c (an rz29 disk) within the data5 file
domain is mislabeled, you can migrate your files on that volume (automatic
with the rmvol command), then move them back when you have restored
the volume:
Troubleshooting 7–11
# rmvol /dev/disk/dsk2c data5
# disklabel -z dsk2
# disklabel -rw dsk2 rz29
# addvol /dev/disk/dsk2c data5
# balance data5
If you do not have AdvFS Utilities or if there is not enough free space in
the domain to transfer the data from the offending volume:
This defect is now fixed, but file domains created using older versions may
still contain corrupted files. It is a good idea to locate and correct these
7–12 Troubleshooting
files. You do not need to recreate the file domain. To locate and fix files, do
the following:
The following example detects the corrupted file 526.file.4 in the fileset
test_fileset in the file domain test_domain and fixes it:
Troubleshooting 7–13
# verify -f test_domain
+++ Domain verification
+++ Domain Id 32d3e638.000a46a0
Checking disks ...
Checking storage allocated on disk /dev/disk/dsk1a
Checking mcell list ...
Checking that all in-use mcells are
attached to a file’s mcell chain...
Checking tag directories ...
+++ Fileset verification +++
+++ Fileset test_fileset +++
Checking frag file headers ...
Checking frag file type lists ...
Scanning directories and files ...
Overlapping frag data corruption detected in:
File: <mount point>/526.file.4
Page: 1
Temporary files created representing the two versions of
page 1 of file <mount point>/526.file.4
The temporary file with the .frag extension contains the
hidden page. Refer to the AdvFS documentation for a
description of how to use these temporary files to recover
from this overlapping frag corruption problem.
Scanning tags ...
Searching for lost files ...
3. Mount the fileset containing the corrupted file. The .ext and .frag
files contain information from the corrupted pages.
# mount test_domain#test_fileset /test
#ls -l /test
total 169
drwx------ 2 root system 8192 Jan3 13:23 .tags
-rw-r--r-- 1 root system 24576 Jan4 12:27 526.file.1
-rw-r--r-- 1 root system 40960 Jan4 12:27 526.file.2
-rw-r--r-- 1 root system 32768 Jan4 12:27 526.file.3
-rw-r--r-- 1 root system 24576 Jan9 12:27 526.file.4
-rw------- 1 root system 8192 Jan9 14:32
526.file.4.page_1.ext
-rw------- 1 root system 8192 Jan3 14:32
526.file.4.page_1.frag
-rw-r----- 1 root operator 8192 Jan8 13:23 quota.group
-rw-r----- 1 root operator 8192 Jan8 13:23 quota.user
In the example above 526.file.4 is the original corrupted file. The
file containing the hidden page 1 is 526.file.4.page_1.ext. The
file containing the page of the same data as the original file is
526.file.4.page_1.frag.
7–14 Troubleshooting
To fix the corrupted file, view the .ext and .frag files to decide what
to do:
• If the file 526.file.4.page_1.ext contains the desired data,
enter:
# ln -s 526.file.4.page_1.ext the_page_1
• If the file 526.file.4.page_1.frag contains the desired data,
enter:
# ln -s 526.file.4.page_1.frag the_page_1
• If data from the two pages is needed, edit the files, and save the
result in a new file called the_page_1.
4. Create a new fixed version of the corrupted file using the corrupted file
and new file (the_page_1 in this example).
c. Append the remainder of the original file to the end of the new file:
# dd if=526.file.4 of=newfile bs=8192 seek=2 skip=2 > = /dev/null 2>&1
d. Run the diff command on the new and the original file to
confirm that only page 1 has changed and to confirm that the
difference is what is desired:
# diff 526.file.4 newfile
Troubleshooting 7–15
For example, if your volume is /dev/disk/dsk5c, your original file
domain is old_domain, and the file domain you want to add the volume to
is new_domain:
# rmvol /dev/disk/dsk5c old_domain
# addvol /dev/disk/dsk5c new_domain
If the volume you want to add is not part of an existing file domain but is
giving you a warning message because it is labeled, reset the disk label. If
you answer yes to the prompt on the addvol or mkfdmn command, the
disk label will be reset. You will lose all information that was on the
volume that you are adding.
1. When problems are evident (corruptions, domain panic, lost data, I/O
errors).
2. Before an update installation.
3. If your files have not been accessed in three to six months or longer
and you plan to run utilities such as balance, defragment, migrate,
quotacheck, repquota, rmfset, rmvol, or vdump that access every
file in a domain.
1. Run the verify utility to try to repair the domain (see Section 7.7.1
and verify(8)). The verify utility can only fix a limited set of
problems.
2. Recreate the domain from your most recent backup.
3. If your backup is not recent enough, use your most recent backup with
the salvage utility to obtain more current copies of files.
The amount of data you are able to recover will depend upon the
damage to your domain. You must be root user to run the salvage
utility. See salvage(8) for more information.
Running the salvage utility does not guarantee that you will recover all of
your domain. You may be missing files, directories, file names, or parts of
7–16 Troubleshooting
files. The utility generates a log file that contains the status of files that
were recovered. Use the -l option to list in the log file the status of all files
that are encountered.
The salvage utility places recovered files in directories named after the
filesets. There is a lost+found directory for each fileset that contains files
for which no parent directory can be found. You can specify the path name
of the directory that is to contain the fileset directories. If you do not
specify a directory, the utility writes recovered filesets under the current
working directory. You cannot mount the directories in which the files are
recovered. You must move the recovered files to new filesets.
The best way to recover your domain is to use your daily backup tapes. If
files have changed since the last backup, you can use the tapes along with
the salvage utility as follows:
If not enough room is available on disk for the recovered information, you
can recover data to tape and then write it back on to your original disk
location. However, since this process destroys the original damaged data on
disk, once you have created a new file domain, there is no way to rerun the
salvage command if problems arise.
1. Run the salvage command with the -d option set and use the -F and
-f options to specify tar format and tape drive. If you have no
Troubleshooting 7–17
backups, you can run the salvage utility without the -d option to
recover all the files in the domain.
2. Remove the corrupt domain.
3. Create a new file domain and filesets to hold the recovered
information. Mount the filesets.
4. Restore from your backup tape(s) to the new domain.
5. Extract the tar archive from the tape that the salvage utility created
(see tar(1)) to the new filesets.
The following example recovers data to tape and restores the data to a
newly created domain:
# /sbin/advfs/salvage -F tar -d 9810280930 corrupt_domain
salvage: Domain to be recovered ’corrupt_domain’
salvage: Volume(s) to be used ’/dev/disk/dsk8c’’/dev/disk/dsk5c’
salvage: Files will archived to ’/dev/tape/tape0_d1’
in TAR format
salvage: Logfile will be placed in ’./salvage.log’
salvage: Starting search of all filesets: 08-Dec-1998 10:28:13
salvage: Starting search of all volumes: 08-Dec-1998 10:31:41
# rmfdmn corrupt_domain
# mkfdmn /dev/disk/dsk5c good_domain
# addvol /dev/disk/dsk8c good_domain
# mkfset good_domain fset1
# mkfset good_domain fset2
# mount good_domain#fset1 /fset1
# mount good_domain#fset2 /fset2
7–18 Troubleshooting
If you have run the salvage utility and have been unable to recover a
large number of files, run salvage with the -S option set. This process is
very slow because the utility reads every disk block at least once.
Note that if you have chosen recovery to tape and have already created a
new file domain on the disks containing the corrupted domain, you cannot
use the -S option because your original information has been lost.
For example:
# salvage -S corrupt3_domain
salvage: Domain to be recovered ’corrupt3_domain’
salvage: Volume(s) to be used ’/dev/disk/dsk2a’’/dev/disk/dsk2g’
’/dev/disk/dsk2h’
salvage: Files will be restored to ’.’
salvage: Logfile will be placed in ’./salvage.log’
salvage: Starting sequential search of all volumes:
08-Sep-1998 14:45:39
salvage: Loading file names for all filesets:
08-Sep-1998 15:00:38
salvage: Starting recovery of all filesets: 08-Sep-1998 15:00:40
Troubleshooting 7–19
prevents access to a file domain, but the data within the file domain
remains intact. You can restore the /etc/fdmns directory from backup or
you can recreate it.
If you have a current backup copy of the directory, it is preferable to restore
the /etc/fdmns directory from backup. Any standard backup facility
(vdump, tar, or cpio) can back up the /etc/fdmns directory. To restore
the directory, use the recovery procedure that is compatible with your
backup process.
If you choose to reconstruct the directory manually, you must know the
name of each file domain on your system and its associated volumes.
If you accidentally lose all or part of your /etc/fdmns directory, and you
know which file domains and links are missing, you can reconstruct it
manually.
The following example reconstructs the /etc/fdmns directory and two file
domains where the file domains exist and their names are known. Each
contains a single volume (or special device). Note that the order of creating
the links in these examples does not matter. The file domains are:
domain1 on /dev/disk/dsk1c
domain2 on /dev/disk/dsk2c
7–20 Troubleshooting
/dev/disk/dsk1c
/dev/disk/dsk2c
/dev/disk/dsk3c
You can use the advscan command to determine which partitions on a disk
or Logical Storage Manager (LSM) disk group are part of an AdvFS file
domain. Then you can use the command to rebuild all or part of your
/etc/fdmns directory. This command is useful:
• When disks have moved to a new system, device numbers have
changed, or you have lost track of a file domain location.
• For repair, if you delete the /etc/fdmns directory, delete a file domain
from the /etc/fdmns directory, or delete links from a file domain’s
subdirectory in the /etc/fdmns directory.
For each domain there are three numbers that must match for the AdvFS
file system to operate properly:
• The number of physical partitions found by the advscan command that
have the same domain ID
• The domain volume count (the number stored in the AdvFS metadata
that specifies how many partitions the domain has)
Troubleshooting 7–21
• The number of /etc/fdmns links to the partitions, because each
partition must be represented by a link
See advscan(8) for more information.
Inconsistencies can occur in these numbers in a number of ways and for a
number of reasons. In general, the advscan command treats the domain
volume count as more reliable than the number of partitions or
/etc/fdmns links. The following tables list anomalies, possible causes, and
corrective actions that advscan can take. In the table, the letter N
represents the value that is expected to be consistent for the number of
partitions, domain volume count, and number of links.
Table 7–4 shows possible cause and corrective action if the expected value,
N, for the number of partitions and for the domain value count do not
equal the number of links in /etc/fdmns/<dmn>.
7–22 Troubleshooting
Table 7–5 shows possible cause and corrective action if the expected value,
N, for the number of partitions and for the number of links in
/etc/fdmns/<dmn> do not equal the domain volume count:
Table 7–6 shows possible cause and corrective action if the expected value,
N, for the domain volume count and for the number of links in
/etc/fdmns/<dmn> do not equal the number of partitions:
In the following example there are no missing file domains. The advscan
command scans devices dsk0 and dsk5 for AdvFS partitions and finds
nothing amiss. There are two partitions found (dsk0c and dsk5c), the
domain volume count reports two, and there are two links entered in the
/etc/fdmns directory.
Troubleshooting 7–23
# advscan dsk0 dsk5
Scanning disks dsk0 dsk5
Found domains:
usr_domain
Domain Id 2e09be37.0002eb40
Created Thu Jun 24 09:54:15 1999
Domain volumes 2
/etc/fdmns links 2
Actual partitions found:
dsk0c
dsk5c
In the following example, directories that define the file domains that
include dsk6 were removed from the /etc/fdmns directory. This means
that the number of /etc/fdmns links, the number of partitions, and the
domain volume counts are no longer equal.
The advscan command scans device dsk6 and recreates the missing file
domains as follows:
7–24 Troubleshooting
The command and output are as follows:
# advscan -r dsk6
Scanning disks dsk6
Found domains:
*unknown*
Domain Id 2f2421ba.0008c1c0
Created Wed Jan 20 13:38:02 1999
Domain volumes 1
/etc/fdmns links 0
Domain volumes 1
/etc/fdmns links 0
Creating /etc/fdmns/domain_dsk6b/
linking dsk6b
The following example assumes that you are booting from the CD-ROM
device DKA500, which is the installation Stand Alone System (SAS). The
tape drive is /dev/tape/tape0. The root is being restored to device
/dev/disk/dsk1, which is an rz28 disk.
Troubleshooting 7–25
3. Examine the devices available:
# ls /dev/disk
# ls /dev/tape/tape0
4. Make the disk label:
# disklabel -rw -t advfs /dev/rdisk/dsk1 rz28
5. Create the root file domain and fileset. Note that if you have changed
the root file domain name or fileset name, use the new name:
# mkfdmn -r /dev/disk/dsk1a root_domain
# mkfset root_domain root
6. Mount the newly created root domain and restore from tape using a
restore utility compatible with your dump utility:
# mount root_domain#root /mnt
# cd /mnt
# vrestore -x -D .
On some systems the /var directory, where the LMF database resides, and
the /usr directory are both located in the usr fileset. So the directory
containing the license database must be recovered from the usr fileset
before the addvol command can be accessed. On some systems the /var
directory is in a separate fileset. If this is the case, the addvol command
can be recovered first and then can be used to add the volumes.
The following example restores a multivolume file domain where the /var
directory and the /usr directory are both in the usr fileset in the
usr_domain file domain consisting of the dsk1g, dsk2c, and dsk3c
volumes. The procedure assumes that the root file system has already been
restored.
7–26 Troubleshooting
# rm -rf /etc/fdmns/usr_domain
# mkfdmn /dev/disk/dsk1g usr_domain
3. Create and mount the /usr and /var filesets:
# mkfset usr_domain usr# mount -t advfs usr_domain#usr /usr
4. Create a soft link in /usr because that is where the lmf command
looks for its database:
# ln -s /var /usr/var
5. Insert the /usr backup tape:
# cd /usr
# vrestore -vi
(/) add sbin/addvol
(/) add sbin/lmf
(/) add var/adm/lmf
(/) extract
(/) quit
6. Reset the license database:
# /usr/sbin/lmf reset
7. Add the extra volumes to usr_domain:
# /usr/sbin/addvol /dev/disk/dsk2c usr_domain
# /usr/sbin/addvol /dev/disk/dsk3c usr_domain
8. Do a full restore of the /usr backup:
# cd /usr
# vrestore -xv
The following example restores a multivolume file domain where the /usr
and /var directories are in separate filesets in the same multivolume
domain, usr_domain, consisting of dsk1g, dsk2c, and dsk3c. This means
that you must mount both the /var and the /usr backup tapes. The
procedure assumes that the root file system has already been restored.
Troubleshooting 7–27
4. Insert the /var backup tape and restore from it:
# cd /var
# vrestore -vi
(/) add adm/lmf
(/) extract
(/) quit
5. Insert the /usr backup tape:
# cd /usr
# vrestore -vi
(/) add sbin/addvol
(/) add sbin/lmf
(/) extract
(/) quit
6. Reset the license database:
# /usr/sbin/lmf reset
7. Add the extra volumes to usr_domain:
# /usr/sbin/addvol /dev/disk/dsk2c usr_domain
# /usr/sbin/addvol /dev/disk/dsk3c usr_domain
8. Do a full restore of /usr backup:
# cd /usr
# vrestore -xv
9. Insert the /var backup tape and do a full restore of /var backup:
# cd /var
# vrestore -xv
7–28 Troubleshooting
description of command capabilities and Section 7.5.7 for suggestions on
when to run the command.
The verify command mounts filesets in special directories as it proceeds.
If the command is unable to mount a fileset due to the failure of a file
domain, as a last resort run the command with the -F option. This will
cause the fileset to be mounted using the -d option of the mount command,
which mounts the fileset without running recovery on the file domain. This
will cause your file domain to be inconsistent because the disk structure
will not have been checked and made consistent. Under some
circumstances the verify command may fail to unmount the filesets. If
this occurs, you must unmount the affected filesets manually.
The following example verifies the domainx file domain, which contains the
filesets setx and sety:
# verify domainx
+++Domain verification+++
Domain Id 2f03b70a.000f1db0
Checking disks ...
Checking storage allocated on disk /dev/disk/dsk10g
Checking storage allocated on disk /dev/disk/dsk10a
Checking mcell list ...
Checking mcell position field ...
Checking tag directories ...
In this example, the verify command finds no problems with the file
domain. For an example of output where the verify command has
detected a corrupted file, see Section 7.5.5.
Troubleshooting 7–29
7.7.2 Displaying Disk Structures
Table 7–7 lists the disk structure dumping utilities that enable you to
examine a file domain with suspected metadata corruption. The commands
display raw data from the disk in a number of formats.
7–30 Troubleshooting
_____________________ Caution _____________________
Do not use either the addvol command or the mkfdmn command
to add the volumes to the new machine. Doing so will delete all
data on the disk you are moving. See Section 7.5.8 if you have
already done so.
If you do not know what partitions your domains were on, you can add the
disks on the new machine and run the advscan command, which may be
able to recreate this information. You can also look at the disk label on the
disk to see which partitions in the past have been made into AdvFS
partitions. This will not tell you which partitions belong to which file
domains.
For example, if the motherboard of your machine fails, you need to move
the disks to another system. You may need to reassign the disk SCSI IDs to
avoid conflicts. (See your disk manufacturer instructions for more
information.) For this example, assume the IDs are assigned to disks 6 and
8. Assume also that the system has a file domain, testing_domain, on
two disks, dsk3 and dsk4. This domain contains two filesets:
sample1_fset and sample2_fset. These filesets are mounted on
/data/sample1 and /data/sample2.
Assume you know that the file domain that you are moving had partitions
dsk3c, dsk4a, dsk4b, and dsk4g. The moving process would take the
following steps:
1. Shut down the working machine to which you are moving the disks.
2. Connect the disks from the bad machine to the good one.
3. Reboot. You do not need to reboot to SAS; multiuser mode works
because you can complete the following steps while the system is
running.
4. Figure out the device nodes created for the new disks:
# /sbin/hwmgr -show scsi -full
The output is a detailed list of information about all the disks on your
machine. The DEVICE FILE column shows the name that the system
uses to refer to each disk. Determine the listing for the disk you just
added, for example, disk6. Use this name to set up symbolic links in
step 5 below.
5. Modify your /etc/fdmns directory to include the information from the
transferred domains:
Troubleshooting 7–31
# mkdir -p /etc/fdmns/testing_domain
# cd /etc/fdmns/testing_domain
# ln -s /dev/disk/dsk6c dsk6c
# ln -s /dev/disk/dsk8a dsk8a
# ln -s /dev/disk/dsk8b dsk8b
# ln -s /dev/disk/dsk8g dsk8g
# mkdir /data/sample1
# mkdir /data/sample2
6. Edit the /etc/fstab file to add the fileset mount-point information:
testing_domain#sample1_fset /data/sample1 advfs rw 1 0
testing_domain#sample2_fset /data/sample2 advfs rw 1 0
7. Mount the volumes:
# mount /data/sample1
# mount /data/sample2
Note that if you run the mkfdmn command or the addvol command on
partition dsk6c, dsk8a, dsk8b, or dsk8g, or an overlapping partition,
you will destroy the data on the disk. See Section 7.5.8 if you have
accidently done so.
If the system crash has occurred because you have set the
AdvfsDomainPanicLevel attribute (see Section 5.2.6) to promote a
domain panic to a system panic, it is also good idea to run the verify
command on the panicked file domain to insure that it is not damaged. If
your filesets were unmounted at the time of the crash, or if you have
remounted them successfully and have run the verify command (if
needed), you can mount the filesets on a different version of the operating
system, if appropriate.
7–32 Troubleshooting
A
AdvFS Commands
This appendix contains procedures to convert a /usr file system, the root
file system, and a data file system to AdvFS. Also included are instructions
for converting your entire system from AdvFS to UFS.
The methods provided here are guidelines; that is, they are suggestions
that illustrate the process of conversion. Specific file names, tape drives,
and disk partitions depend on your system.
The vdump and vrestore file formats are compatible for Version 4 and
Version 5.0 operating systems. If you upgrade to Version 5.0, recreate the
file domains, and restore the data from backup (see Chapter 4), your AdvFS
filesets and file domains will have the updated structure (see Section 2.3.3).
You can convert the /usr (UFS) file system to an equivalent AdvFS file
system by backing up the existing file system to tape and restoring it to an
AdvFS environment.
Use the following procedure as a guide for converting the file system:
# mt rewind
# cd /usr
# vdump -0 .
3. Edit the /etc/fstab file.
a. Search for the entry that mounts /usr as a UFS file system, such
as:
# shutdown -h now
5. Reboot the system in single-user mode. See System Administration for
instructions on invoking single-user mode.
6. In single-user mode, mount the root file system as rw. Create the
usr_domain file domain, and create the usr fileset. Use the -F option
with the mkfdmn command to force the partition label to change from
UFS to AdvFS and to avoid a warning message.
# mount -u /
# mkfdmn -F /dev/disk/dsk3g usr_domain
# mkfset usr_domain usr
a. Search for the entry that mounts /usr as a UFS file system:
/dev/disk/dsk3g /usr ufs rw 1 2
b. Replace it with one that mounts /usr as an AdvFS file system:
usr_domain#usr /usr advfs rw 1 0
a. Search for the entry that mounts /usr as a UFS file system, such
as:
/dev/disk/dsk3g /usr ufs rw 1 2
b. Replace it with one that mounts /usr as an AdvFS file system:
usr_domain#usr /usr advfs rw 1 0
Because the AdvFS root file domain is limited to one disk, you cannot use
the addvol command to extend the root file domain.
a. Search for the entry that mounted /staff2 as a UFS file system:
/dev/disk/dsk2c /staff2 ufs rw 1 2
b. Replace it with one that mounts /staff2 as an AdvFS file system:
staff_domain#staff2 /staff2 advfs rw 1 0
a. Search for the entry that mounts /staff2 as a UFS file system:
/dev/disk/dsk3g /staff2 ufs rw 1 2
b. Replace it with one that mounts /staff2 as an AdvFS file system:
/staff_domain#staff2 /staff2 advfs rw 1 0
You can convert a data (UFS) file system on one disk to the equivalent data
(AdvFS) file system on a different target disk.
Use the following procedure as a guide for converting the /staff2 file
system:
# mkdir /new_staff2
# mount -t advfs staff_domain#staff2 /new_staff2
a. Search for the entry that mounts /staff2 as a UFS file system,
such as:
/dev/disk/dsk3g /staff2 ufs rw 1 2
b. Replace it with one that mounts /staff2 as an AdvFS file system:
staff_domain#staff2 /staff2 advfs rw 1 0
6. Unmount /new_staff2:
# umount /new_staff2
7. Unmount /staff2:
# umount /staff2
8. Remove the old directory:
# rmdir /staff2
9. Mount the new fileset.
# mount /staff2
1. Log in to the system containing the /staff4 file system and back up
the file system to tape:
# tar c /staff4
2. Log in as root user on the target system.
3. Create the staff_domain file domain and the staff4 fileset:
# mkfdmn /dev/disk/dsk2c staff_domain
# mkfset staff_domain staff4
4. Create a mount-point directory and mount the new fileset on the
directory:
# mkdir /staff4
# mount -t advfs staff_domain#staff4 /staff4
5. Restore the /staff4 file system from the default tape drive,
/dev/tape/tape0:
# mt rewind
# tar x /staff4
6. Edit the /etc/fstab file to add an entry that mounts /staff4 as a
UFS file system:
staff_domain#staff4 /staff4 advfs rw 1 0
The staff_domain file domain now includes the staff4 fileset, which is
ready to use.
If your file domain contains multiple volumes, you must verify that the
disk space allocated to a fileset will not exceed the limit of the UFS file
system disk partition. You may need to create multiple UFS file systems to
hold the filesets in the file domain.
You must be root to use the SysMan Menu. There are two ways to open the
menu:
• From the command line enter:
# /usr/sbin/sysman
• From the Common Desktop Environment (CDE) front panel if your
system is running in a graphics environment with CDE:
This glossary defines some of the terms and acronyms used in the AdvFS
documentation.
advfsd
The agent that issues commands and obtains system information for the
AdvFS GUI.
agent
See advfsd. The agent runs in the traditional style of the UNIX daemon.
agent state monitor interval
The time interval between agent scans of the system disk.
atomic write data logging
Guarantees that all data in a write system call (up to 8192 bytes) is either
written to the disk or none of the data is written to the disk.
balance
To even the distribution of files between volumes of a file domain.
bitfile metadata table (BMT)
See BMT.
block
A 512-byte unit of disk storage. Sixteen blocks comprise a page.
BMT
Bitfile Metadata Table. An array of 8-kilobyte pages, each with a header
and an array of mcells located on each volume. A BMT contains all
metadata for all files that have storage on the volume.
buffer cache
The area of memory that contains the blocks of data waiting to be written
to disk.
checksum
Blocks created during tape backup for error recovery.
Glossary–1
clone fileset
A read-only copy of a fileset that is created to capture fileset data at a
particular time. The contents of the clone fileset can be backed up while the
original fileset remains available to users.
contiguous
Storage that is physically adjacent on a disk volume.
copy-on-write
The process by which original information is saved in a clone fileset when
data in the original file is changed.
defragment
To make files and free space in a file domain more contiguous.
dirty data
Data that has been written by the application, but the file system has
cached it in memory so it has not yet been written to disk.
domain panic
A condition that prevents further access to the file domain when corruption
in the domain is detected. AdvFS allows the filesets in the file domain to be
unmounted after a domain panic.
DVN
Domain Version Number. A number in the disk metadata that specifies file
structure. Version 5.0 and later file domains contain a DVN of 4, while file
domains created under earlier operating systems have a DVN of 3.
dtadvfs
The AdvFS Graphical User Interface (GUI).
/etc/fdmns directory
A directory that defines the file domains by providing a subdirectory for
each file domain created on the system.
/etc/fstab file
A file that identifies filesets that are to be mounted at system reboot.
extent
Contiguous area of disk space allocated to a file. Simple files have one
extent map; striped files have an extent map for every stripe segment.
file domain
A named pool of storage that contains one or more volumes. Each file
domain must have at least one fileset.
Glossary–2
file domain ID
A set of numbers that identify the file domain to the system.
file extent
See extent.
file fragment
Created when a file uses only part of the last page (less than 8 kilobytes) of
file storage allocated or has a total size of less than 8 kilobytes.
fileset
A hierarchy of directory and file names. A fileset represents a mountable
portion of the directory hierarchy of the AdvFS file system.
fileset quota
A quota that limits the amount of disk storage that a fileset can consume
or the number of files a fileset can contain.
frag file
A file that is used to allocate storage for files or file segments that are less
than 8 kilobytes (one page). Using fragments reduces the amount of wasted
disk space.
grace period
The period of time a quota’s soft limit can be exceeded as long as the hard
limit is not exceeded.
GUI
A graphical user interface.
GUI refresh interval
The time interval between updates of the GUI window information.
hard limit
The quota limit for disk block usage or number of files that cannot be
exceeded.
inode
An identifier for a UFS file; similar to an AdvFS file domain tag.
Glossary–3
migrate
To move files from one volume to another within a file domain.
mirror
To maintain identical copies of data on different disks, thus providing high
data availability and improved disk read performance.
NetWorker
NetWorker for Tru64 UNIX provides scheduled, online automated backup.
object
A volume, file domain, fileset, or clone fileset managed by the AdvFS GUI.
object tree
The AdvFS GUI hierarchical display of objects.
page
An allocation of 8 ilobytes of contiguous disk space (16 blocks).
quota file
A file that keeps track of number of files, disk block usage, and grace
period per user ID or per group ID. Fileset quota information is stored
within the fileset.
saveset
A collection of blocks created to save AdvFS backup information.
segment
See stripe segment.
soft limit
The quota value beyond which disk block usage or number of files is
allowed only during the grace period.
Glossary–4
sparse file
A file whose pages do not all have allocated disk space.
storage bitmap
Tracks free and allocated disk space. Each volume in a file domain contains
one.
stripe
To distribute data across multiple disks in a disk array, thus improving I/O
performance by allowing parallel access.
stripe segment
The portion of a striped file that resides on an AdvFS volume. A file striped
across four volumes has four stripe segments. Segments can be migrated
from one volume to another.
transaction log
The log that records changes to metadata before the changes are written to
disk. At regular intervals these changes are written to disk. The log is
circular and is eventually overwritten.
trashcan
The directory that contains the most recently deleted files from an attached
directory. The trashcan directory is set up by each user for user files.
volume
Anything that behaves like a UNIX block device. This can be a disk, disk
partition, or logical volume.
write-ahead logging
The process by which the modifications to the file-structure information are
completely written to a transaction log before the actual changes are
written to disk. This process is used to ensure file system consistency in the
event of a system failure.
Glossary–5
Index
Index–1
iostat, 7–6 file domain, 2–4, 5–1
migrate, 5–12 file system, 2–1
mkfdmn, 2–8 fileset, 2–17
mkfset, 2–19 converting
mount, 2–20 AdvFS fileset to UFS, B–15
mountlist, A–2 AdvFS root to UFS, B–14
ncheck, 3–12, 7–3 to AdvFS
nvbmtpg, 7–30 data, B–8
nvfragpg, 7–30 UFS to AdvFS
nvlogpg, 7–30 root, B–6
nvtagpg, 7–30 /usr, B–1
quot, 3–12, 7–3 copy-on-write, 2–22
quota, 3–12, 7–3 corruption
quotacheck, 3–13, 7–3 due to old utilities, 7–5
quotaoff, 7–3 crash
quotaon, 7–3 recover system, 7–28
renamefset, 2–21 creating
repquota, 3–14, 7–3 clone, 2–25, 6–16
rmfdmn, 2–15 file domain, 2–8, 6–10
rmfset, 2–21, 2–26 fileset, 2–19, 6–13
rmvol, 2–10, 2–13
rvdump, 4–1
rvrestore, 4–1 D
salvage, 7–16 data
savemeta, 7–30 backup, 4–2
shblock, 7–30 converting to AdvFS, B–8
shfragbf, A–3 logging, 2–29, 7–5
showfdmn, 2–7, 7–2, 7–4 problems on pre4.0D systems,
showfile, 5–6, 5–13, 7–4 7–12
showfsets, 2–18, 3–23, 7–4 restoring, 4–7
stripe, 5–14 database
switchlog, 5–2 backup, 4–6
tag2name, A–2 decreasing
umount, 2–20 file domain, 2–10
utilities, A–4 defragment command, 5–4
vdf, 3–22, 7–4 defragmenting, 5–4, 6–19, 7–7
vdump, 4–1 deleting
verify, 7–16, 7–28 clone, 2–26, 6–17
vfile, 7–30 file domain, 2–15, 6–12
vrestore, 4–1 fileset, 2–21, 6–15
vsbmpg, 7–30 fileset quotas, 3–24
compressing user and group quotas, 3–17
filesets, 4–4 volume, 2–10, 2–13, 6–18
configuring Devices and Volumes window, 6–8
AdvFS root, 2–26 df command, 7–2, 7–4
Index–2
direct I/O, 5–3 /etc/fstab, 2–17
directory, root tag, 2–3 changing fileset name, 2–28
disk quotas, 3–4, 3–15
access incompatibility, 7–6 extent, 1–6
bad usage information, 7–2
checking activity, 7–6
checking usage, 3–11 F
damaged, 7–30 file
domain panic, 7–9 allocation, 7–2
failure recovery, 7–8 data problems on pre4.0D
file domains, 7–4 systems, 7–12
limiting usage, 7–2 deleting
moving, 7–30 trashcan, 5–19
partitions, dumping to, 4–3 disks.ignore, 6–4
structure, 7–30 extent, 1–6
usage, 7–1 fragments, 1–7
disk partitions GUI log, 6–4
dumping, 7–9 gui.passwd, 6–4
disk structure hosts.allow, 6–4
examining, 7–30 moving, 5–10
disks.ignore file, 6–4 preallocation, 1–6
domain quotas, 3–3, 3–17
( See file domain ) restoring, 4–8
domain panic, 7–9 sparse, 1–7
domain version number, 2–6 storage allocation, 1–6
dtadvfs command, 6–3 striping, 5–14, 7–7
du command, 7–2 structure, new, 2–6, 7–4
dumping file domain, 2–4
error protection, 4–4 adding volumes, 6–11, 7–7
incremental, 4–5 balancing, 5–8, 6–19, 7–7
remote, 4–5 changing name of root, 2–27
subdirectories, 4–3 configuring, 2–4, 5–1
to disk partitions, 4–3 creating, 2–8, 6–10
to partitions, 7–9 damaged, 7–16
to tape, 4–3 defragmenting, 5–4, 6–19, 7–7
DVN, 2–6 deleting, 2–15, 6–12
description, 1–4
E displaying information, 2–7
enlarging, 2–10, 2–11, 6–11
edquota command, 3–5, 3–9, exchanging volumes, 7–8
3–19, 7–3 migrating, 7–7
enlarging multivolume setup, 2–11
file domain, 2–10, 2–11, 6–11 panic, 7–9
/etc/fdmns directory, 2–5, 2–27
restoring, 7–19
Index–3
recovering, 7–16 creating, 2–19, 6–13
multivolume domain, 7–26 deleting, 2–21, 6–15
root domain, 7–25 description, 1–4
reducing, 2–10 displaying information, 2–18
removing, 2–15, 6–12 mounting, 2–20, 6–14, 7–32
removing volumes, 7–7 quotas , 6–15, 7–3
renaming, 2–15, 6–13 read-only recovery, 7–11
repairing, 7–21 removing, 2–21, 6–15
root, 2–26 renaming, 2–21, 6–16
security, 2–15, 6–12 security, 2–21, 6–15
setting free space alert, 6–11 setting free space alert, 6–14
shrinking, 2–13 space usage, 7–2
single volume set up, 2–8 unmounting, 2–20, 6–14
space usage, 7–2 upgrading, 2–19
striping, 5–14 fragments, 1–7
upgrading, 2–6, 7–6 free space alert, 6–7
Version 5.0, 7–4 file domain, 6–11
Version 5.0 changes, 2–6 fileset, 6–14
version incompatibility , 7–4 volume, 6–18
file quotas
( See quotas )
file system G
AdvFS root, 2–26 grace period, 3–2
configuring, 2–1 setting fileset, 3–19
converting /usr UFS to AdvFS, setting user and group, 3–4
B–1 turning off, 3–17
converting data to AdvFS, B–8 graphical user interface
converting from AdvFS to UFS, ( See GUI )
B–14 group quotas, 3–3
converting root UFS to AdvFS, GUI
B–6 agent, 6–2
design, 1–3 allowed hosts, 6–4
improving performance, 7–5 and LSM volumes, 6–5
monitoring remotely with GUI, clone
6–5 creating, 6–16
recovering, 7–28 deleting, 6–17
tuning, 5–4 mounting, 6–17
verifying, 7–28 removing, 6–17
viewing with GUI, 6–6 unmounting, 6–17
fileset, 2–16 Devices and Volumes window,
changing name of root, 2–28 6–8
clone, 2–22
compressing, 4–4
configuring, 2–17
converting AdvFS to UFS, B–15
Index–4
file domain installing AdvFS GUI, 6–1
adding volumes, 6–11 iostat command, 7–6
balancing, 6–19
creating, 6–10
defragmenting, 6–19 L
deleting, 6–12 limits
enlarging, 6–11 quota, 3–2
free space alert, 6–11 log, transaction, 1–5, 2–3, 5–2,
removing, 6–12 7–5, 7–32
renaming, 6–13 Logical Storage Manager
fileset ( See LSM )
creating, 6–13 LSM
deleting, 6–15 and AdvFS, 2–30
free space alert, 6–14 mirror, 2–33
mounting, 6–14 striping, 2–33
removing, 6–15 and GUI, 6–5
renaming, 6–16
setting quotas, 6–15
unmounting, 6–14 M
ignoring disks, 6–4
memory mapping, 7–5
installing, 6–1
metadata, 2–3
log files, 6–4
metadata, displaying, 7–30
Main window, 6–7
migrate command, 5–12
monitoring remote file systems,
migrating, 5–12, 7–7
6–5
mirror, 2–33
password file, 6–4
miscellaneous metadata bitfile, 2–3
security, 6–3
mkfdmn command, 2–8
software subsets, 6–1
file recovery, 7–17
troubleshooting, 6–20
mkfset command, 2–19
volume
mount command, 2–20
adding, 6–18
mounting
removing, 6–18
clone, 2–25, 6–17
setting free space alert, 6–18
fileset, 2–20, 6–14
GUI refresh interval, 6–3
mountlist command, A–2
gui.passwd file, 6–4
moving
disk, 7–30
H
hosts.allow file, 6–4 N
naming conventions, 1–5
I ncheck command, 3–12, 7–3
NetWorker, 4–9
install nvbmtpg command, 7–30
Version 5 upgrade, 2–6, 7–4 nvfragpg command, 7–30
Index–5
nvlogpg command, 7–30 enabling user and group
nvtagpg command, 7–30 at startup, 3–15
manually, 3–16
/etc/fstab, 3–4, 3–15
P file, 3–3, 3–17
panic fileset, 3–17, 6–7, 6–15, 7–3
domain, 7–9 grace period, 3–2
partition hard limits, 3–2
finding AdvFS, 7–21 relocating files, 3–4
overlapping removing fileset, 3–24
mounted, 2–12 removing user and group, 3–17
unmounted, 2–13 restoring, 4–8
reusing, 7–15 running into limits, 7–4
performance setting fileset, 3–17, 6–15
improving, 7–5 setting for multiple filesets, 3–20
Performance Manager, 7–6 setting for multiple users and
groups, 3–9
setting user and group, 3–4
Q soft limits, 3–2
starting fileset, 3–24
quot command, 3–12, 7–3
starting user and group
quota command, 3–12, 7–3
at startup, 3–15
quotacheck command, 3–13, 7–3
manually, 3–16
quotaoff command, 7–3
summarizing by fileset, 3–14
quotaon command, 7–3
turning off fileset, 3–24
quotas, 3–1, 7–2
turning off user and group, 3–17
activating fileset, 3–24
user and group, 7–3
activating user and group
users and group, 3–4
at startup, 3–15
viewing with GUI, 6–7
manually, 3–16
changing GUI view, 6–7
checking disk usage, 3–11 R
checking disk usage for filesets,
3–21 read-only
checking fileset ownership, 3–12 fileset, 7–11
deactivating fileset, 3–24 recovering
deactivating user and group, 3–17 file domain, 7–16
deleting fileset, 3–24 multivolume domain, 7–26
deleting user and group, 3–17 root domain, 7–25
disabling fileset, 3–24 system crash, 7–28
disabling user and group, 3–17 reducing
displaying disk usage, 3–12 file domain, 2–10
enabling fileset, 3–24 removing
clone, 2–26, 6–17
file domain, 2–15, 6–12
fileset, 2–21, 6–15
Index–6
fileset quotas, 3–24 single-volume file domain, 2–8
striping, 5–17 shblock, 7–30
user and group quotas, 3–17 shfragbf, A–3
volume, 2–10, 2–13, 6–18 showfdmn command, 2–7, 7–2, 7–4
renamefset command, 2–21 showfile command, 5–6, 5–13, 7–4
renaming showfsets command, 2–18, 3–23,
clone, 2–26 7–4
file domain, 2–15, 6–13 shrinking
fileset, 2–21, 6–16 file domain, 2–13
repairing smooth sync, 5–18
file domain, 7–21 space
repquota command, 3–14, 7–3 corrupt disk usage output, 7–2
restoring file domain, 7–2
data, 4–7 fileset, 7–2
/etc/fdmns directory, 7–19 sparse file, 1–7
files, 4–8 storage bitmap, 2–3
quotas, 4–8 stripe command, 5–14
saveset, 4–8 striping, 5–14
rmfdmn command, 2–15 choosing AdvFS or LSM, 2–33
rmfset command, 2–21, 2–26 file, 5–14, 7–7
rmvol command, 2–10, 2–13 removing, 5–17
root switchlog command, 5–2
changing file domain name, 2–27 Sysman menu, C–1
changing fileset name, 2–28
converting AdvFS to UFS, B–14
converting UFS to AdvFS, B–6 T
file domain, 2–26 tag2name command, A–2
recovering, 7–25 transaction log, 1–5, 2–3, 5–2,
root tag directory, 2–3 7–5, 7–32
rvdump command, 4–1 trashcan, 5–19
rvrestore command, 4–1 tuning
file system, 5–4
S
salvage command, 7–16 U
savemeta, 7–30 UFS
saveset, 4–2 converting file system to, B–14
errors in, 7–9 converting fileset to, B–15
restoring, 4–8 umount command, 2–20
security units
file domain, 2–15, 6–12 GUI display, 6–7
fileset, 2–21, 6–15 unmounting
setting up clone, 2–25, 6–17
AdvFS, 2–1 fileset, 2–20, 6–14
multivolume file domain, 2–11
Index–7
upgrading file system, 7–28
file domain, 2–6 version number, domain, 2–6
fileset, 2–19 vfile command, 7–30
user quotas, 3–3 volume, 2–2
/usr adding, 2–10, 2–11, 6–18, 7–7
converting UFS to AdvFS attributes, 2–3
/usr, B–1 deleting, 2–10, 2–13, 6–18
utility description, 1–4
corruption, 7–5 exchanging, 7–8
removing, 2–10, 2–13, 6–18, 7–7
setting free space alert, 6–18
V structure, 2–3
vdf command, 3–22, 7–4 volumes
vdump command, 4–1 reusing, 7–15
verify command, 7–16, 7–28 vrestore command, 4–1
verifying vsbmpg command, 7–30
Index–8
How to Order Tru64 UNIX Documentation
You can order documentation for the Tru64 UNIX operating system and related
products at the following Web site:
http://www.businesslink.digital.com/
If you need help deciding which documentation best meets your needs, see the Tru64
UNIX Documentation Overview or call 800-344-4825 in the United States and
Canada. In Puerto Rico, call 787-781-0505. In other countries, contact your local
Compaq subsidiary.
If you have access to Compaq’s intranet, you can place an order at the following Web
site:
http://asmorder.nqo.dec.com/
The following table provides the order numbers for the Tru64 UNIX operating
system documentation kits. For additional information about ordering this and
related documentation, see the Documentation Overview or contact Compaq.
Tru64 UNIX
AdvFS Administration
AA-RH96A-TE
Compaq welcomes your comments and suggestions on this manual. Your input will help us to write
documentation that meets your needs. Please send your suggestions using one of the following methods:
• This postage-paid form
• Internet electronic mail: readers_comment@zk3.dec.com
• Fax: (603) 884-0120, Attn: UBPG Publications, ZKO3-3/Y32
If you are not using this form, please be sure you include the name of the document, the page number,
and the product name and version.
Please rate this manual:
Excellent Good Fair Poor
Accuracy (software works as manual says) 3 3 3 3
Clarity (easy to understand) 3 3 3 3
Organization (structure of subject matter) 3 3 3 3
Figures (useful) 3 3 3 3
Examples (useful) 3 3 3 3
Index (ability to find topic) 3 3 3 3
Usability (ability to access information quickly) 3 3 3 3
Please list errors you have found in this manual:
Page Description
_________ _______________________________________________________________________________________
_________ _______________________________________________________________________________________
_________ _______________________________________________________________________________________
_________ _______________________________________________________________________________________
Additional comments or suggestions to improve this manual:
___________________________________________________________________________________________________
___________________________________________________________________________________________________
___________________________________________________________________________________________________
___________________________________________________________________________________________________
What version of the software described by this manual are you using? ______________________
Name, title, department __________________________________________________________________________
Mailing address __________________________________________________________________________________
Electronic mail ___________________________________________________________________________________
Telephone ________________________________________________________________________________________
Date _____________________________________________________________________________________________
.
.
Do Not Cut or Tear - Fold Here and Tape .
.
.
NO POSTAGE .
NECESSARY IF .
MAILED IN THE .
UNITED STATES .
.
.
.
.
.
.
.
FIRST CLASS MAIL PERMIT NO. 33 MAYNARD MA .
.
POSTAGE WILL BE PAID BY ADDRESSEE .
.
.
COMPAQ COMPUTER CORPORATION .
UBPG PUBLICATIONS MANAGER .
.
ZKO3-3/Y32 .
110 SPIT BROOK RD .
NASHUA NH 03062-9987 .
.
.
.
.
.
.
Do Not Cut or Tear - Fold Here .
.
.
.
.
.
.
.
.
Cut on Dotted Line
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.