我要评分
获取效率
正确性
完整性
易理解

"Errno 13" Displayed During Swift Service Running

Symptom

During the Switch installation verification, the following message is displayed when the openstack-swift-object-replicator.service and openstack-swift-object-updater.service services are running: "ERROR:Unable to access /srv/node/sdb:[Errno 13] Permission denied: '/srv/node/sdb'."

Key Process and Cause Analysis

The object storage drives cannot be accessed. If other settings are correct, this error is generally caused by incorrect port or directory permissions.

Conclusion and Solution

  1. Log in to the storage node and run the restorecon command to ensure that the correct SELinux security context is defined for all files in the /srv directory.
    sudo chown -R swift:swift /srv/node/
    sudo restorecon -R /srv
  2. Restart the Swift service.
    sudo service openstack-swift-account start
    sudo service openstack-swift-container start
    sudo service openstack-swift-object start
    sudo chkconfig openstack-swift-account on
    sudo chkconfig openstack-swift-container on
    sudo chkconfig openstack-swift-object on
  3. Restart the firewall and then stop the firewall.
    systemctl restart firewalld.service
    systemctl stop firewalld.service
  4. Check the Swift service again.
    systemctl status openstack-swift-object.service openstack-swift-object-auditor.service openstack-swift-object-replicator.service openstack-swift-object-updater.service

    All services are running properly if information similar to the following is displayed.