Xsan 2 Administrator Guide
KKApple Inc. © 2009 Apple Inc. All rights reserved. Intel, Intel Core, and Xeon are trademarks of Intel Corp. in the U.S. and other countries. Under the copyright laws, this manual may not be copied, in whole or in part, without the written consent of Apple. PowerPC™ and the PowerPC™ logo are trademarks of International Business Machines Corporation, used under license therefrom. The Apple logo is a trademark of Apple Inc., registered in the U.S. and other countries.
Contents 9 10 10 11 11 12 Preface: About This Book 13 14 15 15 15 15 16 16 17 17 18 18 19 19 19 19 20 20 Chapter 1: Overview of Xsan 21 21 21 22 22 23 24 Chapter 2: Planning a Storage Area Network What’s New in Xsan 2 Version Compatibility Upgrading from an Earlier Version of Xsan Getting Additional Information Notation Conventions Xsan Storage Area Networks Shared SAN Volumes Metadata Controllers Clients Network Connections How Xsan Storage Is Organized LUNs Storage Pools Affinities and Affinity
25 25 26 26 32 32 32 33 33 33 34 34 34 34 35 Outgoing Mail Service Planning Your SAN Preliminary Planning Questions Planning Considerations and Guidelines Planning the Ethernet TCP/IP Network Using a Private Metadata Network Using Switches Instead of Hubs Planning the Fibre Channel Network Verifying Base Fibre Channel Performance If Your Fibre Channel Fabric Is Running Slower Than Expected Configuring RAID Systems Installing the Latest Firmware Connecting RAID Systems to an Ethernet Network Choosing RAID L
49 49 50 50 Renaming a SAN Removing a SAN Managing Multiple SANs Setting Up Additional SANs 51 51 52 52 53 54 55 56 57 58 58 59 59 60 60 61 61 61 62 62 63 63 63 64 64 65 65 66 66 Chapter 4: Managing SAN Storage 67 67 68 69 70 70 71 71 Chapter 5: Managing Clients and Users Adding Storage Preparing LUNs Finding the Drive Modules That Belong to a LUN Adding a Volume to a SAN Adding a Storage Pool to a Volume Adding LUNs to a Storage Pool Rearranging Fibre Channel Connections Setting Up a Folder Affinit
71 72 72 73 73 73 74 74 74 75 76 77 78 79 80 81 83 83 84 84 85 85 Managing Users and Groups with Workgroup Manager Adding SAN Users Deleting SAN Users Creating Groups Deleting Groups Changing Group Membership Controlling Client and User Access Controlling File and Folder Access Using the Finder Controlling File and Folder Access Using Xsan Admin Unmounting a Volume on a Client Restricting a Client to Read-Only Access Removing a Client from a SAN Mapping Windows User and Group IDs Setting SAN User and Group
96 97 98 99 99 Graphing SAN Resource Usage Setting Up Status Notifications Viewing Xsan Logs Checking Volume Clients Checking for Fibre Channel Connection Failures 100 100 100 100 101 101 101 101 101 101 102 103 103 103 104 104 104 Chapter 8: Solving SAN Problems If You Can’t Connect to a Computer Using Xsan Admin If You Can’t Install the Xsan Software If Computers Aren’t Listed in Xsan Admin If You Can’t Mount a Volume on a Client If You Can’t Unmount a Volume on a Client If RAID LUNs Aren’t Accessible
118 Creating and Preallocating a File (cvmkfile) 119 Initializing a Volume (cvmkfs) 119 Applying Volume Configuration Changes (cvupdatefs) 119 Defragmenting a File, Folder, or Volume (snfsdefrag) 121 Controlling the Xsan File System (xsanctl) 121 Mounting an Xsan Volume 122 Unmounting an Xsan Volume 122 Viewing Logs 122 Xsan Configuration Files 123 Glossary 126 Index 8 Contents
Preface About This Book Use this guide to learn how to use Xsan 2 to set up and manage volumes on a storage area network. This guide shows how to use Xsan 2 to combine RAID arrays into large, easy-to-expand volumes of storage that clients use like local disks, but which are actually shared over a high-speed Fibre Channel fabric. The guide is updated for Xsan 2 version 2.2 and contains the following sections.
ÂÂ Appendix B, “Using the Command Line,” describes command-line utilities and configuration files you can use to manage an Xsan SAN from the Terminal application. What’s New in Xsan 2 Xsan 2 offers these new features and capabilities: ÂÂ The Xsan Admin application is redesigned to simplify SAN management. ÂÂ Xsan Admin enables you to turn on drive activity lights to identify LUNs.
Controller Client Compatible StorNext FS 2.4–2.7 No Xsan 1.4 or earlier Xsan 2.2 No StorNext FS 3.1–3.5 Xsan 2.2 Yes StorNext FS 2.4–3.0.2 Xsan 2.2 No Upgrading from an Earlier Version of Xsan For information about upgrading your SAN storage to Xsan 2 from an earlier version of Xsan—including precautions to take before upgrading and tips for upgrading with the least impact on existing storage—see the Xsan 2 Migration Guide at www.apple.com/xsan/resources/.
Notation Conventions The following conventions are used in this book where shell commands or other command-line items are described. 12 Notation Indicates fixed-width font A command or other text entered in a Terminal window $ A shell prompt [text_in_brackets] An optional parameter (one|other) Alternative parameters (enter one or the other) italicized A parameter you must replace with a value [...
1 Overview of Xsan Learn about storage area networks (SANs) and how Xsan helps you set one up. Read this chapter for an overview of Xsan and how you can use it to set up a SAN to provide fast, shared storage. Mac OS X San Volume Storage pools Xsan lets you combine RAID arrays into volumes clients use like local disks.
Xsan Storage Area Networks A SAN is a way of connecting computers and storage devices so computers have fast, shared access to files while making it easy for administrators to expand storage capacity.
Shared SAN Volumes A user or application on a client computer accesses shared SAN storage just like they would a local volume. Xsan volumes are logical disks made up of pools of RAID arrays. The elements you combine to create an Xsan volume are described in “How Xsan Storage Is Organized” on page 16. Metadata Controllers When you set up an Xsan SAN, you assign at least one computer to act as the metadata controller.
How Xsan Storage Is Organized Although an Xsan volume mounted on a client computer looks like a single disk, it consists of multiple physical disks combined on several levels using RAID techniques. The following illustration shows an example of how disk space provided by drive modules in several RAID systems is combined into a volume that users see as a large local disk.
The illustration on page 16 shows eight LUNs. The LUN that stores metadata and journal information uses RAID level 1 (mirrored) to prevent metadata loss. One LUN stores users’ data on a RAID 0 array (striping only) for best speed and storage efficiency but no data protection. The other data LUNs use RAID 5 (distributed parity) for high performance and storage efficiency with data protection. Xsan sees the RAID arrays as LUNs that can be combined to create a volume.
Volumes Storage pools are combined to create the volumes that users see. From the user’s perspective, the SAN volume looks and behaves like a large local disk, except that: ÂÂ The size of the volume can grow as you add underlying arrays or new storage pools ÂÂ Multiple users on the SAN can access files on the volume at the same time In the illustration on page 16, five storage pools are combined to create a single shared volume. You use Xsan Admin to create volumes and mount them on client computers.
In the illustration on page 16, the Other folder has an affinity for the faster storage pool that is based on a RAID 0 array. Any file that a user copies into the Other folder is stored on the faster array. The Video and Audio folders are associated with the more secure RAID 5 storage. How Xsan Uses Available Storage Xsan stores user files and file system data on SAN volumes, and stripes data across the LUNs in a volume for better performance.
ÂÂ Control user access to files and folders on a volume, by setting up access control lists (ACLs) in Xsan Admin. ÂÂ Set up zones in the underlying Fibre Channel network, to segregate users and volumes. Expanding Storage There are two ways you can add free space to an Xsan volume: ÂÂ Add RAID systems (new LUNs) to existing storage pools ÂÂ Add entire new storage pools to the volume Both methods unmount and remount the volume on clients, so choose a time that’s convenient for your SAN users.
Planning a Storage Area Network 2 Learn about Xsan hardware and software requirements, and about planning guidelines and performance tips that can help you design a SAN to meet your needs.
Memory ÂÂ Client computers must have at least 2 GB of RAM. ÂÂ Computers used as metadata controllers must have at least 2 GB of RAM for Mac OS X Server plus an additional 2 GB of RAM for each SAN volume hosted by the controller. For example, a controller should have 4 GB of RAM to host one volume, or 6 GB for two volumes. Supported Operating Systems You can install Xsan 2.2 only on computers with Mac OS X v10.5, Mac OS X Server v10.5, Mac OS X v10.6, or Mac OS X Server v10.6.
Fabric Configuration You must connect the computers, storage devices, and switches in your Fibre Channel network to form a Fibre Channel “fabric.” In a fabric, Fibre Channel cables connect node ports (F or N_Port). For more information about setting up your fabric, see the documentation that came with your Fibre Channel switches. Ethernet TCP/IP Network Computers on the SAN must be connected to an Ethernet network.
Directory Services If you plan to use user and group privileges to control access to files and folders on the SAN, you should set up or join a central directory of users and groups. A central directory service lets you manage all SAN users and groups from one computer instead of having to visit and painstakingly configure each SAN client and metadata controller.
Important: If you create users and groups on each SAN computer, be sure that: ÂÂ Each user or group has a numeric user ID (UID) or group ID (GID) that is unique throughout the SAN ÂÂ Each user or group defined on more than one computer has the same UID or GID on each computer Outgoing Mail Service Xsan can send SAN status notifications via email on your local network (IP subnet) without using a separate mail server.
Preliminary Planning Questions As you plan, consider the following questions: ÂÂ How much storage do you need? ÂÂ How do you want to present available storage to users? ÂÂ What storage organization makes the most sense for user workflow? ÂÂ What levels of performance do users require? ÂÂ How important is high availability? ÂÂ What are your requirements for security? Your answers to the questions above will help you decide the following: ÂÂ What RAID schemes should you use for your RAID arrays? ÂÂ How many
How Should Users See Available Storage? If you want users working on a project to see a volume dedicated to their work, create a separate volume for each project. If it’s acceptable for a user to see a folder for his or her work on a volume with other peoples’ folders, create a single volume and organize it into project folders.
ÂÂ Choose a different primary metadata controller for each volume, and set up volume failover priorities to minimize the possibility of more than one volume failing over to the same metadata controller. ÂÂ If all computers on your SAN are running Xsan 2.2, enable Extended Attributes for your volumes to eliminate the overhead of file information being stored in multiple hidden files.
Most RAID systems support all popular RAID levels. Each RAID scheme offers a different balance of performance, data protection, and storage efficiency, as summarized in the following table.
For this volume type’s affinity tags used for user data Assign LUNs in multiples of General File Server 2 Home Folder Server 2 Mail Cluster 1 Podcast Producer Cluster 4 Standard Definition Video 4 Uncompressed High Definition Video 4 Assign LUNs that have the same capacity and performance characteristics to each affinity tag.
If high availability is important, use at least two metadata controllers: one as the primary controller and one as a standby. You can specify additional metadata controllers as needed, and set each volume’s failover priorities to determine the order in which the controllers are tried if a volume’s primary controller stops responding. If performance is critical, don’t run other server services on the metadata controller and don’t use the controller to reshare a SAN volume using AFP or NFS.
ÂÂ If you choose balance, Xsan writes data to the storage pool that has the most free space. Planning the Ethernet TCP/IP Network Ethernet connections are used in several ways in an Xsan SAN: ÂÂ Xsan clients and metadata controllers use Ethernet to exchange volume metadata. ÂÂ Xsan clients can use Ethernet for access to networks outside the SAN (campus or corporate intranet or the Internet). ÂÂ Xsan metadata controllers can use Ethernet connections for remote management.
Planning the Fibre Channel Network Xsan uses Fibre Channel connections to: ÂÂ Transfer user data between clients and data storage pools ÂÂ Transfer metadata between metadata controllers and metadata storage pools If you have connections operating below the data rate supported by your equipment (typically 2 or 4 Gb/s), verify Fibre Channel performance and troubleshoot the fabric.
Connect Devices to Specific Blades If your Fibre Channel switch is based on a blade architecture, you might be able to improve performance by: ÂÂ Connecting pairs of devices that routinely exchange large volumes of data to the same blade in the switch ÂÂ Distributing loads across multiple blades instead of concentrating all of the load on one or two blades Configuring RAID Systems Follow these guidelines when you set up your RAID systems for use as Xsan LUNs.
Adjusting RAID System Performance Settings RAID system performance settings, which affect parameters such as drive caching, RAID controller caching, and read prefetching, can have a significant effect on Xsan volume performance. Follow these guidelines. Enable Drive Caching In addition to the caching performed by the RAID controller, each drive in an array can perform caching at the drive level to improve performance.
Enable Read Prefetching Read prefetching is a technique that improves file system read performance when data is being read sequentially, as in the case of audio or video streaming, for example. When read prefetching is enabled, the RAID controller assumes that a read request for a block of data will be followed by requests for adjacent data blocks. To prepare for these requests, the RAID controller reads the requested data and the following data, and stores it in cache memory.
Setting Up a Storage Area Network 3 Follow step by step instructions for setting up a shared volume on an Xsan SAN. This chapter explains how to connect the SAN networks, prepare RAID arrays (LUNs), use the Xsan Admin application, set up a SAN, and create a shared volume. This chapter also tells you how to administer Xsan remotely, rename a SAN, remove a SAN, set up additional SANs, and manage multiple SANs.
Using Server Assistant to Configure Controllers You can use the Mac OS X Server setup assistant, Server Assistant, to configure servers as Xsan metadata controllers. Server Assistant runs when you start up a new server or a server on which you have performed a clean installation of Mac OS X Server v10.5.6 or v10.6. When using Server Assistant to set up your primary metadata controller, you can choose how to manage Xsan users and groups.
Using Xsan Admin You use the Xsan Admin application (installed in /Applications/Server/) to set up and manage your SAN. You can use Xsan Admin to manage an Xsan 2 SAN from any computer that has access to the same public intranet as the SAN. Installing Only the Xsan Admin Application You can install Xsan Admin on any Intel-based computer you want to use to manage the SAN. See “Setting Up an Xsan Administrator Computer” on page 49.
Setting Up an Xsan Volume on a SAN Step 1: Set Up the Fibre Channel Network To set up the SAN Fibre Channel network: mm Connect controller computers, client computers, and RAID storage systems to a Fibre Channel switch to create a Fibre Channel fabric for the SAN. Be sure to configure the switch and make the connections so you create a Fibre Channel fabric. For more information, see the guidelines and requirements in “Fibre Channel Fabric” on page 22.
For information about private IP addresses and the network settings you must make if the Xsan setup assistant doesn’t configure the metadata network settings on SAN computers, see “Ethernet TCP/IP Network” on page 23. Step 3: Configure SAN Computers to Use a Time Server To ensure consistent time metadata across all computers in the SAN, choose the same network time server for all metadata controller and client computers in the SAN.
After setup, you use Xsan Admin to create and delete users and groups and to change group membership. For information about Open Directory servers, see “Directory Services” on page 24. Use existing users and groups from an Open Directory server: Select this option to have the Mac OS X Server setup assistant configure the primary metadata controller to connect to the Open Directory server whose DNS name or IP address you specify.
Step 6: Create a Metadata Array Ten GB of disk space is enough to store the metadata for a volume containing 10 million files, so a two-drive RAID 1 (mirrored) array is generally large enough to store the metadata for your SAN volume. If you dedicate a spare drive to this array to guarantee availability, three drives are adequate for your SAN metadata. If your RAID arrays consist of four or more drives, you can convert an existing array into a small metadata array so you can reuse the extra drives.
To install Xsan software on a computer that has no keyboard or display: 1 Insert the Xsan Install Disc in the computer that doesn’t have a keyboard or display. 2 Log in to a computer that does have a keyboard and display. 3 In the Finder, choose Go > Connect to Server and enter vnc://address in the Server Address field, replacing address with the IP address or DNS name of the target computer. 4 Click Connect and enter the name and password of an administrator account on the target computer.
You can also open Xsan Admin on any computer with an intranet or Internet connection to your SAN computers. (You can use Xsan Admin on a computer that isn’t connected to the SAN’s private metadata network or its Fibre Channel network.) 2 In the Introduction pane, click Continue. 3 In the Initial SAN Setup pane, select “Configure new SAN.” For information about connecting to an existing SAN, see “Managing Multiple SANs” on page 50.
Step 9: Create a Volume When the Xsan setup assistant finishes basic SAN configuration, it asks if you want to create a volume. To create a volume: 1 In the “Create Volume” pane, select “Create a volume now” and click Continue. If you want to create volumes later, follow the instructions in “Adding a Volume to a SAN” on page 53. 2 In the “Volume Name and Type” pane, enter a name for the volume and choose a volume type that matches the type of work the volume will support.
Spotlight: Enable this if you want Macintosh clients to search the contents of the volume using Spotlight. Extended Attributes: Select this option if all computers on your SAN are running Xsan 2.2 and you want to ensure the best possible performance by storing related information for each file inside the file itself instead of in separate hidden files. This option is enabled by default if the SAN consists of all Xsan 2.2 systems.
Stripe Breadth: Specify how much data is written to or read from each LUN in storage pools that have this affinity tag (or each LUN in the custom storage pool) before moving to the next LUN. This value can affect performance. If you’re not sure what value to use, accept the preset value. 5 If the Volume Failover Priority pane appears, arrange the list so as few SAN volumes as possible have the same metadata controller first on their failover priority lists, and then click Continue.
Setting Up an Xsan Administrator Computer You can install the Xsan Admin application on any computer with an Intel processor and Mac OS X or Mac OS X Server v10.5 or v10.6, and then use it to administer an Xsan 2 SAN remotely. The administrator computer must be able to connect to all SAN computers via your public intranet or the Internet. The administrator computer doesn’t need to be connected to the SAN’s private metadata network or the SAN’s Fibre Channel network.
Managing Multiple SANs You can use Xsan Admin to manage more than one Xsan 2 SAN. The computer with Xsan Admin doesn’t need to be connected to the SAN’s private metadata network or its Fibre Channel network, but it must be able to connect to the SAN computers via your public intranet or the Internet. To manage another SAN: 1 Open Xsan Admin and choose File > New. 2 Click Continue in the Introduction pane. 3 Select “Connect to existing SAN,” click Continue, and follow the onscreen instructions.
Managing SAN Storage 4 Use Xsan Admin and related command-line tools to expand, add, modify, check, and repair SAN volumes. This chapter shows how you can expand an existing Xsan volume to provide more free space. It also contains information about volume and storage pool settings, and shows how to check and resolve volume integrity and fragmentation problems.
Preparing LUNs Each LUN in an Xsan volume is a RAID array. The way you set up your arrays depends on the storage device you’re using. To create a set of LUNs for your SAN, use the application that comes with your RAID system to create, for example, LUNs based on different RAID schemes or LUNs based on array stripes. Setup scripts for creating common LUN configurations on Promise RAID systems are available at www.apple.com/support/.
Adding a Volume to a SAN A single Xsan SAN can provide access to multiple volumes. Select to view current volumes. Click to add a new volume. To add a volume: 1 In Xsan Admin, select Volumes in the SAN Assets list and click the Add Volume (+) button. 2 In the Volume Name and Type pane of the assistant, enter a name for the volume and choose a volume type that matches the kind of work the volume will support. Xsan Admin sets the underlying volume settings accordingly.
Adding a Storage Pool to a Volume You can add free space to a SAN volume by adding a storage pool to the volume. If you’re expanding a volume that’s based on a built-in volume type, you can create a new affinity tag and add LUNs to it. Xsan Admin creates and organizes storage pools within that tag for you. If you add LUNs to an existing affinity tag, Xsan Admin fills out any existing storage pool that has too few LUNs and, if there are enough LUNs, creates storage pools for you.
Adding LUNs to a Storage Pool You can increase the size of a SAN volume by adding LUNs (RAID arrays or array slices) to storage pools in the volume. If you’re expanding a volume that is based on a builtin volume type, you add LUNs to affinity tags and Xsan Admin assigns those LUNs to underlying storage pools for you, creating storage pools as needed, based on the optimal number of LUNs per pool for the volume type (“Assigning LUNs to Affinity Tags” on page 29).
To add a LUN to a storage pool: 1 If you haven’t already done so, connect the RAID system that hosts the LUN to the SAN Fibre Channel network and power on the device. 2 In Xsan Admin, select Volumes in the SAN Assets list. 3 Select the volume in the list and choose Expand Volume from the Action (gear) popup menu. 4 In the Label LUNs pane of the assistant, choose whether you want to label unlabeled LUNs individually or sequentially based on a label prefix.
Setting Up a Folder Affinity Every storage pool in a volume has an affinity tag. You can use the tag to be sure that files in a folder are stored on a specific storage pool. Files in folders without affinities are stored in the next available storage pool according to the volume’s allocation strategy (fill, round-robin, or balance). Some storage pools might be larger, faster, or better protected than others.
Changing a Folder’s Storage Pool Affinity You can use Xsan Admin to change a folder’s affinity so all new files placed in the folder are stored on a new storage pool. To change a folder affinity: 1 In Xsan Admin, select File Management in the SAN Assets list. 2 Select the folder, choose Set Affinity from the Action (gear) pop-up menu, and then choose the new affinity tag. 3 Click OK. Files in the folder aren’t moved to the new storage pool.
Changing Advanced Volume Settings If your SAN volume has special configuration requirements, you can change the standard volume settings when you create a volume. You can also change these settings for an existing volume, with the exception of the block allocation size and disabling the extended attributes option. (Once enabled, extended attributes can’t be disabled.) Note: To change a volume’s block allocation size or disable extended attributes, you must destroy and recreate the volume.
For most volumes, the preset block allocation size and storage pool stripe breadth result in good performance. However, in some cases you might be able to improve read or write performance by adjusting these settings to suit a specific application. For example, if your application reads and writes small blocks of data, you might improve performance by choosing a correspondingly small block allocation size.
Enabling Extended Attributes If all computers on your SAN are running Xsan 2.2, you can enable extended attributes for the files on your volumes. When extended attributes are enabled, attributes associated with a file are stored inside the file itself rather than in separate hidden files. Enabling extended attributes improves file system performance. Important: You can’t disable extended attributes. Enabling them on a volume is a one-way process and can’t be undone.
Changing Advanced Allocation and Cache Settings Volume settings that control the allocation of space for growing files and the caching of file-related data structures are set by Xsan Admin to suit the type of volume you set up. If necessary, you can use Xsan Admin to adjust these advanced allocation and caching settings for a volume. Important: Do not adjust these settings unless you understand their role in volume performance or you are directed to change them by Apple support personnel.
Changing Storage Pool Settings The SAN Setup assistant chooses storage pool settings based on the type of volume you create. To specify storage pool settings yourself, choose an affinity tag or storage pool on the Configure Volume Affinities pane of the SAN Setup assistant when you create the volume and click the Settings button below the list. The best way to set up a SAN is to plan its organization carefully before you set it up, including settings for the storage pools that make up its volumes.
Checking Volume Fragmentation When you create a file, Xsan divides the file into pieces and distributes these pieces efficiently over the LUNs that make up one of the volume’s storage pools. Over time, as the file is modified, its pieces become scattered in less efficient arrangements. You can use the cvfsck utility to check the state of file fragmentation on your volumes. To check volume fragmentation: 1 Open Terminal (in /Applications/Utilities/).
Checking the Integrity of a Volume If SAN users have trouble accessing files, use the cvfsck command to check the integrity of a volume, its metadata, and its files. To check a volume: 1 Open Terminal (in /Applications/Utilities/). 2 If you aren’t working at the SAN controller computer, use SSH to log in to the controller remotely: $ ssh user@computer Replace user with the name of an administrator user on the controller computer and computer with the controller’s name or IP address.
Repairing a Volume If the cvfsck utility reveals problems with a volume, you can use the same command to repair the volume. To repair a volume: 1 Stop the volume. Open Xsan Admin, select the volume, and click Stop Volume in the Action (gear) popup menu. 2 Open Terminal (in /Applications/Utilities/).
Managing Clients and Users 5 You can use Xsan Admin and related command-line tools to add, control, and remove client computers and their users. Xsan clients are computers that have Fibre Channel connections to a SAN. SAN users log in to client computers to access files stored on SAN volumes. This chapter shows you how to add clients, control client access to volumes, and manage user quotas. Adding a Client Before a computer can use a SAN volume, you must add the computer to the SAN as a client.
To add a client computer to a SAN: 1 Connect the client to the SAN’s Fibre Channel and Ethernet networks. 2 Install the Xsan software on the client. 3 Open Xsan Admin, select Computers in the SAN Assets list, and click the Add (+) button. 4 In the Add Computers pane of the assistant, make sure there’s a check next to the new client in the list, then click Continue. If the client isn’t in the list, click Add Remote Computer and add it.
To add an Xsan serial number: 1 In Xsan Admin, select Serial Numbers in the SAN Assets list. 2 Click the Add (+) button. 3 Enter the serial number, registered owner, and organization information provided by Apple, then click OK. If you have serial numbers in a text file, you can drag the file to the Serial Number list in Xsan Admin. Moving a Client to Another SAN You can move a client from one Xsan SAN to a different SAN on the same Ethernet subnet and Fibre Channel network.
Mounting a Volume on a Client When you create a volume, it is mounted on SAN computers. However, if you explicitly unmount a volume from a client, you must mount it again to restore access. Select the volume. Select to view computers that don’t have the volume mounted. Mount Read & Write button To mount an Xsan volume on a client: 1 In Xsan Admin, select Mounts in the SAN Assets list. 2 Select the client in the list. 3 Select the volume in the Volume pop-up menu.
To change mount options: 1 In Xsan Admin, select Mounts in the SAN Assets list. 2 Select the volume in the Volume pop-up menu. 3 Select the client in the list. 4 Choose Edit Mount Options from the Action (gear) pop-up menu and change: Directory cache size: Controls the number of file system directory entries cached on the client for each SAN volume. Increase this value if the volume contains a large number of small files (for example, if the volume hosts a home directory server or mail server).
Adding SAN Users Only users in the SAN’s directory can log in to a client computer and access Xsan volumes. You can use Xsan Admin to add users to your SAN. Select to view current SAN users. Add button Note: These instructions apply only if, during initial SAN setup, you chose to use Xsan Admin to manage users and groups. If you have a different directory configuration, use the management software for your directory to add user accounts.
To delete a user: 1 In Xsan Admin, select Users and Groups in the SAN Assets list. 2 Select the user in the list and choose Delete User or Group from the Action (gear) pop-up menu. Creating Groups You can create groups of users to simplify user management. If you chose to have Xsan manage your users and groups, you already have a group named Workgroup that contains all users. Note: These instructions apply only if, during initial SAN setup, you chose to use Xsan Admin to manage users and groups.
To change a group’s membership: 1 In Xsan Admin, select Users and Groups in the SAN Assets list. 2 Select the group in the list and click the Edit button in the lower-right corner of the window. 3 Select the checkbox next to a user to add the user to the group, or deselect the checkbox to remove the user. 4 Click OK. Controlling Client and User Access To control access to information on SAN volumes, you can: ÂÂ Use the Finder’s Get Info window to apply basic access controls to a file or folder.
Unmounting a Volume on a Client To prevent a client from accessing a volume, you can unmount the volume from the client. Clients can’t mount SAN volumes; only an administrator can mount a SAN volume on a client. Select the volume. Select to view computers that have the volume mounted. Unmount button Note: A user can unmount a SAN volume from a client computer temporarily by ejecting it in the Finder like any other mounted volume. However, the volume remounts after a few moments.
Restricting a Client to Read-Only Access To prevent a user on a client computer from modifying data on a SAN volume, you can mount the volume on the client with read-only access. Select the volume. Select to view computers that don’t have a volume mounted. Option-click to mount volume read-only. To mount a volume with read-only access: 1 In Xsan Admin, select Mounts in the SAN Assets list. 2 Choose the volume from the Volume pop-up menu. 3 Select the client. 4 Option-click the Mount Read & Write button.
Removing a Client from a SAN You can remove a client computer from a SAN to prevent it from accessing SAN volumes. Select to view computers already in the SAN. Action menu To remove a client from a SAN: 1 In Xsan Admin, select Computers in the SAN Assets list, select the client, and choose “Remove computer from SAN” from the Action (gear) pop-up menu. If SAN volumes are mounted on the client, Xsan Admin unmounts them.
Mapping Windows User and Group IDs You can use the Windows ID Mapping setting for a volume to specify how Windows clients map user and group information to Xsan-compatible user IDs (UIDs) and group IDs (GIDs), which they need in order to access Xsan volumes. Note: To use ID mapping, Windows clients must be running StorNext 2.7. Xsan controllers and clients must be running Xsan 1.4.2 or later.
Setting SAN User and Group Quotas You can use Xsan Admin to set quotas on the amount of storage available to a user or group. To set a storage quota for a user or group: 1 In Xsan Admin, select Users and Groups in the SAN Assets list. If you’re not using Xsan Admin to manage users and groups, you’ll see Quotas in the SAN Assets list instead of Users and Groups. 2 Choose a volume from the Volume pop-up menu. 3 Select a user or group in the list.
To remove a quota: mm Select the user or group and choose Delete Quota from the Action (gear) pop-up menu. If your Xsan computers connect to another Mac OS X Server for user and group accounts, use Workgroup Manager or Server Preferences to create users and groups as needed.
Example Suppose you assign Aldo a soft quota of 75 GB, a hard quota of 100 GB, and a grace period of 48 hours. Aldo’s files can occupy up to 75 GB of space at any time, for as long as he needs them. If Aldo is surprised by additional or unusually large files, he can still copy them to the volume, up to a total of 100 GB. He then has 48 hours to remove files and return below the 75 GB soft limit.
To view quota status: mm In Xsan Admin, select “Users and Groups” or Quotas in the SAN Assets list. (You see Users and Groups only if you chose to have Xsan Admin manage your users and groups. Otherwise, you see Quotas instead.) To be sure you’re seeing current information, click Refresh at the top of the window. Xsan Admin displays the following information for each user or group: Used: The amount of space the user’s files are occupying. Quota: The soft and hard quotas.
Helping Users Check Quotas SAN users who work on client computers but don’t have access to Xsan Admin can use the Xsan User Quotas application to check and monitor their quotas. To check your quota from a client computer: mm Open the Xsan User Quotas application (in /Applications/Server/). Creating Local Home Folders for Network Accounts Using a centralized directory simplifies the job of managing user accounts for client computers attached to the SAN.
Managing Client Computers Remotely Xsan Admin can help you connect to an Xsan client computer so you can observe or control it over the network. Using Xsan Admin, you can: ÂÂ Start a screen sharing session so you can observe or control another computer. ÂÂ Open Terminal so you can log in using SSH and control another computer. ÂÂ Connect to and manage another server on the network using Server Admin.
Connecting to a Client Using SSH in Terminal You can use the Secure Shell (SSH) tool from the command line to log in to a SAN client over the network. Xsan Admin can start an SSH session with the client or controller. To connect to a client using SSH: 1 In Xsan Admin, select Computers in the SAN Assets list. 2 Select the client you want to connect to. 3 Choose “Connect using ssh” from the Action (gear) pop-up menu.
Managing Metadata Controllers 6 To increase SAN security and redundancy, you can add, switch, and monitor Xsan metadata controllers. Every SAN volume you set up is managed by a metadata controller. To be sure that the volume is available to clients even if the primary metadata controller becomes unresponsive, you can set up standby controllers, one of which will assume control of the volume if the primary controller fails.
Adding a Metadata Controller You can add standby controllers to a SAN so that volumes remain available if the primary controller fails. Select to view computers already in SAN. Add button To add a metadata controller: 1 Connect the new controller computer to the SAN’s Fibre Channel and Ethernet networks and install the Xsan software. 2 Open Xsan Admin, select Computers in the SAN Assets list, and then click the Add (+) button.
Setting Controller Failover Priority When the primary metadata controller for a volume fails, Xsan uses the failover priorities of the available standby controllers to decide which one to switch to. Different volumes can be hosted by different controllers, and you can choose a failover priority for each volume. To set a metadata controller’s failover priority: 1 Open Xsan Admin, select Volumes in the SAN Assets list, and select a volume in the list.
Finding Out Which Controller Is Hosting a Volume Control of a volume can move from one metadata controller to another as a result of controller failover. You can use Xsan Admin to find out which controller is hosting a volume. The controller that is currently hosting the volume To view a volume’s controller: mm In Xsan Admin, select Volumes in the SAN Assets list and look in the Hosted By column.
From the Command Line You can also find out which volumes are hosted by a controller using the cvadmin select command in Terminal. For more information, see the cvadmin man page or “Viewing or Changing Volume and Storage Pool Settings (cvadmin)” on page 111. Changing a Controller’s IP Address Follow these instructions to change the IP address of an Xsan metadata controller.
Accessing Controller Computers Remotely Xsan Admin can help you connect to an Xsan controller so you can observe or control it over the network. Using Xsan Admin, you can: ÂÂ Start a screen sharing session so you can observe or control another computer. ÂÂ Open Terminal so you can log in using SSH and control another computer. ÂÂ Connect to and manage another controller or client on the network using Server Admin.
Connecting to a Controller Using SSH in Terminal You can use the Secure Shell (SSH) tool from the command line to log in to a SAN controller over the network. To connect to a controller using SSH: 1 In Xsan Admin, select Computers in the SAN Assets list. 2 Select the controller you want to connect to. 3 Choose “Connect using ssh” from the Action (gear) pop-up menu.
Monitoring SAN Status 7 You can use Xsan Admin and related command-line tools to check the condition of a SAN and its components. This chapter shows you how to check the status of a SAN and its volumes and how to set up notifications so you’ll be alerted to changes in the SAN. Checking SAN Status You can use Xsan Admin to view status and configuration information for the SAN and its components.
To view the overall status of the SAN: mm Open Xsan Admin and select Overview in the SAN Assets list. To view a component’s status and configuration information: mm Open Xsan Admin, click the Inspector button at the top of the window, and then select the component in the SAN Assets list or the main pane of the Xsan Admin window. Checking Volume Status You can use Xsan Admin to view the status of a volume.
Checking Free Space on a Volume There are several ways to see how much space is available on a SAN volume. Available space To check the free space on a volume: mm From a client or controller computer that has the volume mounted, select the volume in a Finder window and look at the size information at the bottom of the window (in Column or List view) or choose File > Get Info. You can also use Disk Utility.
Checking Free Space on a Storage Pool In addition to checking free space on a volume, you can check free space on storage pools in the volume. To check the free space on a storage pool: mm Open Xsan Admin, select Volumes in the SAN Assets list, select a storage pool, and then click the Inspector button at the top of the window. If you don’t see the storage pools for a volume, click the volume’s disclosure triangle.
To view usage graphs: mm In Xsan Admin, click the Graphs button at the top of the window and use the three pop-up menus in the Graphs window to choose a computer, a data type, and a time interval. Memory and CPU resources used by the file system (fsm) process for a volume are listed under the name of the volume in the Graphs pop-up menu when you choose the volume’s controller from the Computer pop-up menu.
Viewing Xsan Logs You can use Xsan Admin to view the informational and diagnostic messages that Xsan writes to a computer’s system and log. Choose a log file. Choose a SAN computer. Type to search for entries containing specific text. Location of the selected log file To view the SAN logs: mm In Xsan Admin, click the Logs button at the top of the window, and then in the Logs window that appears, use the Computer and Log pop-up menus to choose the log you want to view.
Checking Volume Clients You can use Xsan Admin to see a summary of which clients are using a volume. Choose a volume. Select to see which computers have a volume mounted. To see how many clients have a volume mounted: mm Open Xsan Admin, select Volumes in the SAN Assets list, select the volume in the list, and click the Inspector button at the top of the window.
Solving SAN Problems 8 Use this chapter to find solutions to common problems you might encounter while working with a SAN. Look here for solutions to common problems you might encounter while setting up, managing, or using an Xsan SAN. If You Can’t Connect to a Computer Using Xsan Admin If there is a firewall between the administrator computer and the SAN computer, make sure TCP port 311 is open.
If You Can’t Mount a Volume on a Client ÂÂ Try restarting the client computer, and then try again. ÂÂ Check that all Fibre Channel cables are plugged in. ÂÂ Make sure no other volumes are mounted on the client that have the same name as the Xsan volume. If You Can’t Unmount a Volume on a Client ÂÂ Make sure no processes are using the volume. ÂÂ Try restarting the client computer, and then try again.
If You Can’t Add a Storage Pool Some reserved names can’t be used to name a storage pool. If you enter one of these names, the OK button in the storage pool sheet is disabled.
If Fibre Channel Performance Is Poorer Than Expected Mismatched optical transceivers (GBICs) can cause Fibre Channel communication errors and degrade SAN performance. To ensure good performance, use identical transceivers (same manufacturer and model number) on both ends of your Fibre Channel cables.
To check the data types a storage pool is used for: mm In Xsan Admin, select Volumes in the SAN Assets list and then click disclosure triangles in the list of volumes to show the storage pool of interest. Double-click the storage pool in the list and look next to “Used For” in the Inspector window.
A Appendix Combining Xsan Controllers and StorNext Clients Here’s how to connect Windows, Solaris, UNIX, AIX, IRIX, or Linux clients to an Xsan SAN. Xsan is fully compatible with Quantum’s StorNext File System, so you can set up Xserve and RAID systems to act as SAN controllers and storage for Windows, Sun Solaris, UNIX, IBM AIX, SGI IRIX, or Linux clients that run StorNext software. For information about adding Macintosh clients to an existing StorNext SAN, see the StorNext documentation.
Terminology Note these differences in terminology between StorNext and Xsan: StorNext term Equivalent Xsan term file system volume file system server (FSS) controller (or metadata controller) stripe group storage pool Licensing You license a Macintosh Xsan client or controller using the single-copy serial number printed on the Xsan Install Disc sleeve that comes in the Xsan package, or serial numbers you purchase separately.
4 Place a StorNext license file for your non-Macintosh clients on the Macintosh Xsan controller. On the Xsan controller, put the file (named license.dat) in the folder /Library/Filesystems/Xsan/config/. Contact Quantum to obtain a license file for your non-Macintosh clients.
B You can use Xsan shell commands and configuration files to work with a SAN from the command line. You can use the shell commands and configuration files described here to access, set up, and manage Xsan SANs, LUNs, storage pools, and volumes from the command line. The Terminal application is the Mac OS X gateway to the BSD command-line interface (UNIX shell command prompt).
Replace user with the name of a user account on the remote computer and computer with its IP address or DNS name. Viewing the Man Pages Detailed documentation for Xsan command-line utilities is available in UNIX-style man pages. A command’s man page includes information about the command, its options, parameters, and proper use. The man pages for Xsan commands are located in /Library/Filesystems/Xsan/man/.
To install Xsan on a computer that has no keyboard or monitor: 1 Log in to a computer that has a keyboard and monitor, and then insert the Xsan Install Disc. 2 Open the Terminal application (in /Applications/Utilities/). 3 In Terminal, copy the Xsan installer package to the remote computer: $ scp -r /Volumes/Xsan\ Install\ Disc/Install\ Xsan.
Tool Description cvmkfile Create and preallocate a file; see page 118 cvmkfs Initialize a volume; see page 119 cvupdatefs Apply volume setup changes; see page 119 snfsdefrag Defragment a volume; see page 119 xsanctl Mount and unmount Xsan volumes; see page 121 Viewing or Changing Volume and Storage Pool Settings (cvadmin) Use the cvadmin tool to perform status and setup tasks related to Xsan volumes.
Parameter Description -e command Execute the specified command and return to the shell prompt. Otherwise, cvadmin continues to run in interactive mode with the prompt Xsanadmin>. If you include parameters (cmdparam) with the command, enclose the command and its parameters in a pair of quotes. Available commands are listed in “cvadmin Commands” below. cmdparam Values required by the command. Commands available in the cvadmin tool are listed in the following table.
cvadmin command Description paths List available LUNs. quit Exit from cvadmin. quotas [yes|no] Enable or disable quotas for the active (selected) volume. Use the command without parameters to see the current setting for quotas. quotas get (user|group) name Display current quota information for a user or group. name – the name of the user or group quotas set (user|group) name hard soft grace Set quotas for user or group name.
cvadmin command Description show [pool] [long] List storage pool information for the active volume. pool – the name of a storage pool in the currently active volume start volume [on] [controller] Start a volume based on the information in its configuration file (/Library/Filesystems/Xsan/ config/volume.cfg). volume – the name of an Xsan volume controller – The address of the metadata controller to start the volume’s FSM process on stat Display information about the active volume.
Copying Files or Folders (cvcp) Use the cvcp command to copy files or folders to or from an Xsan volume. $ cvcp [options] source destination Parameter Description options See “cvcp Command Options” below. source The file or folder (directory) to be copied. destination Where the copy is created. cvcp Command Options Option Description -A Turn off preallocation. -b buffers Set the number of I/O buffers to use.
$ cvcp -vxy data1 /datasets/data1 Perform a similar copy as above, but only copy files with names that begin “jul”: $ cvcp -vxy -p jul data1 /datasets/data1/july Checking or Repairing a Volume (cvfsck) Use the cvfsck command to check or repair an Xsan volume. $ sudo cvfsck [options] volume Parameter Description options See “cvfsck Command Options” below. volume The name of the volume to check or repair. cvfsck Command Options Option Description -d Display extra debugging information.
To list available LUNs: $ sudo cvlabel -l [-s] [-v] To list current LUN and label information you can paste into a label file: $ sudo cvlabel -c To label a LUN: $ sudo cvlabel [-v] [-f] [labelfile] To remove the label from a LUN: $ sudo cvlabel -u lun Parameter Description -l List available LUNs. -s Display device serial numbers. -v Show progress display. -c Create a label template file. -f Relabels LUNs that are labeled. labelfile An optional file containing information for each label.
Creating and Preallocating a File (cvmkfile) Use the cvmkfile command to allocate space for a file on an Xsan volume. $ cvmkfile [-k affinity] [-p] [-s] [-w] [-z] size(k|m|g) filename Parameter Description -k affinity Allocate space for the file on one of the storage pools with the specified affinity tag.
Initializing a Volume (cvmkfs) Use the cvmkfs command to initialize an Xsan volume based on the information in the volume’s configuration (in /Library/Filesystems/Xsan/config/volume.cfg). WARNING: Initializing a volume destroys all existing data on the volume. $ sudo cvmkfs [-G] [-F] [volume] Parameter Description -G Don’t display “Press return to continue” prompts. -F Don’t display warning and verification prompts. Use with caution. volume The name of the volume to initialize.
To display an extent count without defragmenting: $ snfsdefrag -c [-K affinity] [-r] target [target] [...] To prune a file (remove allocated extents beyond the end of file): $ snfsdefrag -p [-D] [-v] [-q] [-K affinity] [-m count] [-r] target [target] [...] To list files that are candidates for defragmentation: $ snfsdefrag -l [-D] [-v] [-K affinity] [-m count] [-r] target [target] [...] Parameter Description -c Display an extent count but don’t defragment target. -D Display debugging messages.
List the extents: $ snfsdefrag -e datafile Defragment the file datafile: $ snfsdefrag datafile Defragment every file in the folder /datafolder/ (or any folder within /datafolder/) that has more than one extent: $ snfsdefrag -r datafolder Recover unused preallocated disk space assigned to every file in folder /datafolder/: $ snfsdefrag -rp datafolder Controlling the Xsan File System (xsanctl) Use the xsanctl command to control basic Xsan file system functions. For details, see the xsanctl man page.
For example: $ sudo xsanctl mount SanVol Unmounting an Xsan Volume Use the xsanctl command to unmount an Xsan volume on a computer. To unmount a volume: 1 Go to the computer and open Terminal, or use SSH to log in to the computer remotely: $ ssh user@computer 2 Unmount the volume: $ sudo xsanctl unmount volume For example: $ sudo xsanctl unmount SanVol Viewing Logs The system log to which Xsan writes information about SANs is in /var/log/system.log.
Glossary Glossary affinity A relationship between a folder on an Xsan volume and one or more storage pools that provide storage for the volume. The affinity guarantees that files placed in the folder are stored only on the associated storage pools. Storage pools can differ in capacity and performance, and affinities can be used to assure that data such as video, which requires high transfer speed, is stored on the fastest storage devices.
file system A scheme for storing data on storage devices that allows applications to read and write files without having to deal with lower-level details. file system server See FSS. fill An Xsan storage pool allocation strategy. In a volume consisting of more than one storage pool, Xsan fills up the first pool before writing to the next. format (verb) In general, to prepare a disk for use by a particular file system. FSS File system server.
RAID 0 A RAID scheme in which data is distributed evenly in stripes across an array of drives. RAID 0 increases the speed of data transfer, but provides no data protection. RAID 0+1 A combination of RAID 0 and RAID 1. This RAID scheme is created by striping data across multiple pairs of mirrored drives. RAID 1 A RAID scheme that creates a pair of mirrored drives with identical copies of the same data. It provides a high level of data availability.
A access permissions for folders 74 read-only volumes 76 unmounting a volume 75 access control list.
monitoring connection failures 99 supported switches 22 file systems. See volumes files limit per volume 20 maximum size 20 name length limit 20 fill volume allocation strategy 60 firewall, and Xsan Admin 39 fragmentation 64 free space checking quota use 81 checking storage pool 96 checking volume 95 G grace period (quota) 80 graphs controller overall CPU use 96 controller overall IP network use 96 group ID.
refresh interval, Xsan Admin 39 repairing a volume 66 round robin volume allocation strategy 60 S SAN (storage area network) adding 50 adding clients 67 adding storage 51 managing multiple 50 moving clients 69 name length limit 20 removing 49 renaming 49 security considerations 19, 28 serial number adding 68 sending expiration notifications 97 Server Assistant 38 shared secret file 106 shell commands cvadmin 111 cvaffinity 114 cvcp 115 cvfsck 116 cvlabel 116 cvmkdir 117 cvmkfile 118
X Xsan Admin installing 49 remote SAN management 50 Xsan Admin application and firewalls 39 overview 39 preferences 39 refresh interval 39 Xsan software compatibility with StorNext software 105 installing 43 removing (uninstalling) 77 version compatibility 10 Xsan User Quotas application 83 xsanctl command 121 Index 129