Jump to content

Sun 7000series storage (7110) NFS user problem


Recommended Posts

Posted
Any update on this Duke?

 

I am having a similar problem with our webservers that have a shared nfs based webroot folder.

 

Its chown'd by root to user apache, runs when I do "service httpd start" as root (runs as root), but if I restart and it runs as user 'apache' on system startup I get access denied.

 

Will try to get you a reply as soon as possible mate. :)

Posted (edited)

Just picking up this thread and read it a few times, I personally don't see ACL's as the answer.

 

ACL's are good but I think its overkill in this situation.

 

I would create a NFS share for mysql-data

Permissions, nobody, other, 777 (rwx-rwx-rwx)

Change the block size to suite your database, try 8k. (database record size)

 

Secure the NFS connection to host IP of your CentOS MySQL server with exception for host machine (centos) and allow root access.

 

Mount share from centos /export/mysql-data

mount :/export/mysql-data /nfs-mysql

 

As root create a directory for the mysql user

$ mkdir /nfs-mysql/data

Change ownership of directory to mysql user

$ chown /nfs-mysql/data

Change permission to protect your database from other local users

$ chmod 700 /nfs-mysql/data

 

Then this should work fine for your mysql database in /nfs-mysql/data.

 

The S7000 doesn't really care about user names for NFS it just records the uuid's. Mapping to a real user is for the NFS client to sort out.

 

Andy

Edited by apaton
Posted
Just picking up this thread and read it a few times, I personally don't see ACL's as the answer.

 

ACL's are good but I think its overkill in this situation.

 

I would create a NFS share for mysql-data

Permissions, nobody, other, 777 (rwx-rwx-rwx)

Change the block size to suite your database, try 8k. (database record size)

 

Secure the NFS connection to host IP of your CentOS MySQL server with exception for host machine (centos) and allow root access.

 

Mount share from centos /export/mysql-data

mount :/export/mysql-data /nfs-mysql

 

As root create a directory for the mysql user

$ mkdir /nfs-mysql/data

Change ownership of directory to mysql user

$ chown /nfs-mysql/data

Change permission to protect your database from other local users

$ chmod 700 /nfs-mysql/data

 

Then this should work fine for your mysql database in /nfs-mysql/data.

 

The S7000 doesn't really care about user names for NFS it just records the uuid's. Mapping to a real user is for the NFS client to sort out.

 

Andy

 

I had another go with this and I think I am pretty much there now - Thanks!

 

As you say the 7110 doesn't really care much for knowing the username, aslong as the user and group are set correctly (which actually does automatically when you chown the nfs mount point).

 

So my setup is as follows (it might help someone else)

* Share setup initially as nobody,other (but then gets changed to 27 (the uid of the mysql user on the client)) wx-rx-rx

*Create an NFS exception that allows read/write root access to the VM hostname.

*Add the mount point to the autofs file and mount the share to /mnt/MySQL_Data

*As root chown the MySQL_Data folder to mysql:mysql (this will change the uid on the 7110)

*as root start the mysqld service.

 

Thats pretty much it!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...