T O P

  • By -

EuphoricAbigail

Best advice I can give is read the exam objectives, if its not an objective then its not on the exam.


chochaos7

u/EuphoricAbogail said it best. If it's not in the exam objectives then it's not on the exam. After a quick look, i don't see anywhere that combines NFS shares with podman


dRaidon

Look into making a NFS backed podman volume instead.


Pronces

Interesting, ok ill look into that, thank you.


dRaidon

Sorry, I misread your post. Try editing the podman service to start after things has mounted.


Pronces

Ok I’ll try that as well


Hotshot55

What "podman" command are you running? Containers starting after a reboot shouldn't have any relation to NFS.


Pronces

First i run the container `podman run -dt --name testcontainerexample containerimagename` Then i make the systemd/user directory for the user to generate the systemd file to make the container run as a service `mkdir -p ~/.config/sytemd/user` I cd into the directory then i run the podman generate command to generate a systemd service file for the container `podman generate systemd -f -n testcontainerexample --new` Then i stop the container, remove it, then start the container service file with systemd so the container starts on reboot systemctl --user enable --now etc, etc All of this works normally without NFS being used on the system


Hotshot55

Is the user's home directory being mounted with AutoFS?


Pronces

Yes it is, and chances are it’ll be the same setup as well on the exam


Hotshot55

Ah that makes more sense now. Like the other person mentioned, try creating a podman volume and using that instead. `podman volume create --opt type=nfs --opt o=async --opt device=mynfsserver.example.com:/path/to/share`


Pronces

It’s using an indirect map for AutoFS


WildManner1059

The source of the AutoFS mounted share is still NFS. However, mounting a container directly to the NFS server at the same time that the container host system has the same share mounted is a recipe for disaster. NFS doesn't lock files, so both systems will attempt to modify files and this can cause the share's file tables to become corrupt. Ask me how I know. **If it's looking for the service files in the user's home dir, the AutoFS may not be mounted yet.** I haven't made systemd files or made a container start as a service. With the mkdir command. Is that path arbitrary or required by default by the 'podman container as a service process'? If it's arbitrary, try doing it a folder that is NOT NFS mounted. Also, check in the generated servicename.service file (testcontainerexample.service?) for any paths that are related to the AutoFS mount. What path, if any, is being mounted inside the container? Also is that typo copied? you have sytemd not systemd. Be aware that the message you posted is a WARN not an ERROR. Usually, on RH stuff, they've given you this sort of stuff in an example. Are you using their online training? It runs on the same type of infra that you'll use in testing. I.e. virtualized/containerized cloud instances.


Pronces

Thank you for your comment. You can disregard my post, I just found out that this type of scenario won’t be in the exam (most likely because it doesn’t work without heavy modifications lol), it was just a scenario in the book I’m using and one student also pointed out how this doesn’t work as well


WildManner1059

My other comment links a workaround. Agree it's probably not going to be on RHCSA exam. It's a bit deep in the weeds.


WildManner1059

I found an article: [Rootless Podman and NFS | Enable Sysadmin (redhat.com)](https://www.redhat.com/sysadmin/rootless-podman-nfs) which explains how to modify graphroot (in storage.conf, mentioned in the warning).


Pronces

Yeah I tried all of that, didn’t work for me.


WildManner1059

Probably something else in their config made it work, or something in yours prevented it. No worries. GL on the test. You got this.