# Problem with AFS mount on Ubuntu 22

**URL:** <https://linux-community.web.cern.ch/t/problem-with-afs-mount-on-ubuntu-22/198>\
**Category:** UBUNTU\
**Created:** [March 28, 2023, 8:13am UTC](https://linux-community.web.cern.ch/t/problem-with-afs-mount-on-ubuntu-22/198 "2023-03-28T08:13:25Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![elwaagaa](https://linux-community.web.cern.ch/letter_avatar_proxy/v4/letter/e/bcef8e/32.png) [@elwaagaa](https://linux-community.web.cern.ch/u/elwaagaa)\
**Post date:** [March 28, 2023, 8:13am UTC](https://linux-community.web.cern.ch/t/problem-with-afs-mount-on-ubuntu-22/198/1 "2023-03-28T08:13:25Z")

</div>

Previously I could simply run `aklog` and mount AFS to my local workstation, but since a few weeks ago it says that my connection times out when I try to connect to my AFS directory. I run `kinit` successfully, and I can connect to CERNbox wothout problem.

When I do `systemctl restart openafs-client.service` it keeps on loading, but never connects.

Anyone has any experience with mounting AFS on Ubuntu 22?

---

<div class="post-metadata">

**Author:** ![dalvesde](https://linux-community.web.cern.ch/user_avatar/linux-community.web.cern.ch/dalvesde/32/55_2.png) [@dalvesde](https://linux-community.web.cern.ch/u/dalvesde)\
**Post date:** [March 28, 2023, 8:22am UTC](https://linux-community.web.cern.ch/t/problem-with-afs-mount-on-ubuntu-22/198/2 "2023-03-28T08:22:34Z")

</div>

Hi @elwaagaa ,  
Have you checked [OTG0074822](https://cern.service-now.com/service-portal?id=outage&n=OTG0074822)?  
Cheers

---

<div class="post-metadata">

**Author:** ![elwaagaa](https://linux-community.web.cern.ch/letter_avatar_proxy/v4/letter/e/bcef8e/32.png) [@elwaagaa](https://linux-community.web.cern.ch/u/elwaagaa)\
**Post date:** [March 28, 2023, 8:31am UTC](https://linux-community.web.cern.ch/t/problem-with-afs-mount-on-ubuntu-22/198/3 "2023-03-28T08:31:09Z")

</div>

Hello!  
Yes I checked some weeks ago and it gave me `afsdb{1,2}.cern.ch` as output. Now it gives me nothing as output, does it mean that I already have lost connection to the CERN AFS cell? How can I restore it?  
Thanks!

---

<div class="post-metadata">

**Author:** ![dalvesde](https://linux-community.web.cern.ch/user_avatar/linux-community.web.cern.ch/dalvesde/32/55_2.png) [@dalvesde](https://linux-community.web.cern.ch/u/dalvesde)\
**Post date:** [March 28, 2023, 8:47am UTC](https://linux-community.web.cern.ch/t/problem-with-afs-mount-on-ubuntu-22/198/4 "2023-03-28T08:47:41Z")

</div>

I suppose you are taking the client from some repo that is not managed at CERN, so please check if there’s an update (the latest version in the upstream project includes some of the new DBs).  
You can always try to edit the CellServDB files like is described in the OTG to remove the IPs of the old DBs.

---

<div class="post-metadata">

**Author:** ![elwaagaa](https://linux-community.web.cern.ch/letter_avatar_proxy/v4/letter/e/bcef8e/32.png) [@elwaagaa](https://linux-community.web.cern.ch/u/elwaagaa)\
**Post date:** [March 28, 2023, 8:49am UTC](https://linux-community.web.cern.ch/t/problem-with-afs-mount-on-ubuntu-22/198/5 "2023-03-28T08:49:42Z")

</div>

Is there another way I can set this up? What would be the commands I have to run?  
Thanks!

---

<div class="post-metadata">

**Author:** ![dalvesde](https://linux-community.web.cern.ch/user_avatar/linux-community.web.cern.ch/dalvesde/32/55_2.png) [@dalvesde](https://linux-community.web.cern.ch/u/dalvesde)\
**Post date:** [March 28, 2023, 10:28am UTC](https://linux-community.web.cern.ch/t/problem-with-afs-mount-on-ubuntu-22/198/6 "2023-03-28T10:28:07Z")

</div>

The only way is to have a correct CellServDB, either by updating to a newer and hopefully correct _-ish_ version, or to edit it yourself as described in the OTG.

---

<div class="post-metadata">

**Author:** ![elwaagaa](https://linux-community.web.cern.ch/letter_avatar_proxy/v4/letter/e/bcef8e/32.png) [@elwaagaa](https://linux-community.web.cern.ch/u/elwaagaa)\
**Post date:** [March 28, 2023, 11:59am UTC](https://linux-community.web.cern.ch/t/problem-with-afs-mount-on-ubuntu-22/198/7 "2023-03-28T11:59:14Z")

</div>

Thanks for the answer - I still feel quite unsure of what to do, would you be able to help me with these steps?

---

<div class="post-metadata">

**Author:** ![dalvesde](https://linux-community.web.cern.ch/user_avatar/linux-community.web.cern.ch/dalvesde/32/55_2.png) [@dalvesde](https://linux-community.web.cern.ch/u/dalvesde)\
**Post date:** [March 30, 2023, 7:00am UTC](https://linux-community.web.cern.ch/t/problem-with-afs-mount-on-ubuntu-22/198/8 "2023-03-30T07:00:40Z")

</div>

Just use vim/vi/nano to open the files mentioned there (you probably only have `/usr/vice/etc/CellServDB`, but also confirm with `/etc/openafs/CellServDB`, `/usr/vice/etc/CellServDB.local` and `/usr/vice/etc/CellServDB.dist`).  
Then, bellow “`>cern.ch`” there are some IPs: remove them, until you reach the next " `>ams.cern.ch`".  
Reboot the machine and it should start working again.

---

<div class="post-metadata">

**Author:** ![elwaagaa](https://linux-community.web.cern.ch/letter_avatar_proxy/v4/letter/e/bcef8e/32.png) [@elwaagaa](https://linux-community.web.cern.ch/u/elwaagaa)\
**Post date:** [March 30, 2023, 2:26pm UTC](https://linux-community.web.cern.ch/t/problem-with-afs-mount-on-ubuntu-22/198/9 "2023-03-30T14:26:35Z")

</div>

Thank you, now it worked to connect to AFS! What does the CellServDB do exactly?

---

<div class="post-metadata">

**Author:** ![dalvesde](https://linux-community.web.cern.ch/user_avatar/linux-community.web.cern.ch/dalvesde/32/55_2.png) [@dalvesde](https://linux-community.web.cern.ch/u/dalvesde)\
**Post date:** [March 31, 2023, 9:43am UTC](https://linux-community.web.cern.ch/t/problem-with-afs-mount-on-ubuntu-22/198/10 "2023-03-31T09:43:10Z")

</div>

Basically the client needs to know how to contact the servers that hold the information (in AFS these are called DBs), especially since AFS provides a global access to different cells (cern.ch is a cell). So there’s a file that has all the IPs of those DBs.  
But, at some point it also became possible to use DNS resolution, so by removing the IPs your client will ask us (cern.ch) for that information instead of using a hardcoded list (potentially outdated, like it is the case).
