Skip to content

Add mxmount #58

Merged
merged 38 commits into from
Nov 23, 2018
Merged

Add mxmount #58

merged 38 commits into from
Nov 23, 2018

Conversation

donald
Copy link
Collaborator

@donald donald commented Nov 19, 2018

Import mxmount
Add feature to use hostconfig groups instead of NIS netgroups

mariux and others added 30 commits November 11, 2011 13:56
this is a workaround for a stupid perl bug... *HUST*
e.g.

acedia  C4014 defaults,inode64 @confidential(sync,rw,no_root_squash,no_subtree_check,insecure_locks)
when /amd/hostname/0 is already a destination from another partition skipp adding !data0.

this happened when booting from mxonastick.
to allow detectable /dev/mdx's to be mounted.
This assembles but does not start degraded arrays.
mxmount: add --no-degraded to mdadm --assemble
Run mxmount after mxraid assembly phase.
assembly is now done via mxtools/mxraid, before mxmount
is called.
Rationale:

SW-RAIDs are assembled by serials,
Serials are kept in a database,
thus they need a uniqe label.

Since this applies also for level-0 scratch raids, and a clash with
decent SW-RAIDs (M-prefix) is unwanted, they get the D-prefix.
Introduce D label prefix for scratch raids
We want to do some changes to mxmounts:

* support multiple hostlists (@amd,@confidential)
* get independent of netgroups
* experiment with kerberos based authentication

So we need to do several changes and tests on mxmounts. With mxtools
the update cycle ist (mxtools:make change, PR, merge, distmaster: install) while
with a seperate mxmounts repository it is (mxmounts:make change, PR, merge,
make release, bee-files: update bee script, PR, merge, distmaster: update).
This is just much more work. We don't need "mxmount" release packages, because
nobody but us is ever going to use it.

If this is merged, mxmount-0.11-0.bee should be removed from the
bee-files repository.

Merge remote-tracking branch 'mxmount/master' into subtree mxmount.
Import mxmount into mxtools install.sh script and remove the imported
and now ununsed mxmount/Makefile.
DEFAULT_MOUNT_FS,FULLHOST,NONE,NULL are never used. Remove unused
variables.

Note, that SHORTHOST is currently used by /etc/mxmounts.
When /etc/mxmounts uses the netgroup syntax to export to a list of
clients (usually @amd), expand the list using hostconfig to a list of
hosts from inside this mxmount, so that we no longer export to NIS
netgroups. This is one step to get rid of NIS.

Only hosts with the tag newexport should do it for now, so that we can
see if there are problems before switching all hosts.

We could expand

    /filesystem @group(opts)

to

    /filesystem host1(opts) hosts2(opts) host3(opts) host4(opts)...

but because our opts are about 50 characters and we have about 540 hosts
on @amd, we save about 27000 characters per line by converting to

    /filesystem -opts host1 host2 host3...

Notes:

* `hostconfig --list` does not only accept single tag (=group) names,
but complex boolean expressions as well. We could export to @1 (=allways
true, any known host) or @testing&!desktop. It is suggested, not to use
this as a feature.
The perl qx operator (`cmd`) calls a shell when cmd contains shell
metacharacters. If our netgroup (accidentally) contains a shell meta
character, unexpected things might happen. Replace by safer code.
We might transfer /usr/bin/perl to a /pkg package in the future as we
did with python. mxmount needs to be able to run before the automounter
is available. Update perl path to /usr/local/system/perl/bin/perl, which
is always available.
Calling mxmount with --reexport-only will not try to mount filesystems,
but just rewrite /etc/exports and call exportfs -ra.

This is supposed to be done by clusterd, when the export groups in
/etc/hostconfig were changed.
`clusterd --reexport` triggers all clusterd daemons to run `mxmount
--reexport-only`. This should be done, when the export groups in
hostconfig were updated.
@donald
Copy link
Collaborator Author

donald commented Nov 22, 2018

Opinions?

@wwwutz
Copy link
Contributor

wwwutz commented Nov 22, 2018

LGTM. systemd-service has to be enabled manually after install ?

@donald
Copy link
Collaborator Author

donald commented Nov 22, 2018

Yes, if mxmount.service was installed for the first time, systemctl enable mxmount.service would have to be executed to create the symlink in /etc/systemd/system/local-fs.target.wants.

@donald donald merged commit 1c8e076 into master Nov 23, 2018
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants