[OpenAFS-devel] Re: 'replication'
Thomas Mueller
thomas.mueller@hrz.tu-chemnitz.de
Thu, 21 Nov 2002 13:16:29 +0100 (MET)
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.
--1837520328-1227857941-1037880989=:28306
Content-Type: TEXT/PLAIN; charset=ISO-8859-1
Content-Transfer-Encoding: QUOTED-PRINTABLE
On Thu, 29 Aug 2002, Hartmut Reuter wrote:
> Rubino Gei=DF wrote:
> > Hi,
> >=20
> > this is exactly what we want. Doing something like "vos dump | vos
> > restore" cost far too much time, I guess. My concern is to get our
> > systems productive in case a major failure make one of the main servers
> > unusable. dump / restore is usable in case one volume get accidentally
> > killed / deleted, but not for restoring >> 100 GB and hundreds of
> > volumes...
> >=20
> > Hartmut, can you publish the changes you made to MR-AFS so we can
> > integrate it into OpenAFS? Or does someone did this??? I'm sure a lot o=
f
> > people would like to get this working.
> >=20
> >=20
> > Bye, ruby
> >=20
>=20
> Ok, here are the changes stripped from MR-AFS specific code. I admit=20
> that this was quick and durty programming, but who ever want's may=20
> improve it.
>=20
> ...
I've integrated the MR-AFS code from Hartmut into OpenAFS 1.2.7.
The patch provides a new subcommand to vos:
vos convertROtoRW -server <machine name> -partition <partition name> -id <v=
olume name or ID> [-force] [-cell <cell name>] [-noauth]=20
[-localauth] [-verbose] [-encrypt] [-help]
This allows to recover very fast from the loss of a partition
from RO-copies if all RO-Copies exist on another partition.
Then these RO-volumes can be made to the new RW-volumes.
Backup of RW-volumes then consists in "vos release".
Please note: this works only on namei fileservers.
Enjoy it and thanks to Hartmut,
Thomas.
--=20
-------------------------------------------------
Thomas M=FCller, TU Chemnitz, URZ, D-09107 Chemnitz
-------------------------------------------------
--1837520328-1227857941-1037880989=:28306
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="vos_convert.patch"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.44.0211211316290.28306@childerich.hrz.tu-chemnitz.de>
Content-Description: Patch: vos convert
Content-Disposition: attachment; filename="vos_convert.patch"
ZGlmZiAtTmF1cncgMS4yLjcub3JpZy9zcmMvdm9sL25hbWVpX29wcy5jIDEu
Mi43L3NyYy92b2wvbmFtZWlfb3BzLmMNCi0tLSAxLjIuNy5vcmlnL3NyYy92
b2wvbmFtZWlfb3BzLmMJV2VkIEF1ZyAyOCAwNTo1NzozNyAyMDAyDQorKysg
MS4yLjcvc3JjL3ZvbC9uYW1laV9vcHMuYwlUaHUgTm92IDIxIDEzOjEzOjA2
IDIwMDINCkBAIC00Miw2ICs0Miw3IEBADQogI2luY2x1ZGUgInZpY2Vpbm9k
ZS5oIg0KICNpbmNsdWRlICJ2b2xkZWZzLmgiDQogI2luY2x1ZGUgInBhcnRp
dGlvbi5oIg0KKyNpbmNsdWRlIDxhZnMvZXJyb3JzLmg+DQogDQogZXh0ZXJu
IGNoYXIgKnZvbHV0aWxfUGFydGl0aW9uTmFtZV9yKGludCB2b2xpZCwgY2hh
ciAqYnVmLCBpbnQgYnVmbGVuKTsNCiANCkBAIC0xMzYxLDcgKzEzNjIsMjEz
IEBADQogICAgIH0NCiAgICAgcmV0dXJuIDA7DQogfQ0KKy8qDQorICogQ29u
dmVydCB0aGUgVm9sdW1lSW5mbyBmaWxlIGZyb20gUk8gdG8gUlcNCisgKiB0
aGlzIHJvdXRpbmUgaXMgY2FsbGVkIGJ5IG5hbWVpX2NvbnZlcnRST3RvUld2
b2x1bWUoKQ0KKyAqLw0KKw0KK3N0YXRpYyBhZnNfaW50MzIgY29udmVydFZv
bHVtZUluZm8oZmRyLCBmZHcsIHZpZCkNCisgICAgaW50IGZkcjsNCisgICAg
aW50IGZkdzsNCisgICAgYWZzX3VpbnQzMiB2aWQ7DQorew0KKyAgICBzdHJ1
Y3QgVm9sdW1lRGlza0RhdGEgdmQ7DQorICAgIGNoYXIgKnA7DQorDQorICAg
IGlmIChyZWFkKGZkciwgJnZkLCBzaXplb2Yoc3RydWN0IFZvbHVtZ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A0KKyAgICAgICAgICAgIGRpcl9uYW1l
KTsNCisgICAgICAgIHJldHVybiBFSU87DQorICAgIH0NCisNCisgICAgd2hp
bGUgKGRwID0gcmVhZGRpcihkaXJwKSkgew0KKyAgICAgICAgLyogc3RydWN0
IFZpY2VJbm9kZUluZm8gaW5mbzsgKi8NCisNCisgICAgICAgIGlmICgqZHAt
PmRfbmFtZSA9PSAnLicpIGNvbnRpbnVlOw0KKyAgICAgICAgaWYgKERlY29k
ZUlub2RlKGRpcl9uYW1lLCBkcC0+ZF9uYW1lLCAmaW5mbywgaC0+aWhfdmlk
KTwwKSB7DQorICAgICAgICAgICAgTG9nKCIxIG5hbWVpX0NvbnZlcnRST3Rv
Uld2b2x1bWU6IERlY29kZUlub2RlIGZhaWxlZCBmb3IgJXMvJXNcbiIsDQor
ICAgICAgICAgICAgICAgIGRpcl9uYW1lLCBkcC0+ZF9uYW1lKTsNCisgICAg
ICAgICAgICBjbG9zZWRpcihkaXJwKTsNCisgICAgICAgICAgICByZXR1cm4g
LTE7DQorICAgICAgICB9DQorICAgICAgICBpZiAoaW5mby51LnBhcmFtWzFd
ICE9IC0xKSB7DQorICAgICAgICAgICAgTG9nKCIxIG5hbWVpX0NvbnZlcnRS
T3RvUld2b2x1bWU6IGZvdW5kIG90aGVyIHRoYW4gdm9sdW1lIHNwZWNpYWwg
ZmlsZSAlcy8lc1xuIiwNCisgICAgICAgICAgICAgICAgZGlyX25hbWUsIGRw
LT5kX25hbWUpOw0KKyAgICAgICAgICAgIGNsb3NlZGlyKGRpcnApOw0KKyAg
ICAgICAgICAgIHJldHVybiAtMTsNCisgICAgICAgIH0NCisgICAgICAgIGlm
IChpbmZvLnUucGFyYW1bMF0gIT0gdmlkKSB7DQorICAgICAgICAgICAgaWYg
KGluZm8udS5wYXJhbVswXSA9PSBoLT5paF92aWQpIHsNCisgICAgICAgICAg
ICAgICAgaWYgKGluZm8udS5wYXJhbVsyXSA9PSBWSV9MSU5LVEFCTEUpIHsg
ICAvKiBsaW5rIHRhYmxlICovDQorICAgICAgICAgICAgICAgICAgICBsaW5r
U2VlbiA9IDE7DQorICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsNCisg
ICAgICAgICAgICAgICAgfQ0KKyAgICAgICAgICAgIH0NCisgICAgICAgICAg
ICBMb2coIjEgbmFtZWlfQ29udmVydFJPdG9SV3ZvbHVtZTogZm91bmQgc3Bl
Y2lhbCBmaWxlICVzLyVzIGZvciB2b2x1bWUgJWx1XG4iLA0KKyAgICAgICAg
ICAgICAgICBkaXJfbmFtZSwgZHAtPmRfbmFtZSwgaW5mby51LnBhcmFtWzBd
KTsNCisgICAgICAgICAgICBjbG9zZWRpcihkaXJwKTsNCisgICAgICAgICAg
ICByZXR1cm4gVlZPTEVYSVNUUzsNCisgICAgICAgIH0NCisgICAgICAgIGlm
IChpbmZvLnUucGFyYW1bMl0gPT0gVklfVk9MSU5GTykgeyAgIC8qIHZvbHVt
ZSBpbmZvIGZpbGUgKi8NCisgICAgICAgICAgICBzdHJjcHkoaW5mb05hbWUs
IGRwLT5kX25hbWUpOw0KKyAgICAgICAgICAgIGluZm9TZWVuID0gMTsNCisg
ICAgICAgIH0NCisgICAgICAgIGVsc2UgaWYgKGluZm8udS5wYXJhbVsyXSA9
PSBWSV9TTUFMTElOREVYKSB7ICAgLyogc21hbGwgdm5vZGVzIGZpbGUgKi8N
CisgICAgICAgICAgICBzdHJjcHkoc21hbGxOYW1lLCBkcC0+ZF9uYW1lKTsN
CisgICAgICAgICAgICBzbWFsbFNlZW4gPSAxOw0KKyAgICAgICAgfQ0KKyAg
ICAgICAgZWxzZSBpZiAoaW5mby51LnBhcmFtWzJdID09IFZJX0xBUkdFSU5E
RVgpIHsgICAvKiBsYXJnZSB2bm9kZXMgZmlsZSAqLw0KKyAgICAgICAgICAg
IHN0cmNweShsYXJnZU5hbWUsIGRwLT5kX25hbWUpOw0KKyAgICAgICAgICAg
IGxhcmdlU2VlbiA9IDE7DQorICAgICAgICB9DQorICAgICAgIC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5nIGNhbGwhXG4iLA0K
KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VydmVyLCBjb2Rl
KTsNCisgICAgICAgICAgICAgICAgcmV0dXJuIEVOT0VOVDsNCisgICAgICAg
ICAgICB9DQorICAgICAgICAgICAgaWYgKHNhbWUpIHsNCisgICAgICAgICAg
ICAgICAgcm9pbmRleCA9IGk7DQorICAgICAgICAgICAgICAgIHJvc2VydmVy
ID0gZW50cnkuc2VydmVyTnVtYmVyW2ldOw0KKyAgICAgICAgICAgICAgICBy
b3BhcnRpdGlvbiA9IGVudHJ5LnNlcnZlclBhcnRpdGlvbltpXTsNCisgICAg
ICAgICAgICAgICAgYnJlYWs7DQorICAgICAgICAgICAgfQ0KKyAgICAgICAg
fQ0KKyAgICB9DQorICAgIGlmICghcm9zZXJ2ZXIpIHsNCisgICAgICAgIGZw
cmludGYoU1RERVJSLCAiV2FybmluZzogUk8gdm9sdW1lIGRpZG4ndCBleGlz
dCBpbiB2bGRiIVxuIik7DQorICAgIH0NCisgICAgaWYgKHJvcGFydGl0aW9u
ICE9IHBhcnRpdGlvbikgew0KKyAgICAgICAgZnByaW50ZihTVERFUlIsICJX
YXJuaW5nOiBSTyB2b2x1bWUgc2hvdWxkIGJlIGluIHBhcnRpdGlvbiAlZCBp
bnN0ZWFkIG9mICVkICh2bGRiKVxuIiwgcm9wYXJ0aXRpb24sIHBhcnRpdGlv
bik7DQorICAgIH0NCisNCisgICAgaWYgKHJ3c2VydmVyKSB7DQorICAgICAg
ICBmcHJpbnRmKFNUREVSUiwNCisgICAgICAgICAgICAgICAgIlZMREIgaW5k
aWNhdGVzIHRoYXQgYSBSVyB2b2x1bWUgZXhpc3RzIGFscmVhZHkgb24gJXMg
aW4gcGFydGl0aW9uICVzLlxuIiwgaG9zdHV0aWxfR2V0TmFtZUJ5SU5ldChy
d3NlcnZlciksIHZvbHV0aWxfUGFydGl0aW9uTmFtZShyd3BhcnRpdGlvbikp
Ow0KKyAgICAgICAgaWYgKCFmb3JjZSkgew0KKyAgICAgICAgICAgIGZwcmlu
dGYoU1RERVJSLCAiT3ZlcndyaXRlIHRoaXMgVkxEQiBlbnRyeT8gW3l8bl0g
KG4pXG4iKTsNCisgICAgICAgICAgICBkYyA9IGMgPSBnZXRjaGFyKCk7DQor
ICAgICAgICAgICAgd2hpbGUgKCEoZGM9PUVPRiB8fCBkYz09J1xuJykpIGRj
PWdldGNoYXIoKTsgLyogZ290byBlbmQgb2YgbGluZSAqLw0KKyAgICAgICAg
ICAgIGlmICgoYyAhPSAneScpICYmIChjICE9ICdZJykpIHsNCisgICAgICAg
ICAgICAgICBmcHJpbnRmKFNUREVSUiwgImFib3J0ZWQuXG4iKTsNCisgICAg
ICAgICAgICAgICByZXR1cm4gLTE7DQorICAgICAgICAgICAgfQ0KKyAgICAg
ICAgfQ0KKyAgICB9DQorDQorICAgIHZjb2RlID0gdWJpa19DYWxsKFZMX1Nl
dExvY2ssIGNzdHJ1Y3QsIDAsIGVudHJ5LnZvbHVtZUlkW1JXVk9MXSwgUldW
T0wsDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICBWTE9QX01PVkUpOw0KKyAgICBhY29ubiA9IFVW
X0JpbmQoc2VydmVyLCBBRlNDT05GX1ZPTFVNRVBPUlQpOw0KKyAgICBjb2Rl
ID0gQUZTVm9sQ29udmVydFJPdG9SV3ZvbHVtZShhY29ubiwgcGFydGl0aW9u
LCB2b2xpZCk7DQorICAgIGlmIChjb2RlKSB7DQorICAgICAgICBmcHJpbnRm
KFNUREVSUiwiQ29udmVydGluZyBSTyB2b2x1bWUgJXUgdG8gUlcgdm9sdW1l
IGZhaWxlZCB3aXRoIGNvZGUgJWRcbiIsIHZvbGlkLCBjb2RlKTsNCisgICAg
ICAgIFByaW50RXJyb3IoImNvbnZlcnRST3RvUlcgIiwgY29kZSk7DQorICAg
ICAgICByZXR1cm4gLTE7DQorICAgIH0NCisgICAgZW50cnkuc2Vyd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