Issue
I want to build a local YUM repository on (my) NFS so it does not take up space of the host and others can access it. When I try to create a repository in the NFS directories I got the follow error.
[root@d62539456920 /]# createrepo /data/docker-ce-stable/ -g comps.xml
Could not create exclusive lock in /data/docker-ce-stable/repodata and sqlite database generation enabled. Is this path on nfs? Is your lockd running?
Has any one worked out a way where you can have createrepo
use the directories without placing the SQLite DB in the NFS?
Solution
You can build using a temporary folder and then sync/copy the sqlite folder (repodata) back into place on your nfs share. eg:
createrepo path_to_repo_folder -o /tmp
rsync -a --delete /tmp/repodata/ path_to_repo_folder/repodata/
You might want to sync both ways if you have a large repo and are using --update
Answered By - PsymonR