As Good A Place As Any
Tim Thomas's Blog
Building a SAM File System on a Sun Fire X4500 using a ZFS Volume
The volume management layer of SAM can only stripe data for performance, not availability. When working with the Sun Fire X4500 you need to use a volume manager to create a logical volume or volumes on which to build a SAM file system if you want the file system to survive the failure of a disk.
By far the easiest way to do this in my experience is to create a ZFS storage pool and carve a ZFS Volume (ZVOL) out of it. You can then build the SAM file system on the ZVOL. You could use multiple ZVOLs and have SAM stripe across them, but I prefer to have a single volume and have ZFS take care of the striping rather than have two volume managers fighting with each other.
Here is an example of how to set this up.
1. Create a ZFS storage pool
I will call it samfspool0. I have provided a few recipes for creating ZFS storage pools on the Sun Fire X4500 in the past, the one I default to is this one.
2. Allocate a ZFS Volume from the Storage Pool
You can use the ZFS GUI to do this, but I will show you how to do it on the command line. I want to create a 7 TB volume called samfs0zvol with a block size of 16KB. The block size does not have to be 16KB, that is just what I am using in this example.
root# zfs create -V 7.0TB -b 16KB samfspool0/samfs0zvol
The volume appears as a ZFS file system without a mount point when you list it:
root# zfs list samfspool0/samfs0zvol
NAME USED AVAIL REFER MOUNTPOINT
samfspool0/samfs0zvol 57.0M 7.13T 57.0M -
3. Add an entry in the /etc/opt/SUNWsamfs/mcf file
Note the path to the ZVOL is under /dev/zvol/dsk/<poolname>
#
# Equipment Eq Eq Family Device Additional
# Identifier Ord Type Set State Parameters
# ----------- --- ---- ------ ------ ----------
#
samfs0 1 ms samfs0 on
/dev/zvol/dsk/samfspool0/samfs0zvol 2 md samfs0 on
4 . Reconfigure SAM
Force SAM to read in the configuration file and then make the file system with a DAU of 16KB to align with the blocksize of the ZVOL.
root# samd config
root# sammkfs -a 16K samfs0
sammkfs:
samfs0: One or more partitions exceeds 1 TB in size
sammkfs:
file system samfs0 will not mount on 32 bit Solaris and
sammkfs:
some earlier versions of Solaris
Building
'samfs0' will destroy the contents of devices:
/dev/zvol/dsk/samfspool0/samfs0zvol
Do
you wish to continue? [y/N]y
You are done. Note that File System Manager, supplied with SAM, does not currently allow you to create a SAM file system on a ZVOL.
For an overview of SAM, and File System Manager, look here.
Posted at 01:48PM Nov 13, 2007 in Storage |