[OpenAFS] mount points and replication problems

Cédric CACHAT lsf@noos.fr
Tue, 12 Jul 2005 13:17:05 +0200


This is a multi-part message in MIME format.
--------------070801060304000604030102
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

Hello,

this is the first time I write and I am pretty new to AFS. I have a 
question regarding mount points in AFS.
Here is what I'm trying to achieve:
I want all my users to have their home directory in AFS, the plan is to 
set an AFS tree looking like:
/afs/cell/usr/homes/<user1>
I created the following volumes on my primary server:
root.afs
root.cell
common.usr
common.homes
user.user1
and then I mounted them using the fs command :
*# fs mkm /afs/cell/usr common.usr* and so on... (I didnt use *# fs mkm 
/afs/_._cell/usr common.usr *maybe my problem comes from here?)
So far everything is under control.

Since I have many sites, I have set up one AFS server on each site. 
Because all users don't work on the same site I decided to create user.* 
volumes on their closest server, so I created volume user.user1 on the 
primary server and user.user2 on the secondary server.
Without any replication it works perfectly if BOTH servers are running. 
If one is down, say the master, then acces to a user's home-dir is 
impossible.
Thats's were it's getting complicated for me: I then set up replication 
to the second site so that I have:

primary server 	secondary server
root.afs (RW) 	root.afs (RO)
root.cell (RW) 	root.cell (RO)
common.usr (RW) 	common.usr (RO)
common.homes (RW) 	common.homes (RO)
user.user1 (RW) 	user.user1 (RO)
user.user2 (RO)
	user.user2 (RW)


Looking at the array above, if the primary server is down, user1 should 
be able to access is home dir but Read Only whereas user2 should be able 
to read/write to his home directory. That's exactly what I want.
The problem is user2 can only read and not write (il I try ls 
/afs/.cell, it hangs then says timeout). Is it normal or did I miss a thing?
Second question, I don't know what to set their homedirectory to (read 
from LDAP at login), do I have to use /afs/_cell_/usr/homes/user1 or 
/afs/_.cell_/usr/homes/user1.
If I use the former, when both servers are running they can't write to 
their directory, they have to cd to /afs/.cell/usr/homes/user1 in order 
to write which is not practical; if I use the latter, it works all right 
when both servers are running but when the primary is down, it fails to 
acces the home directory (server timeout, the branch /afs/.cell is down).
Did someone ever try to set up such a network, or is it impossible? 
Could you tell me then how should I mount my tree?
I think my problems come from the .cell and cell, I don't quite 
understand the impact it has on the rest of the tree.

Thanks for your help

Cédric






--------------070801060304000604030102
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hello, <br>
<br>
this is the first time I write and I am pretty new to AFS. I have a
question regarding mount points in AFS. <br>
Here is what I'm trying to achieve:<br>
I want all my users to have their home directory in AFS, the plan is to
set an AFS tree looking like:<br>
/afs/cell/usr/homes/&lt;user1&gt;<br>
I created the following volumes on my primary server:<br>
root.afs<br>
root.cell<br>
common.usr<br>
common.homes<br>
user.user1<br>
and then I mounted them using the fs command :<br>
<b># fs mkm /afs/cell/usr common.usr</b> and so on... (I didnt use <b>#
fs mkm /afs/<u>.</u>cell/usr common.usr </b>maybe my problem comes
from here?)<br>
So far everything is under control.<br>
<br>
Since I have many sites, I have set up one AFS server on each site.
Because all users don't work on the same site I decided to create
user.* volumes on their closest server, so I created volume user.user1
on the primary server and user.user2 on the secondary server.<br>
Without any replication it works perfectly if BOTH servers are running.
If one is down, say the master, then acces to a user's home-dir is
impossible. <br>
Thats's were it's getting complicated for me: I then set up replication
to the second site so that I have:<br>
<br>
<table border="1" cellpadding="2" cellspacing="2" height="172"
 width="579">
  <tbody>
    <tr>
      <td align="center" valign="top">primary server</td>
      <td align="center" valign="top">secondary server<br>
      </td>
    </tr>
    <tr>
      <td valign="top">root.afs (RW)</td>
      <td valign="top">root.afs (RO)</td>
    </tr>
    <tr>
      <td valign="top">root.cell (RW)</td>
      <td valign="top">root.cell (RO)</td>
    </tr>
    <tr>
      <td valign="top">common.usr (RW)</td>
      <td valign="top">common.usr (RO)</td>
    </tr>
    <tr>
      <td valign="top">common.homes (RW)</td>
      <td valign="top">common.homes (RO)</td>
    </tr>
    <tr>
      <td valign="top">user.user1 (RW)</td>
      <td valign="top">user.user1 (RO)</td>
    </tr>
    <tr>
      <td valign="top">user.user2 (RO)<br>
      </td>
      <td valign="top">user.user2 (RW)</td>
    </tr>
  </tbody>
</table>
<br>
Looking at the array above, if the primary server is down, user1 should
be able to access is home dir but Read Only whereas user2 should be
able to read/write to his home directory. That's exactly what I want.<br>
The problem is user2 can only read and not write (il I try ls
/afs/.cell, it hangs then says timeout). Is it normal or did I miss a
thing?<br>
Second question, I don't know what to set their homedirectory to (read
from LDAP at login), do I have to use /afs/<u>cell</u>/usr/homes/user1
or /afs/<u>.cell</u>/usr/homes/user1. <br>
If I use the former, when both servers are running they can't write to
their directory, they have to cd to /afs/.cell/usr/homes/user1 in order
to write which is not practical; if I use the latter, it works all
right when both servers are running but when the primary is down, it
fails to acces the home directory (server timeout, the branch
/afs/.cell is down). <br>
Did someone ever try to set up such a network, or is it impossible?
Could you tell me then how should I mount my tree?<br>
I think my problems come from the .cell and cell, I don't quite
understand the impact it has on the rest of the tree.<br>
<br>
Thanks for your help<br>
<br>
C&eacute;dric<br>
<br>
<br>
<br>
<br>
<br>
</body>
</html>

--------------070801060304000604030102--