Site icon GetPageSpeed

Why to use NFS storage with podman on Rocky Linux 8 ?

Operating System and Software

  • Rocky Linux 8
  • podman-1.9.3-2.module+el8.2.1+6867+366c07d6.x86_64

Problem

  • Why to use NFS storage with podman on Rocky Linux 8 ?
  • podman fails with the following error
    podman volume create --driver=nfs
     Error: error running volume create option: not yet implemented

How to Fix

Create the NFS volume using the following syntax

podman volume create --opt type=nfs --opt o=rw --opt device=<nfs-server-ip>:/<nfs-share>  nfsvol 

Note: Replace nfs-server-ip and nfs-share appropriately.

Diagnostic Steps

1. NFS Client

[root@rhel8u2-12 ~]# podman volume create --opt type=nfs --opt o=rw --opt device=192.168.10.1:/nfs foo foo                                                                                                                                      
[root@rhel8u2-12 ~]# podman run -v foo:/foo -i -t registry.access.redhat.com/rhel7 touch /foo/text

2. NFS Server

[root@rhel8u2-14 ~]# ls -lah  /nfs/text
-rw-r--r--. 1 nobody nobody 0 Dec  3 01:27 /nfs/text
Exit mobile version