Open System Services Management and Operations Guide (G06.25+, H06.03+)

Managing Filesets
Open System Services Management and Operations Guide—527191-002
5-35
Moving a Directory Hierarchy to Its Own Fileset
The following example shows how to move the /home directory from the ROOT fileset
to a newly-defined HOME fileset. To move the /home directory, you need to be logged
in as the super ID.
1. Using the OSS shell command mv, change the name of the /home directory to a
file or directory name that does not already exist in the ROOT directory, for
example, /homex. This action removes the /home directory from the ROOT
fileset’s namespace so another fileset named /home can be created:
mv /home /homex
2. Create a new directory named /home, using the shell command mkdir:
mkdir /home
3. Record the existing security permissions for the /homex directory.
4. Change the security permissions for /home to 777 (all read, write, and execute).
When the new fileset is mounted on this directory, you can reset the permissions to
those used for /homex.
chmod 777 /home
5. Create a fileset named HOME, using a unique OSS name server, that has a
DEVICELABEL of 000001. The use of multiple OSS name server processes can
improve overall performance if the default name server, $ZPNS, is very busy.
a. Start SCF.
b. Add a new OSS name server for the new fileset:
ADD SERVER $ZPMON.#ZPN1, CPU 1, BACKUPCPU 0
c. Add the new fileset:
ADD FILESET $ZPMON.HOME, DEVICELABEL 000001, &
CATALOG $OSS, BUFFERED LOG, POOL POOL, &
NAMESERVER #ZPN1, MNTPOINT /home
d. Start the new fileset:
START FILESET $ZPMON.HOME
6. Copy all files and directories from the old /home directory into the new fileset using
the OSS shell cp command:
cp -pR /homex/* /home
The -p flag preserves the original permissions and ownership of the files. If you do
not specify this flag, the copied files are owned by the super ID.
Note. If you have the SUID or SGID bits set for any file in this fileset, the cp operation
does not preserve those settings and you must set those bits again manually.