The block special file /dev/sfdsk/Class_Name/dsk/Volume_Name of the volume is created when a volume is created and re-created every time the node is rebooted.
The volume's block special file access permission is set as follows.
Owner: root
Group: root
Mode: 0600
To change the access permission, configure the following setting.
For RHEL6
Create a startup script that contains the commands to be changed, and set this script to be executed later than all of the GDS startup scripts /etc/*.d/*sfdsk*.
See
For details about GDS startup scripts, see "F.2 Startup Script Lists."
For RHEL7 or later
Create a startup script that declares the mounting processes, and create a unit file that executes the startup script. Set the script to be executed later than all of the GDS services (fjsvsdx*.service).
See
For details about GDS services, see "G.2 systemd Service Lists."
Descriptions in the Startup Script for Access Permission Setting
An example of script description for RHEL is shown below.
#!/bin/bash # chkconfig: 2345 54 61 ... (1) # description: chgperm - change GDS volume permission ... (2) . /etc/init.d/functions start() { /bin/chown gdsusr:gdsgrp /dev/sfdsk/Class1/dsk/Volume1 ... (3) /bin/chmod 0644 /dev/sfdsk/Class1/dsk/Volume1 ... (3) return } stop() { return } case "$1" in start) start ;; stop) stop ;; restart) stop start ;; *) echo "Usage: /etc/init.d/chgperm {start|stop|restart}" ... (4) ;; esac exit 0 |
At GDS installation, a sample of this startup script is installed to /etc/opt/FJSVsdx/etc/chgperm.sample. Copy and customize this sample before using it.
Explanation of the Descriptions:
This is the entry required for RHEL6.
To the right of "# chkconfig:," describe the run level of this startup script, the start priority, and the stop priority.
This script must be executed after the GDS startup script. Therefore, for the start priority, 54 or a greater value must be set.
Do not describe this entry for RHEL7 or later.
To the right of "description:," give a description of this startup script.
Describe commands executed at node startup.
The commands shown in this example set the owner to gdsusr, the group to gdsgrp, and the mode to 0644 with respect to the block special file of Volume1 in Class1.
Describe the process to show the usage of this startup script.
The startup script name in this example is chgperm.
See
For details on (1) and (2), see chkconfig(8).
For details on the commands to set the file access permission, see chown(1) and chmod(1).
Descriptions of the unit file (RHEL7 or later)
See the example below.
[Unit] Description=change GDS volume permission ...(1) After=fjsvsdxmon.service ...(2) [Service] ExecStart=/bin/bash -c '/home/bin/chgperm start' ...(3) Type=oneshot [Install] WantedBy=multi-user.target |
Explanation of the Descriptions:
To the right of Description=, describe the description of this unit file.
Describe the script to be started later then the GDS service "fjsvsdxmon.service."
Describe the start script that changes the access permission (/home/bin/chgperm in this example).
How to Set the Startup Script for Access Permission Setting
(a) For RHEL6
Take the following steps to set the startup script.
Locate the startup script to the path /etc/rc.d/init.d/Script Name.
Execute the following command to register the startup script.
# chkconfig --add Script Name |
Information
When the command shown in 2. is executed, the following symbolic link files are generated.
/etc/rc.d/rcRun Level.d/SStart Priority Script Name
/etc/rc.d/rcRun Level.d/KStop Priority Script Name
See
For details on the startup script, see chkconfig(8).
(b) For RHEL7 or later
Configure the following setting.
Locate the unit file in the path /usr/lib/systemd/system/unit_file_name.
Execute the following command to enable the service.
# /usr/bin/systemctl enable unit_file_name |
Information
By executing the command in the above procedure 2, the following symbolic link file is created.
/etc/systemd/system/multi-user.target.wants/unit_file_name