- From 23759a971008ee3f6dd0579a9a768be3ca9c5ba7 Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Sat, 7 Jun 2025 16:32:07 +0200
- Subject: [PATCH 1/2] tests: Document Linux NFS server setup
- Document Linux NFS server setup, with XFS and FAT32 test
- filesystems.
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- tests/nfs_server_setup.txt | 57 ++++++++++++++++++++++++++++++++++++--
- 1 file changed, 54 insertions(+), 3 deletions(-)
- diff --git a/tests/nfs_server_setup.txt b/tests/nfs_server_setup.txt
- index b9e2267..0e7393f 100644
- --- a/tests/nfs_server_setup.txt
- +++ b/tests/nfs_server_setup.txt
- @@ -4,12 +4,63 @@
- #
- # TODO:
- -# - Debian Linux NFSv4.2 server setup
- -# - Solaris 11.4 NFSv4.1 server setup
- -# - Illumos 11.4 NFSv4.1 server setup
- # - FreeBSD NFSv4.1 server setup
- #
- +
- +#
- +# Debian Linux "Bullseye" NFSv4.2 server setup
- +#
- +
- +##### 1. Setup
- +---- snip ----
- +# install packages
- +apt-get install nfs-kernel-server nfs-common nfs4-acl-tools autofs
- +
- +# turn idmapper on, even for AUTH_SYS
- +{
- + printf "[General]\n"
- + printf "Domain = GLOBAL.LOC\n"
- +} >>'/etc/idmapd.conf'
- +printf "options nfsd nfs4_disable_idmapping=N\noptions nfs nfs4_disable_idmapping=N\n" >>'/etc/modprobe.d/nfs.conf'
- +printf "NEED_IDMAPD=yes\n" >>'/etc/default/nfs-common'
- +
- +# put an export in '/etc/exports'
- +
- +# start NFS server
- +service nfs-server start
- +---- snip ----
- +
- +
- +##### 2. Setup a 16GB XFS filesystem with block cloning support
- +---- snip ----
- +time dd if=/dev/zero of=/bigdisk/xfstestfs001.img bs=$((1024*1024)) count=$((16*1024))
- +mkfs.xfs -m reflink=1 /bigdisk/xfstestfs001.img
- +mkdir /xfstestfs001
- +chmod a+rwxt /xfstestfs001
- +echo '/bigdisk/xfstestfs001.img /xfstestfs001 xfs loop 0 0' >>'/etc/fstab'
- +#mount -o loop /bigdisk/xfstestfs001.img /xfstestfs001
- +echo '/xfstestfs001 *(sec=sys,rw,async,insecure,no_root_squash,fsid=2172423)' >>'/etc/exports'
- +mount /xfstestfs001
- +service nfs-server restart
- +---- snip ----
- +
- +
- +##### 3. Setup a 16GB DOS FAT32 filesystem for testing:
- +---- snip ----
- +dd if='/dev/zero' of='/bigdisk/fat32_image.img' bs=$((1024*1024)) count=$((16*1024))
- +mkfs.fat -F 32 '/bigdisk/fat32_image.img'
- +mkdir /fat32_mount
- +chmod -R a+rwx /fat32_mount
- +chown 65534:65534 /fat32_mount
- +#mount -o loop,uid=65534,gid=65534 /bigdisk/fat32_image.img /fat32_mount
- +echo '/bigdisk/fat32_image.img /fat32_mount fat loop,uid=65534,gid=65534 0 0' >>'/etc/fstab'
- +mount /fat32_mount
- +echo '/fat32_mount *(sec=sys,rw,async,insecure,all_squash,anonuid=65534,anongid=65534,fsid=5272429)' >>'/etc/exports'
- +service nfs-server restart
- +---- snip ----
- +
- +
- #
- # Windows Server 2019 NFSv4.1 server setup
- #
- --
- 2.45.1
- From 24091cfe93d8c66d07ef46825b69625d070b102c Mon Sep 17 00:00:00 2001
- From: Roland Mainz <roland.mainz@nrubsig.org>
- Date: Sat, 7 Jun 2025 17:36:44 +0200
- Subject: [PATCH 2/2] daemon: |nfs_file_info_to_attributes()| should only use
- |mode| if it is a valid attribute
- |nfs_file_info_to_attributes()| should only use |mode| if it is a valid attribute
- Signed-off-by: Cedric Blancher <cedric.blancher@gmail.com>
- ---
- daemon/fileinfoutil.c | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
- diff --git a/daemon/fileinfoutil.c b/daemon/fileinfoutil.c
- index f907b38..540994c 100644
- --- a/daemon/fileinfoutil.c
- +++ b/daemon/fileinfoutil.c
- @@ -73,8 +73,10 @@ ULONG nfs_file_info_to_attributes(
- }
- EASSERT(bitmap_isset(&info->attrmask, 1, FATTR4_WORD1_MODE));
- - if (info->mode == 0444) /* XXX: 0444 for READONLY */
- - attrs |= FILE_ATTRIBUTE_READONLY;
- + if (bitmap_isset(&info->attrmask, 1, FATTR4_WORD1_MODE)) {
- + if (info->mode == 0444) /* XXX: 0444 for READONLY */
- + attrs |= FILE_ATTRIBUTE_READONLY;
- + }
- if (info->hidden)
- attrs |= FILE_ATTRIBUTE_HIDDEN;
- --
- 2.45.1
msnfs41client: Patches for test NFS server setup for Linux+misc, 2025-06-07
Posted by Anonymous on Sat 7th Jun 2025 17:18
raw | new post
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.