[OpenAFS] changing fileserver's ip address

Michael Meffie mmeffie@sinenomine.net
Thu, 30 Apr 2015 18:43:24 -0400


On Thu, 30 Apr 2015 22:02:45 +0200
GALAMBOS Daniel <dancsa@dancsa.hu> wrote:

> Hi,
>=20
> I need to change some of our afs servers' IP (hostname won't change).=20
> The servers are fileservers only, DB servers remains on the same IP.

As Jeffrey said, a restart of the file server is the best way. =20

Btw, The hostnames are not stored within the VLDB, just the IPv4 addresses.

> The problem is  vos listaddr does not lists all fileservers in our cell.

This is because vos listaddrs only list the modern, multi-homed address
records, and optionally, the fileserver UUID associated with each fileserve=
r.

> (It is possible that those machines were cloned from one template
> machine by previous admin)
>=20
> afs1:/tmp# vos listaddr -lo -nore
> A.B.151.17
> A.B.151.25
> A.B.1.162
> A.B.151.37
>=20
> (vldb.DB0 freshly copied to  /tmp/)
> afs1:/tmp# vldb_check -d vldb.DB0 -se -ver
> Read each entry in the database
> Found 10990 entries, 26391 free entries, 1 multihomed blocks
> Found 10989 RW volumes, 10976 BK volumes, 15 RO volumes
> Check Multihomed blocks
> MH block 0, index 1: A.B.151.17
> MH block 0, index 2: A.B.151.25
> MH block 0, index 3: A.B.1.162
> MH block 0, index 4: A.B.151.37
> 1 multihomed blocks
> Check server addresses
>    Server ip addr 0 =3D MH block 0, index 1
>    Server ip addr 1 =3D MH block 0, index 2
>    Server ip addr 2 =3D MH block 0, index 3
>    Server ip addr 3 =3D MH block 0, index 4
>    Server ip addr 4 =3D A.B.151.40
>    Server ip addr 5 =3D A.B.151.33
>    Server ip addr 6 =3D A.B.151.34
> 3 simple entries, 4 multihomed entries, Total =3D 7

The last three addresses here are held in the old style, single-homed record
format, and is probably left over from a previous use of the vos changeaddr
command without the -remove flag.  Those cannot be listed wit vos listaddrs,
but can be removed with vos changeaddr -remove.

> The A.B.1.162 server has been terminated, I can remove it with**vos
> changeaddr --remove.=20

Yes.

> What should I do with the other IPs that isn't
> listed by listaddr?

Yes, they can be removed with vos changeaddr -remove, unless there are volu=
me
entries in the vldb which still reference those server entries.  The vos
changeaddr -remove will refuse to remove the address when volumes entries s=
till
reference the server entry. You can also double check by running vldb_check
-entries; that will show the server number (not address) for each volume en=
try.

> Also if i shut down the services on ** A.B.151.40 which is fileserver
> only machine. Put in an other network with other IP, and restart the afs
> services, It automatically modifies the vldb so every volume become
> accessible, or it is needed to resync the vol headers/vldb?

Under normal conditions it would be automatic. When the fileserver is
restarted, it would register with the new IP address(es) but with the same =
UUID.
The "server number" would not change, but the addresses associated with that
server would be automatically updated within the the vldb.

In this case, however 151.40 has the old-style server record, and does not
have a UUID stored in the vldb. You may need to run vos syncvldb then
vos syncserv after restarting that fileserver with the new IP address.

>=20
> (afs servers are debian wheezy-backports 1.6.9-1~bpo70+1)
>=20
> Any advice is appreciated.
>=20
> Galambos D=E1niel/Dancsa

Best of luck,
Mike


--=20
Michael Meffie <mmeffie@sinenomine.net>