Re: NFS setup -
On Wed, Apr 18, 2018 at 8:03 PM, Gordon Messmer wrote: > On 04/18/2018 08:43 AM, Bob Goodwin wrote: >> >> # mount 192.168.1.86:/home/exports/home /mnt/test >> mount.nfs: access denied by server while mounting >> 192.168.1.86:/home/exports/home >> >> What am I missing and/or doing wrong? > > If you are using NFSv4, remember that the first export is the *root*. > That is, clients refer to filesystems relative to that export. If your > /etc/exports looks like this: > > /home/export 192.168.1.0/255.255.255.0(ro) > /home/export/home 192.168.1.0/255.255.255.0(rw) > > ...then clients would mount "server:/home" not "server:/home/export/home". If you don't set "fsid=0" for one of your shares, "/" is the root fsid. ## EXPORT "/SRV/NFS" WITHOUT "FSID=0" AND MOUNT "/SRV/NFS" ## root@nfs ~ # cat /etc/exports /srv/nfs *(rw,no_root_squash) root@nfs ~ # exportfs /srv/nfs root@nfs ~ # mount localhost:/srv/nfs /mnt root@nfs ~ # cat /proc/fs/nfs/exports # Version 1.1 # Path Client(Flags) # IPs /srv/nfs *(rw,no_root_squash,sync,wdelay,no_subtree_check,...) /srv *(ro,no_root_squash,sync,no_wdelay,no_subtree_check,v4root,...) / *(ro,no_root_squash,sync,no_wdelay,no_subtree_check,v4root,fsid=0,...) ## EXPORT "/SRV/NFS" WITHOUT "FSID=0" AND MOUNT "/" ## root@nfs ~ # umount /mnt root@nfs ~ # mount localhost:/ /mnt root@nfs ~ # cat /proc/fs/nfs/exports # Version 1.1 # Path Client(Flags) # IPs /srv/nfs *(rw,no_root_squash,sync,wdelay,no_subtree_check,...) /srv *(ro,no_root_squash,sync,no_wdelay,no_subtree_check,v4root,...) / *(ro,no_root_squash,sync,no_wdelay,no_subtree_check,v4root,fsid=0,...) ## EXPORT "/SRV/NFS" WITH "FSID=0" AND MOUNT "/" ## root@sophia ~ # umount /mnt root@sophia ~ # vi /etc/exports root@sophia ~ # cat /etc/exports /srv/nfs *(rw,no_root_squash,fsid=0) root@sophia ~ # exportfs -ra root@sophia ~ # mount localhost:/srv/nfs /mnt mount.nfs: Cannot assign requested address root@sophia ~ # mount localhost:/ /mnt root@sophia ~ # cat /proc/fs/nfs/exports # Version 1.1 # Path Client(Flags) # IPs /srv/nfs *(rw,no_root_squash,sync,wdelay,no_subtree_check,fsid=0,...) ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@lists.fedoraproject.org
Re: NFS setup -
On 04/18/18 20:03, Gordon Messmer wrote: If you are using NFSv4, remember that the first export is the *root*. That is, clients refer to filesystems relative to that export. If your /etc/exports looks like this: I assume that it is NFSv4 but I don't see where that is indicated, it is recently installed ... Rick Stevens suggested: "I would add a line such as: /home 192.168.1.0/24(rw,no_root_squash)" and I was able to get it connected and working with: /home 192.168.1.0/24(rw,no_root_squash) # cat /etc/exports /home 192.168.1.0/24(rw,no_root_squash) #/exports/home 192.168.1.0/24(rw,sync,insecure,no_root_squash,no_subtree_check,fsid=0) # /exports 192.168.1.0/255.255.255.0(ro,sync) # /exports/home/public/192.168.1.0/255.255.255.0(rw,sync) # /exports 192.168.54.0/255.255.255.0(ro,sync) And the client connects with: # mount 192.168.1.86:/home/exports /mnt/testb That allows me to save data by shuffling between the files I want and putting them into /mnt/testb using the Thunar file manager, quite convenient for what I need to do. So I am making progress ... Thanks to all who responded, Bob /home/export 192.168.1.0/255.255.255.0(ro) /home/export/home 192.168.1.0/255.255.255.0(rw) ...then clients would mount "server:/home" not "server:/home/export/home". -- Bob Goodwin - Zuni, Virginia, USA http://www.qrz.com/db/W2BOD box10 FEDORA-27/64bit LINUX XFCE Fastmail POP3 ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@lists.fedoraproject.org
Re: NFS setup -
On 04/18/2018 08:43 AM, Bob Goodwin wrote: bobg]# mount 192.168.1.86:/home/exports/home /mnt/test mount.nfs: access denied by server while mounting 192.168.1.86:/home/exports/home What am I missing and/or doing wrong? If you are using NFSv4, remember that the first export is the *root*. That is, clients refer to filesystems relative to that export. If your /etc/exports looks like this: /home/export 192.168.1.0/255.255.255.0(ro) /home/export/home 192.168.1.0/255.255.255.0(rw) ...then clients would mount "server:/home" not "server:/home/export/home". ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@lists.fedoraproject.org
Re: NFS setup -
On 04/18/2018 02:15 PM, Rick Stevens wrote: > On 04/18/2018 12:42 PM, Bob Goodwin wrote: >> On 04/18/18 15:01, Rick Stevens wrote: >>> By default, Fedora uses the LVM (logical volume manager) system to >>> partition the disks. It actually creates regular partitions as a raw >>> volumes (PVs or "physical volumes"). It then typically creates a VG >>> (volume group) that has that PVs in it. From there, it carves out >>> LVs (logical volumes). On my laptop, for example, I have these (among >>> others) from the "df -h" command: >> >> + >> >> >> --- Logical volume --- >> LV Path /dev/fedora00/home >> LV Name home >> VG Name fedora00 >> LV UUID 2Ffglt-Twti-jf1R-lmMX-mqb1-vfF7-dhAusR >> LV Write Access read/write >> >> So for me the question remains, how to get /etc/exports into >> /dev/fedora00/home? >> >> It looks to me like the only way I can get /etc/exports the full TB's >> is to create a new installation and assign most of the space, ~2.7 TB to >> "/" and I would have tried that if the live installer wasn't such a >> hassle to make work unless I go with LVM instead of Standard Partitions. >> >> Perhaps what I should do is try to move most of that space from "/home/ >> to root with gparted? >> >> The box86 NFS works fine otherwise, I just can't get enough space with >> only 49G in root and 2.7T in home ... I should have also said that you could do something like: # mkdir -p /home/nfsshares/whateverdir # cp -a /home/whateverdir /home/nfsshares/whateverdir OR # mkdir -p /home/nfsshares # mv /home/whateverdir /home/nfsshares Then export /home/nfsshares/whateverdir by: 1. Edit /etc/exports and insert a line: /home/nfsshares/whateverdir 192.168.1.0/24(rw,no_root_squash) 2. Re-export the modified /etc/exports via: # exportfs -ra 3. Mount the export on a client: # mount server:/home/nfsshares/whateverdir /local-mountpoint Note that by doing this, you're exporting a subdirectory of /home and thus have the entire 2.7TB available to the NFS client. Make sense? > No, /etc/exports tells the NFS server which directories to export via > NFS. If you want to export /dev/fedora00/home, first find out where it's > mounted on your NFS server. You can do that by running "df -h" as root > on your NFS server. Example (again from my laptop): > > [root@golem4 ~]# df -h > Filesystem Size Used Avail Use% Mounted on > ... > /dev/mapper/vg_golem4-lv_home 252G 49G 191G 21% /home > > So /dev/mapper/vg_golem4-lv_home is mounted on /home. So, if I were > going to make my laptop an NFS server, I would add a line such as: > > /home 192.168.1.0/24(rw,no_root_squash) > > in my laptop's /etc/exports file. IMPORTANT: You export where the > filesystem is _mounted_--NOT the raw device (in this case, you export > "/home" and NOT "/dev/mapper/vg_golem4-lv_home"). > > Once that's done, I'd have to tell the NFS server daemon on my laptop > that I had made changes to the /etc/exports file by running the command: > > [root@golem4 ~]# exportfs -ar > > The NFS server daemon on my laptop would then refresh its list of what > it's supposed to export. To verify it, you could run a > > showmount -e localhost > > on the server to see what it thinks it's exporting, or > > showmount -e > > on one of the NFS clients to show what the server is exporting. Note > that the showmount command only shows the export name and not what > the raw device is on the NFS server. In fact, the NFS server daemon on > the server (which is what's responding to the showmount queries) doesn't > even know what device holds the directory being exported. It only > understands directories. > > Then you'd mount the export on the client. Using the above stuff, an NFS > client that wanted to use my exported "/home" directory and mount it at > "/nfs/home" would do something like: > > [root@nfs-client]# mkdir -p /nfs/home > [root@nfs-client]# mount -t nfs :/home /nfs/home > > where "" is either the hostname of the NFS server or its > IP address. The first command creates the mountpoint on the client if it > doesn't already exist, the second mounts the filesystem via NFS. If you > wanted to put that in your /etc/fstab ON THE CLIENT so it'd mount at > boot, you'd add a line such as: > > :/home /nfs/home nfs defaults0 0 > > Again, where "" is either the hostname of the NFS server > or its IP address. Note that with that line in your /etc/fstab on the > client, you could mount the filesystem via a simple > > [root@nfs-client]# mount /nfs/home > > and the mount command would look for a line in /etc/fstab that matched > the filesystem specified, see that it's an NFS mount (via the "nfs" > filesystem type part of the entry or the fact that the device string > contained a ":/" sequence of characters which are unique to NFS volu
Re: NFS setup -
On 19/4/18 3:45 am, Rick Stevens wrote: On 04/18/2018 08:43 AM, Bob Goodwin wrote: On 04/17/18 06:47, Tim via users wrote: The /etc/fstab file points to where devices get mounted onto the directory tree. If you have mounts like /dev/wrong-device pointing to /my-preferred-storage-space Simply change the device to the one you actually want. -- . Server end: # df -h /home/exports/home Filesystem Size Used Avail Use% Mounted on /dev/mapper/fedora-home 2.7T 4.8G 2.5T 1% /home So that's where I want to put ,y nfs data. I have a directory /home/exports/home/ where I put an empty file "xxxtest." # ll /home/exports/home/ total 0 -rw-r--r--. 1 root root 0 Apr 18 11:05 xxxtest Did: # exportfs -r Then: # showmount -e box86 clnt_create: RPC: Unknown host Uhm, that looks like "box86" either isn't in DNS or /etc/hosts so it can't be resolved. If this is on the server, try "showmount -e" or "showmount -e localhost". Client end: No access from the client - bobg]# mount 192.168.1.86:/home/exports/home /mnt/test mount.nfs: access denied by server while mounting 192.168.1.86:/home/exports/home What am I missing and/or doing wrong? We don't know what your server's /etc/exports line that exports the directory looks like, so there's no way to tell. The line should be something like: /home/exports/home 192.168.1.0/24(rw,no_root_squash) From a subsequent mail in this thread it seems to me that Bob has the following in /etc/exports (using Rick's syntax above): /exports/home 192.168.1.0/24(rw,no_root_squash) which seems to me to be providing network access to the exports/home directory on whatever device in the server is the "/" mount point. If this is the case it seems to me that /etc/exports should have a specification like Rick's, assuming directory /home/exports/home exists on the server, and then the client should have the follow in /etc/fstab: 192.168.1.86:/home/exports/home/ /mnt/test/ nfs4 defaults 0 0 or am I missing something? regards, Steve meaning that /home/exports/home is exported with read/write privileges to all hosts on the 192.168.1.* network, and that if a client mounts it as the root user, the root user ID is NOT squashed to the "anonymous" user on the server. You could run showmount -e 192.168.1.86 on the client to see what the server is exporting. -- - Rick Stevens, Systems Engineer, AllDigitalri...@alldigital.com - - AIM/Skype: therps2ICQ: 22643734Yahoo: origrps2 - -- - To err is human. To forgive, a large sum of money is needed.- -- ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@lists.fedoraproject.org ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@lists.fedoraproject.org
Re: NFS setup -
On 04/18/2018 12:42 PM, Bob Goodwin wrote: > On 04/18/18 15:01, Rick Stevens wrote: >> By default, Fedora uses the LVM (logical volume manager) system to >> partition the disks. It actually creates regular partitions as a raw >> volumes (PVs or "physical volumes"). It then typically creates a VG >> (volume group) that has that PVs in it. From there, it carves out >> LVs (logical volumes). On my laptop, for example, I have these (among >> others) from the "df -h" command: > > + > > > --- Logical volume --- > LV Path /dev/fedora00/home > LV Name home > VG Name fedora00 > LV UUID 2Ffglt-Twti-jf1R-lmMX-mqb1-vfF7-dhAusR > LV Write Access read/write > > So for me the question remains, how to get /etc/exports into > /dev/fedora00/home? > > It looks to me like the only way I can get /etc/exports the full TB's > is to create a new installation and assign most of the space, ~2.7 TB to > "/" and I would have tried that if the live installer wasn't such a > hassle to make work unless I go with LVM instead of Standard Partitions. > > Perhaps what I should do is try to move most of that space from "/home/ > to root with gparted? > > The box86 NFS works fine otherwise, I just can't get enough space with > only 49G in root and 2.7T in home ... No, /etc/exports tells the NFS server which directories to export via NFS. If you want to export /dev/fedora00/home, first find out where it's mounted on your NFS server. You can do that by running "df -h" as root on your NFS server. Example (again from my laptop): [root@golem4 ~]# df -h Filesystem Size Used Avail Use% Mounted on ... /dev/mapper/vg_golem4-lv_home 252G 49G 191G 21% /home So /dev/mapper/vg_golem4-lv_home is mounted on /home. So, if I were going to make my laptop an NFS server, I would add a line such as: /home 192.168.1.0/24(rw,no_root_squash) in my laptop's /etc/exports file. IMPORTANT: You export where the filesystem is _mounted_--NOT the raw device (in this case, you export "/home" and NOT "/dev/mapper/vg_golem4-lv_home"). Once that's done, I'd have to tell the NFS server daemon on my laptop that I had made changes to the /etc/exports file by running the command: [root@golem4 ~]# exportfs -ar The NFS server daemon on my laptop would then refresh its list of what it's supposed to export. To verify it, you could run a showmount -e localhost on the server to see what it thinks it's exporting, or showmount -e on one of the NFS clients to show what the server is exporting. Note that the showmount command only shows the export name and not what the raw device is on the NFS server. In fact, the NFS server daemon on the server (which is what's responding to the showmount queries) doesn't even know what device holds the directory being exported. It only understands directories. Then you'd mount the export on the client. Using the above stuff, an NFS client that wanted to use my exported "/home" directory and mount it at "/nfs/home" would do something like: [root@nfs-client]# mkdir -p /nfs/home [root@nfs-client]# mount -t nfs :/home /nfs/home where "" is either the hostname of the NFS server or its IP address. The first command creates the mountpoint on the client if it doesn't already exist, the second mounts the filesystem via NFS. If you wanted to put that in your /etc/fstab ON THE CLIENT so it'd mount at boot, you'd add a line such as: :/home /nfs/home nfs defaults0 0 Again, where "" is either the hostname of the NFS server or its IP address. Note that with that line in your /etc/fstab on the client, you could mount the filesystem via a simple [root@nfs-client]# mount /nfs/home and the mount command would look for a line in /etc/fstab that matched the filesystem specified, see that it's an NFS mount (via the "nfs" filesystem type part of the entry or the fact that the device string contained a ":/" sequence of characters which are unique to NFS volumes) and invoke the proper command. Remember, entries in /etc/exports ON THE SERVER tell the SERVER what _directories_ to export to the clients--NOT the raw device containing the filesystem. -- - Rick Stevens, Systems Engineer, AllDigitalri...@alldigital.com - - AIM/Skype: therps2ICQ: 22643734Yahoo: origrps2 - -- - Is that a buffer overflow or are you just happy to see me? - -- ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@lists.fedoraproject.org
Re: NFS setup -
On 04/18/18 15:01, Rick Stevens wrote: By default, Fedora uses the LVM (logical volume manager) system to partition the disks. It actually creates regular partitions as a raw volumes (PVs or "physical volumes"). It then typically creates a VG (volume group) that has that PVs in it. From there, it carves out LVs (logical volumes). On my laptop, for example, I have these (among others) from the "df -h" command: + --- Logical volume --- LV Path /dev/fedora00/home LV Name home VG Name fedora00 LV UUID 2Ffglt-Twti-jf1R-lmMX-mqb1-vfF7-dhAusR LV Write Access read/write So for me the question remains, how to get /etc/exports into /dev/fedora00/home? It looks to me like the only way I can get /etc/exports the full TB's is to create a new installation and assign most of the space, ~2.7 TB to "/" and I would have tried that if the live installer wasn't such a hassle to make work unless I go with LVM instead of Standard Partitions. Perhaps what I should do is try to move most of that space from "/home/ to root with gparted? The box86 NFS works fine otherwise, I just can't get enough space with only 49G in root and 2.7T in home ... -- Bob Goodwin - Zuni, Virginia, USA http://www.qrz.com/db/W2BOD box10 FEDORA-27/64bit LINUX XFCE Fastmail POP3 ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@lists.fedoraproject.org
Re: NFS setup -
On 04/18/2018 11:23 AM, Bob Goodwin wrote: > On 04/18/18 13:45, Rick Stevens wrote: >> Uhm, that looks like "box86" either isn't in DNS or /etc/hosts so it >> can't be resolved. If this is on the server, try "showmount -e" or >> "showmount -e localhost". > > + > > I eventually realized that and changed it to showmount -e 192.168.1.86 > and unfortunately it still shows the other file, > > # showmount -e 192.168.1.86 > Export list for 192.168.1.86: > /exports/home 192.168.1.0/24 > > Maybe I can only have one export file? > > Anyway I need to get it out of root and in "/home" instead which is > where the large capacity is. > > Df -h shows: /dev/mapper/fedora-home 2.7T 4.8G 2.5T 1% /home > > Why the /dev/mapper/fedora ? I selected "Standard Partitions" in the > installer and the rest looks like I would expect it to. The installer > gui is a horror, I always feel like I won the lottery when I get it to > accept what I enter ... By default, Fedora uses the LVM (logical volume manager) system to partition the disks. It actually creates regular partitions as a raw volumes (PVs or "physical volumes"). It then typically creates a VG (volume group) that has that PVs in it. From there, it carves out LVs (logical volumes). On my laptop, for example, I have these (among others) from the "df -h" command: /dev/mapper/vg_golem4-lv_root 426G 214G 208G 51% / /dev/sda1 477M 206M 242M 46% /boot /dev/mapper/vg_golem4-lv_home 252G 49G 191G 21% /home You can see I have a /dev/sda1 partition that is used as my boot volume (/boot). Note also that my / and /home filesystems are on LVM. To see how that's set up: [root@golem4 ~]# vgdisplay -v --- Volume group --- VG Name vg_golem4 System ID Formatlvm2 Metadata Areas1 Metadata Sequence No 6 VG Access read/write VG Status resizable MAX LV0 Cur LV3 Open LV 3 Max PV0 Cur PV1 Act PV1 VG Size 698.12 GiB PE Size 32.00 MiB Total PE 22340 Alloc PE / Size 22340 / 698.12 GiB Free PE / Size 0 / 0 VG UUID V3EZ9p-3wxH-1LJ8-ho77-Rmbf-A4d0-0oLCY7 --- Logical volume --- LV Path/dev/vg_golem4/lv_swap LV Namelv_swap VG Namevg_golem4 LV UUIDlK3HOt-a76V-faDd-3Mfl-mBxZ-DTuG-gb6OqM LV Write Accessread/write LV Creation host, time , LV Status available # open 2 LV Size<9.72 GiB Current LE 311 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:1 --- Logical volume --- LV Path/dev/vg_golem4/lv_home LV Namelv_home VG Namevg_golem4 LV UUIDGfSiWV-IpHe-HtgD-PfjA-GBuG-G3tD-eKK69c LV Write Accessread/write LV Creation host, time , LV Status available # open 1 LV Size256.00 GiB Current LE 8192 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:2 --- Logical volume --- LV Path/dev/vg_golem4/lv_root LV Namelv_root VG Namevg_golem4 LV UUIDrxEwZY-8BDl-zm2b-XeBh-Drqr-3Ci3-bg5JX4 LV Write Accessread/write LV Creation host, time , LV Status available # open 1 LV Size<432.41 GiB Current LE 13837 Segments 2 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:0 --- Physical volumes --- PV Name /dev/sda2 PV UUID Qasi0A-L5V4-J4EU-0D5L-fITP-BpDp-6xAash PV Status allocatable Total PE / Free PE22340 / 0 When you look at that, you can see there's a VG (volume group) called "vg_golem4". That volume group is split up into three logical volumes, "lv_root", "lv_swap" and "lv_home" and you can see the /dev names they're known by. You can also see at the bottom that the VG has a single PV, /dev/sda2. Now as far as your /etc/exports file goes, you can have as many lines in it as you want. To wit (from an NFS server in our datacenter whose DNS name is "nfssrv598-r1"): [root@nfssrv598-r1 ~]# cat /etc/exports # /etc/exports # # Storage from HP 9320 Array (volume group "VG_HP9320")... # /adcorp 192.168.60.*(rw,no_root_squash) 192.168.69.*(rw,no_root_squash) /adlab 192.168.60.*(rw,no_root_squash) 192.168.69.*(rw,no_root_squash) /back1 192.168.60.*(rw,no_root_squash) 192.168.69.*(rw,no_root_squash) /fs0100 192.168.60.*(rw,no
Re: NFS setup -
On 04/18/18 13:45, Rick Stevens wrote: Uhm, that looks like "box86" either isn't in DNS or /etc/hosts so it can't be resolved. If this is on the server, try "showmount -e" or "showmount -e localhost". + I eventually realized that and changed it to showmount -e 192.168.1.86 and unfortunately it still shows the other file, # showmount -e 192.168.1.86 Export list for 192.168.1.86: /exports/home 192.168.1.0/24 Maybe I can only have one export file? Anyway I need to get it out of root and in "/home" instead which is where the large capacity is. Df -h shows: /dev/mapper/fedora-home 2.7T 4.8G 2.5T 1% /home Why the /dev/mapper/fedora ? I selected "Standard Partitions" in the installer and the rest looks like I would expect it to. The installer gui is a horror, I always feel like I won the lottery when I get it to accept what I enter ... -- Bob Goodwin - Zuni, Virginia, USA http://www.qrz.com/db/W2BOD box10 FEDORA-27/64bit LINUX XFCE Fastmail POP3 ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@lists.fedoraproject.org
Re: NFS setup -
On 04/18/2018 08:43 AM, Bob Goodwin wrote: > On 04/17/18 06:47, Tim via users wrote: >> The /etc/fstab file points to where devices get mounted onto the >> directory tree. >> >> If you have mounts like >> >> /dev/wrong-device pointing to /my-preferred-storage-space >> >> Simply change the device to the one you actually want. >> >> -- > > . > > Server end: > > # df -h /home/exports/home > Filesystem Size Used Avail Use% Mounted on > > /dev/mapper/fedora-home 2.7T 4.8G 2.5T 1% /home > > So that's where I want to put ,y nfs data. > > I have a directory /home/exports/home/ where I put an empty file "xxxtest." > > # ll /home/exports/home/ > total 0 > -rw-r--r--. 1 root root 0 Apr 18 11:05 xxxtest > > Did: # exportfs -r > > Then: > > # showmount -e box86 > clnt_create: RPC: Unknown host Uhm, that looks like "box86" either isn't in DNS or /etc/hosts so it can't be resolved. If this is on the server, try "showmount -e" or "showmount -e localhost". > Client end: > > No access from the client - > > bobg]# mount 192.168.1.86:/home/exports/home /mnt/test > mount.nfs: access denied by server while mounting > 192.168.1.86:/home/exports/home > > What am I missing and/or doing wrong? We don't know what your server's /etc/exports line that exports the directory looks like, so there's no way to tell. The line should be something like: /home/exports/home 192.168.1.0/24(rw,no_root_squash) meaning that /home/exports/home is exported with read/write privileges to all hosts on the 192.168.1.* network, and that if a client mounts it as the root user, the root user ID is NOT squashed to the "anonymous" user on the server. You could run showmount -e 192.168.1.86 on the client to see what the server is exporting. -- - Rick Stevens, Systems Engineer, AllDigitalri...@alldigital.com - - AIM/Skype: therps2ICQ: 22643734Yahoo: origrps2 - -- - To err is human. To forgive, a large sum of money is needed.- -- ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@lists.fedoraproject.org
Re: NFS setup -
On 04/17/18 06:47, Tim via users wrote: The /etc/fstab file points to where devices get mounted onto the directory tree. If you have mounts like /dev/wrong-device pointing to /my-preferred-storage-space Simply change the device to the one you actually want. -- . Server end: # df -h /home/exports/home Filesystem Size Used Avail Use% Mounted on /dev/mapper/fedora-home 2.7T 4.8G 2.5T 1% /home So that's where I want to put ,y nfs data. I have a directory /home/exports/home/ where I put an empty file "xxxtest." # ll /home/exports/home/ total 0 -rw-r--r--. 1 root root 0 Apr 18 11:05 xxxtest Did: # exportfs -r Then: # showmount -e box86 clnt_create: RPC: Unknown host Client end: No access from the client - bobg]# mount 192.168.1.86:/home/exports/home /mnt/test mount.nfs: access denied by server while mounting 192.168.1.86:/home/exports/home What am I missing and/or doing wrong? -- Bob Goodwin - Zuni, Virginia, USA http://www.qrz.com/db/W2BOD box10 FEDORA-27/64bit LINUX XFCE Fastmail POP3 ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@lists.fedoraproject.org
Re: NFS setup -
Allegedly, on or about 17 April 2018, Bob Goodwin sent: > From the client /etc/fstab: > 192.168.1.86:/exports/home//mnt/test/nfs4defaults0 0 Okay, looks normal. The server has /exports/home making it available to your LAN. When your client saves into its /mnt/test/, files will be saved into the server's /exports/home/ > I guess it boils down to how do I tell NFS to store data in /home > instead of "/"? I've been looking at this and can't see what to > change, or maybe it can';t be fixed that way? One solution: Stop exporting that directory (so there's no confusion in the change). Move the current contents from /exports/home/ to /home/exports/home/ Change your server's details in its /etc/exports to the new location. Change your client's details in their /etc/fstab to the new location. Now, when clients write to their /mnt/test/, they'll be writing into your other partition, at /home/exports/home/ You may want to rename some directories to be less confusing paths. -- [tim@localhost ~]$ uname -rsvp Linux 4.15.10-200.fc26.x86_64 #1 SMP Thu Mar 15 17:14:41 UTC 2018 x86_64 Boilerplate: All mail to my mailbox is automatically deleted. There is no point trying to privately email me, I only get to see the messages posted to the mailing list. Lucky for you I typed this, you'd never be able to read my handwriting. ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@lists.fedoraproject.org
Re: NFS setup -
On 04/17/2018 02:42 AM, Bob Goodwin wrote: /dev/mapper/fedora-home 2.7T 4.8G 2.5T 1% /home As you can see it is putting the stored data in "/" [19G in a 49G space]. Those partitions were setup selecting "custom/standard partitions] in the installer. It looks to me like I should've used the 2.7T of space in "/" but that's not easy for me to do now. So I guess it boils down to how do I tell NFS to store data in /home instead of "/"? I've been looking at this and can't see what to change, or maybe it can';t be fixed that way? If you are using NFSv4, this is trivial. Make a directory, /home/exports, and use that as your NFS root. Create /home/exports/var/ftp/pub and /home/export/home/public and move the required content to those locationos. In /etc/exports: /home/export 192.168.1.0/255.255.255.0(ro) /home/export/var/ftp/pub 192.168.1.0/255.255.255.0(ro) /home/export/home/public 192.168.1.0/255.255.255.0(rw) /home/export 192.168.54.0/255.255.255.0(ro,sync) /home/export/var/ftp/pub 192.168.54.0/255.255.255.0(ro,sync) If you want to export those directories via NFSv3, you'd create the same directory structure, and then bind mount those directories into place. Create the directories, move the content, and then add to /etc/fstab: /home/export/var/ftp/pub /var/ftp/pub none bind 0 0 /home/export/home/public /home/public none bind 0 0 After setting up fstab, you can "mount /var/ftp/pub" and "mount /home/public". Those will be mounted automatically each time you reboot. In that case, /etc/exports should look like: /var/ftp/pub 192.168.1.0/255.255.255.0(ro,mountpoint) /home/public 192.168.1.0/255.255.255.0(rw,mountpoint) /var/ftp/pub 192.168.54.0/255.255.255.0(ro,sync,mountpoint) ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@lists.fedoraproject.org
Re: NFS setup -
On 04/17/18 06:35, Eyal Lebedinsky wrote: On 17/04/18 19:42, Bob Goodwin wrote: I have the NFS server working nicely and doing what I expect it to do, with a lot of help from this list, EXCEPT data is not being put in the right partition! Who is the client putting data in? How are the nfs exports mounted on this client? From the client /etc/fstab: 192.168.1.86:/exports/home/ /mnt/test/ nfs4 defaults 0 0 Can I fix this without starting from a new Fedora 27 installation or completely replacing NFS? Df shows the following: Can I assume this 'df' is on the server? Can you show the same on the client? Yes, this is DF from the server. $ df -h Filesystem Size Used Avail Use% Mounted on devtmpfs 1.8G 0 1.8G 0% /dev tmpfs 1.8G 32K 1.8G 1% /dev/shm tmpfs 1.8G 1.6M 1.8G 1% /run tmpfs 1.8G 0 1.8G 0% /sys/fs/cgroup /dev/mapper/fedora-root 49G 19G 29G 40% / tmpfs 1.8G 88K 1.8G 1% /tmp /dev/sda2 976M 151M 758M 17% /boot /dev/sda1 200M 18M 183M 9% /boot/efi /dev/mapper/fedora-home 2.7T 4.8G 2.5T 1% /home As you can see it is putting the stored data in "/" [19G in a 49G space]. Those partitions were setup selecting "custom/standard partitions] in the installer. It looks to me like I should've used the 2.7T of space in "/" but that's not easy for me to do now. Looking at the output of 'mount' on the client will show how the exported nfs directories (on the server) are mounted on the client. The exported directories from the server are defined in /etc/exports (on the server). The mount points are defined in /etc/fstab (on the client). [root@Box10 bobg]# mount 192.168.1.86:/exports/home/ /mnt/test 192.168.1.86:/exports/home/ on /mnt/test type nfs # mount shows this for this server: mount 192.168.1.86:/exports/home/ on /mnt/test type nfs I guess it boils down to how do I tell NFS to store data in /home instead of "/"? I've been looking at this and can't see what to change, or maybe it can';t be fixed that way? I have a second 3TB drive installed and idle in which I can start over with a new installation if that would be preferable ... I do not expect that a new install is required, just sorting out the directories and moving the current data to the correct place (on the server). Help appreciated, Bob -- Bob Goodwin - Zuni, Virginia, USA http://www.qrz.com/db/W2BOD box10 FEDORA-27/64bit LINUX XFCE Fastmail POP3 ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@lists.fedoraproject.org
Re: NFS setup -
Allegedly, on or about 17 April 2018, Bob Goodwin sent: > So I guess it boils down to how do I tell NFS to store data in /home > instead of "/"? I've been looking at this and can't see what to > change, or maybe it can';t be fixed that way? I'm not sure of which side of the equation you're approaching this from. The /etc/exports file on a server exports directories on its own filesystem for external clients to use. This points to where files will actually come and go from. So if you have a filing system like: /huge-storage-space-wrong /huge-storage-space-correct (Which doesn't actually matter what partition those mount points are on.) Then change the listing in the exports file, and move any existing files from one to the other, on the fileserver. The /etc/fstab file points to where devices get mounted onto the directory tree. If you have mounts like /dev/wrong-device pointing to /my-preferred-storage-space Simply change the device to the one you actually want. -- Likewise, with NFS clients. They'll map your exported fileserver directories onto local ones. You can map them (almost) anywhere you want to. For permanent mounts, you can set them up in /etc/fstab with the server address pointing to the local mount point. For autofs automatic mounting, the trend is to auto-mount things inside a /net directory (which you create), and when you try to access /net/name-of-your-fileserver/name-of-your-exported-filesystem, it auto- mounts it in there/ --- Which of those scenarios are you trying to work through? NB: There's a few gotchas about NFSing things about: If you export unusual directories, or mount things in unusual places, you may have to contend with SELinux shenanigans (including bizarre unable-to-do-something kind of errors without an explanation that points to SELinux). It's usual that the numerical user IDs (and group IDs) of your users have to be the same on server and client. Yes, NFSv4 supposedly can map "tim" between user 1023 on one PC and user 1075 on another, but that doesn't always work without a configuration fight. -- [tim@localhost ~]$ uname -rsvp Linux 4.15.10-200.fc26.x86_64 #1 SMP Thu Mar 15 17:14:41 UTC 2018 x86_64 Boilerplate: All mail to my mailbox is automatically deleted. There is no point trying to privately email me, I only get to see the messages posted to the mailing list. Evolution keeps on telling me that it's refreshing, but I still want to go and get a drink. ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@lists.fedoraproject.org
Re: NFS setup -
On 17/04/18 19:42, Bob Goodwin wrote: I have the NFS server working nicely and doing what I expect it to do, with a lot of help from this list, EXCEPT data is not being put in the right partition! Who is the client putting data in? How are the nfs exports mounted on this client? Can I fix this without starting from a new Fedora 27 installation or completely replacing NFS? Df shows the following: Can I assume this 'df' is on the server? Can you show the same on the client? $ df -h Filesystem Size Used Avail Use% Mounted on devtmpfs 1.8G 0 1.8G 0% /dev tmpfs 1.8G 32K 1.8G 1% /dev/shm tmpfs 1.8G 1.6M 1.8G 1% /run tmpfs 1.8G 0 1.8G 0% /sys/fs/cgroup /dev/mapper/fedora-root 49G 19G 29G 40% / tmpfs 1.8G 88K 1.8G 1% /tmp /dev/sda2 976M 151M 758M 17% /boot /dev/sda1 200M 18M 183M 9% /boot/efi /dev/mapper/fedora-home 2.7T 4.8G 2.5T 1% /home As you can see it is putting the stored data in "/" [19G in a 49G space]. Those partitions were setup selecting "custom/standard partitions] in the installer. It looks to me like I should've used the 2.7T of space in "/" but that's not easy for me to do now. Looking at the output of 'mount' on the client will show how the exported nfs directories (on the server) are mounted on the client. The exported directories from the server are defined in /etc/exports (on the server). The mount points are defined in /etc/fstab (on the client). So I guess it boils down to how do I tell NFS to store data in /home instead of "/"? I've been looking at this and can't see what to change, or maybe it can';t be fixed that way? I have a second 3TB drive installed and idle in which I can start over with a new installation if that would be preferable ... I do not expect that a new install is required, just sorting out the directories and moving the current data to the correct place (on the server). Help appreciated, Bob -- Eyal at Home (fed...@eyal.emu.id.au) ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@lists.fedoraproject.org
NFS setup -
I have the NFS server working nicely and doing what I expect it to do, with a lot of help from this list, EXCEPT data is not being put in the right partition! Can I fix this without starting from a new Fedora 27 installation or completely replacing NFS? Df shows the following: $ df -h Filesystem Size Used Avail Use% Mounted on devtmpfs 1.8G 0 1.8G 0% /dev tmpfs 1.8G 32K 1.8G 1% /dev/shm tmpfs 1.8G 1.6M 1.8G 1% /run tmpfs 1.8G 0 1.8G 0% /sys/fs/cgroup /dev/mapper/fedora-root 49G 19G 29G 40% / tmpfs 1.8G 88K 1.8G 1% /tmp /dev/sda2 976M 151M 758M 17% /boot /dev/sda1 200M 18M 183M 9% /boot/efi /dev/mapper/fedora-home 2.7T 4.8G 2.5T 1% /home As you can see it is putting the stored data in "/" [19G in a 49G space]. Those partitions were setup selecting "custom/standard partitions] in the installer. It looks to me like I should've used the 2.7T of space in "/" but that's not easy for me to do now. So I guess it boils down to how do I tell NFS to store data in /home instead of "/"? I've been looking at this and can't see what to change, or maybe it can';t be fixed that way? I have a second 3TB drive installed and idle in which I can start over with a new installation if that would be preferable ... Help appreciated, Bob -- Bob Goodwin - Zuni, Virginia, USA http://www.qrz.com/db/W2BOD box10 FEDORA-27/64bit LINUX XFCE Fastmail POP3 ___ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-le...@lists.fedoraproject.org