Xsan 1.0 to 1.2: For maximum stability, manually configure LUNs larger than 2TB

To ensure maximum stability, you should manually label LUNs greater than 2TB when using Xsan versions 1.0 to 1.2 only (Xsan 1.3 and later running on Mac OS X 10.4.5 or later will support LUNs of 2TB and larger).

When you introduce a LUN that's larger than 2TB to an Xsan volume, Xsan Admin reduces the size, or "Sector count," of the LUN to 2TB worth of sectors. Xsan Admin accomplishes this reduction during the naming, or "labeling," of LUNs in Xsan Admin > Setup > LUNs. Instead of using Xsan Admin to label these larger LUNs, you can use the instructions in this article to manually configure the LUNs via the Terminal&emdash;this is the preferred method in Xsan 1.2 and earlier, because it allows you to specify a custom sector count size, 4294965247, which is a slightly smaller amount of sectors than the Xsan Admin application configures. The slightly smaller sector count is recommended for LUNS which will be added to new Xsan volumes or for LUNs that are to be added to pre-existing volumes. Labeling LUNs in this manner avoids certain scenarios that result in instability.

WARNING: These steps can only be performed on LUNs which are not already part of an Xsan volume. Performing these steps on LUNs that are currently included in an Xsan volume will cause all data to be lost on the Xsan Volume. Additionally, these steps will erase any data currently stored on the LUN. Therefore, you must back up all data on the LUN before proceeding.

Preparing the LUN(s)

In the Terminal application, issue the following command to Identify the LUN(s) that you wish to configure:

$ sudo cvlabel -l

Example results:

/dev/rdisk3 [APPLE Xserve RAID 1.26] unknown Sectors: 4724464025. SectorSize: 512. /dev/rdisk5 [APPLE Xserve RAID 1.26] acfs "Big_RAID5-2" Sectors: 4724464025. SectorSize: 512. Maximum sectors: 4724464025.

This output indicates that there are two available LUNs, /dev/rdisk3 and /dev/rdisk5. Note by the sector count of 4724464025 that both LUNs are larger than 2TB (this is more than 2TB's worth of sectors). /dev/rdisk3 is designated as "unknown" and therefore has not been configured for use with Xsan, while /dev/rdisk5 has been configured for use with Xsan and labeled "Big_RAID5-2." To reconfigure a LUN which is already configured for use with Xsan, issue the following command in the Terminal:

$ sudo cvlabel -u <DeviceName>

Where <DeviceName> is the name of the volume to be unlabeled. For example, to unlabel /dev/rdisk5 in our example, you would issue this command:

$ sudo cvlabel -u Big_RAID5-2

Before we proceed with configuring the LUNs with new labels, we’ll verify that both LUNs have been unlabeled:

$ sudo cvlabel -l

Example results:

/dev/rdisk3 [APPLE   Xserve RAID     1.26] unknown  Sectors: 4724464025. 
SectorSize: 512. /dev/rdisk5 [APPLE   Xserve RAID     1.26] unknown  Sectors:
4724464025. SectorSize: 512. 

Both LUNs have been unlabeled, as they both are designated as "unknown."

Creating a label file

Issue the following command in the Terminal to create a temporary file containing the configuration information for the LUN:

$ cat > /tmp/lun-label-info

This command creates a temporary file in the /tmp directory which you will edit by entering text in this format:

<LUNname> /dev/<rdiskNumber> 4294965247

For example, you might type:

HugeLUN1 /dev/rdisk3 4294965247
HugeLUN2 /dev/rdisk5 4294965247

When you finish typing in the data, press Control-D on the keyboard.

Labeling the LUN(s)

Issue the following command in the Terminal to configure the LUN:

$ sudo cvlabel /tmp/lun-label-info

Example output:

*WARNING* This program will over-write volume labels on the
devices specified in the file "/tmp/lun-label-info". After execution, the
devices will only be usable by the Xsan. You will have to re-partition the
devices to use them on a different file system.Do you want to proceed? (Y / N)
-> y
/dev/rdisk3 [APPLE Xserve RAID 1.26] unknown Controller '5000393000001723', Serial '5000393000001723L1', Sector Size 512, Sectors Max 4724464025 (2.2TB)
Do you want to label it acfs-VTOC - Name: HugeLUN1 Sectors: 980416512 (Y / N)
-> y
New Volume Label -Device: /dev/rdisk3  acfs Label: HugeLUN1  Sectors: 4294965247.

/dev/rdisk5 [APPLE Xserve RAID 1.26] unknown Controller '5000393000001724', Serial '5000393000001723L0', Sector Size 512, Sectors Max 4724464025 (2.2TB)
Do you want to label it acfs-VTOC - Name: HugeLUN2 Sectors: 980416512 (Y / N)
-> y
New Volume Label -Device: /dev/rdisk5  acfs Label: HugeLUN2  Sectors:
4294965247.Done.  2 source lines.  2 labels.

Published Date: Oct 11, 2016