Create a Linux LVM volume group cluster resource, then create subdirectories on it that Samba will use. This section describes how to use NSSMU to create and cluster enable an LVM volume group. NSSMU automatically uses the Generic File System template (Generic_FS_Template) to create a volume group cluster resource. You can add lines to it from the Samba template to create the Samba cluster resource.
The examples in this section use following setup. Make sure to replace the sample values with information for your configuration.
Variable |
Sample Value |
---|---|
Device name for the shared device |
/dev/sdd |
Volume group name |
sambavol44 NSSMU sets the volume group name to be the same as the logical volume. If you use the NLVM create linux volume command to create the LVM volume group cluster resource, you can specify a different name for the volume group, such as sambavg44. |
Volume name |
sambavol44 |
Linux POSIX file system |
ext3 |
Volume size |
100 GB |
Resource IP address |
10.10.10.44 |
Mount device |
/dev/sambavol44/sambavol44 The mount device path format is /dev/<volume_group_name>/<logical_volume_name> If you specified a different name for the volume group, such as sambavg44, the mount device path is /dev/sambavg44/sambavol44. |
Mount point |
/mnt/smbvol44 The subdirectory name you use for the mount point can be the same or different than the volume name. This example uses a different name. |
On the master node of the cluster, create and cluster enable an LVM volume group cluster resource by using NSSMU. The disk will contain one LVM volume group and one logical volume. For information, see Configuring an LVM Volume Group Cluster Resource with NSS Management Tools
in the OES 11 SP3: Novell Cluster Services for Linux Administration Guide.
While the shared LVM volume is mounted, you must create some subdirectories on it that Samba will use. At this point, the resource you created should still be on the master node.
Log in as the root user on the master node, then open a terminal console.
Verify that the cluster resource is online by entering
cluster status
If it is not online, bring it online now by entering
cluster online <resource> <master_node>
Create the subdirectory paths log and share/locks at the root of the mounted volume (/mnt/smbvol44) by entering the following commands:
mkdir -p /mnt/smbvol44/log mkdir -p /mnt/smbvol44/share/locks
The subdirectories are created on the mounted volume (not at the file system root (/) directory). These paths reside on the shared volume, and are available on a node only when the shared volume is mounted at the /mnt/smbvol44 mount point.
Verify that the new subdirectories exist and are owned by the root user, and the default group is root. Also, the directories must have the Linux POSIX permissions of drwx r_x r_x.
For example, list the directories and view the Linux POSIX permissions, file owner, and group owner.
Continue with Section 6.3, Modifying the Pool Resource Scripts for Samba.
After the shared storage is properly configured, you must modify the LVM volume group cluster resource in Novell Cluster Services. This includes adding lines for Samba in the load, unload, and monitor scripts.
In Novell iManager, log in as an administrator user.
In Roles and Tasks, select Clusters > Cluster Manager, then browse to select the Cluster object for the cluster.
Click the name link of the LVM volume group cluster resource to go to its Properties page, then click the Scripts tab.
View the load script.
The default generic file system load script for the sample setup contains all the information that you entered when you created the resource in NSSMU.
Add the following definitions and Samba start lines to the load script.
The configuration file name is the name you will give the Samba configuration file on the shared location. The two Start Samba lines should follow the line that mounts the volume.
The lines are commented out at this time. You uncomment them later when the Samba configuration file is ready.
# define the name of the samba config file
#CONFIG_FILE=SambaResource-smb.conf
# start Samba #exit_on_error /usr/sbin/nmbd --log-basename=$MOUNT_POINT/log --configfile=$MOUNT_POINT/$CONFIG_FILE #exit_on_error /usr/sbin/smbd --log-basename=$MOUNT_POINT/log --configfile=$MOUNT_POINT/$CONFIG_FILE
Click Apply.
Continue with Modifying the Generic File System Resource Unload Script.
Continue from Modifying the Generic File System Resource Load Script.
On the Scripts tab for the generic file system cluster resource, click the Unload link to view the unload script.
View the unload script.
The default generic file system unload script for the sample setup contains all the information that you entered when you created the resource in NSSMU.
Add the following definitions and Samba stop lines to the unload script.
The configuration file name is the name you give the Samba configuration file on the shared location. The two Stop Samba lines should precede the line that unmounts the NSS volume.
The lines are commented out at this time. You uncomment them later when the Samba configuration file is ready.
# define the name of the samba config file
#CONFIG_FILE=SambaResource-smb.conf
# request Samba stop
# ignore_error killproc -p $MOUNT_POINT/share/locks/nmbd-$CONFIG_FILE.pid /usr/sbin/nmbd
# ignore_error killproc -p $MOUNT_POINT/share/locks/smbd-$CONFIG_FILE.pid /usr/sbin/smbd
Click Apply.
Continue with Modifying the Generic File System Resource Monitor Script.
Continue from Modifying the Generic File System Resource Unload Script.
On the Scripts tab for the generic file system cluster resource, click the Monitor link to view the monitor script.
View the monitor script.
The default generic file system monitor script for the sample setup contains all the information that you entered when you created the resource in NSSMU.
Add the following definitions and Samba check status lines to the monitor script.
The configuration file name is the name you give the Samba configuration file on the shared location. The two check status Samba lines can follow the check of the NSS volume.
The lines are commented out at this time. You uncomment them later when the Samba configuration file is ready.
# define the name of the samba config file
#CONFIG_FILE=SambaResource-smb.conf
# check Samba
#exit_on_error checkproc -p $MOUNT_POINT/share/locks/smbd-$CONFIG_FILE.pid /usr/sbin/smbd
#exit_on_error checkproc -p $MOUNT_POINT/share/locks/nmbd-$CONFIG_FILE.pid /usr/sbin/nmbd
Click Apply.
At the bottom of the page, click OK to save all changes for the pool cluster resource.
IMPORTANT:The changes are not effective until the resource is taken offline and brought online again.
Continue with Section 5.6, Samba Configuration.