crfs:mkpatch:/etc/locks: Do not specify an existing file issue in aix?
Investigation:
=========
The issue "crfs:mkpatch:/etc/locks: Do not specify an existing file" is occured while we trying to create a filesystem on the AIX server.
Check the /etc/locks file on the server
tstaix01# ls -l /etc/locks
lrwxrwxrwx 1 root system 12 13 2008 /etc/hosts -> /var/locks
The /etc/locks file is symbolic linked with /var/locks directory, check the /var/locks directory on the server, if the /var/locks directory is not present, then we need to create it manually.
tstaix01# cd /var
tstaix01# ls -ld locks
ls: 0653-341 The directory locks does not exist
tstaix01#
Solution:
======
Please create a "locks" directory as it was not present on the /var filesystem, the server will allow you to create a filesystem once you create a locks directory under /var
tstaix01# cd /var
tstaix01# mkdir locks
tstaix01# cd locks
tstaix01# mkdir fs
tstaix01#
Now create a filesystem
tstaix01# crfs -v jfs2 -d oraclevol -m /opt/oraclefs
Filesystem created successfully
6144000 kilobytes total disk space
New file system size is 11496770
tstaix01#
Now try to mount it
tstaix01# mount /opt/oraclefs
tstaix01#
tstaix01# df -gt /opt/oraclefs
Filesystem GB blocks Used Free %Used mounted on
/dev/oraclevol 6.00 0.00 6.00 1% /opt/oraclefs
tstaix01#