On Sat, 12 Sep 2020 at 15:57, Bob Goodwin <bobgood...@fastmail.us> wrote:

>
>
> On 2020-09-12 11:59, George N. White III wrote:
> > On Sat, 12 Sep 2020 at 11:56, Bob Goodwin <bobgood...@fastmail.us
> > <mailto:bobgood...@fastmail.us>> wrote:
> >
> >     <y NFS is storing data in "/" instead of "home", what do i have
> >     wrong?
> >     'df -h" shows the following:
> >
> >       /dev/mapper/fedora_localhost--live-root   69G   67G     0 100% /
> >     tmpfs                                    1.8G  8.0K  1.8G 1% /tmp
> >     /dev/sda2                                976M  254M  655M 28% /boot
> >     /dev/mapper/fedora_localhost--live-home  3.6T  4.8G  3.4T 1% /home
> >
> >
> >     I need to fix it. I don't know where to look for my mistake,
> >     Obviously I
> >     want to store files in the 3.4 TB partition not root.
> >
> >
> >
> > I assume the above is for your NFS server.   "showmount -e" should
> > show you what directory is exported call it "<some_path>/nfs_share".
> .
> Yes, via ssh:  [bobg@WS1 ~]$ ssh -X bobg@192.168.50.32
>
> [bobg@nfs ~]$ showmount -e
> Export list for nfs:
> /nfs4exports/home 192.168.50.0/24
> >
> > Assuming you want to move the exported directory to "/home/nfs_share",
> .
> /I am the onlly client and my fstab is:
> 192.168.50.32:/nfs4exports/home  /media/nfs    nfs4
> rw,soft,intr,fg,comment=systemd.automout  0 0
>
> /
> > there should be an entry for "<some_path>/nfs_share" in "/etc/exports
> This is what I find in /etc/exports (I odn't remeber how it was created.)
> [bobg@nfs ~]$ cat /etc/exports
> /nfs4exports/home
> 192.168.50.0/24(rw,sync,insecure,no_root_squash,no_subtree_check)
>
> At this point I m lost, I expected the stored files to go to "home" not
> "/".
>

Assuming "/nfs4exports" and " /nfs4exports/home" are regular directories,
files stored via the NFS mount will go to the "home" directory under
"/nfs4exports",
that is, the take space from the root partition.   Did you mean to export
"/home"?
If so, and assuming your user account has the same uid and gid on both
systems,
it should not be hard to tweak the configuration:


> Bob -
>
> > ".
> > If you want to avoid changing the client mount commands, you can use a
> > symbolic link:
> >
> > 0.  Ask your clients to stop using the share
>

Since you are the only client,  step 0. becomes  (on the client):
   0.0) make sure no process is using the NFS mounted filesystem
   0.1) "sudo umount /media/nfs"

Back on the server:, step 1 doesn't change

> > 1.   sudo exportfs -u "<some_path>/nfs_share"
> > This disables the share so you can move it
>

Step 2 might need editing:

> > 2.   sudo mv "<some_path>/nfs_share" /home
> > this should free some space in the root partition
>

"<some_path>" turns out to be empty.  The above
will give you "/home/nfs_share/home".  Do you want the shared directory to
be
"/home/nfs_share" or "/home/bobg/nfs_share" or even "/home/bobg"?

Step 3 depends on what you want in step 2.

> > 3.   sudo ln -s "/home/nfs_share" "<some_path>"
> > this should avoid the need for any NFS configuration
> > changes
>

Since you are the only user affected by the change, you
should probably export the directory you choose in step 2
directly so the configuration is unambiguous (symbolic
links are an example of the principle that most problems
can be solved with another level if indirection). You will need
to edit the fstab on the client and "/etc/exports" on the server
to replace "/nfs_share" with "/home/<your_choice>".

>
> > 4. sudo exportsfs "<some_path>/nfs_share"
>

becomes (note the typo exportsfs->exportfs):

4.   sudo exportfs "/home/<your_choice>"


> > This may be an oversimplification, e.g. if you have separate shares
> > for each user.   If this isn't what you need, show us the output of
> > "showmount -e" and the contents of "/etc/exports".
>



-- 
George N. White III
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org

Reply via email to