AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题

问题[mount](server)

Martin Hope
crackpot
Asked: 2023-07-15 22:26:37 +0800 CST

是否可以在同一根目录中重新定位 btrfs 子卷的挂载点?

  • 5

我在/docker/nc/data路径下创建了一个btrfs子卷。如下所示:

$ sudo btrfs subvolume list /
ID 256 gen 13908 top level 5 path docker
ID 257 gen 13877 top level 256 path docker/nc/data

是否可以将子卷移动到子卷泊坞窗内的某个位置?IE

/docker/nc/config/data

其中有近90GiB的数据。是否可以不复制就完成?

mount
  • 1 个回答
  • 15 Views
Martin Hope
CrazyDuck
Asked: 2022-10-26 02:58:02 +0800 CST

为什么我尝试修复文件系统时 fsck 不起作用

  • 5

我尝试挂载/dev/nvme0n1p1。

Disk /dev/nvme0n1: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: Samsung SSD 980 PRO 500GB               
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: B1ED7DE3-D07A-2646-9A21-14A2ABF7CEB2

Device         Start       End   Sectors   Size Type
/dev/nvme0n1p1  2048 976773119 976771072 465.8G Linux filesystem

这不起作用,因为我收到此错误

mount(2) system call failed: Structure needs cleaning.
dmesg(1) may have more information after failed mount system call.

用它修复后,fsck我总是得到与上面所示相同的错误。

编辑:我重新运行fsckwith -f -v并更改了输出。输出显示新的错误。

# sudo fsck -f -v /dev/nvme0n1p1 -y

e2fsck 1.46.6-rc1 (12-Sep-2022)
Pass 1: Checking inodes, blocks, and sizes
Inode 7 has illegal block(s).  Clear? yes

Illegal block #10280 (3396235583) in inode 7.  CLEARED.
Illegal block #10281 (1077962448) in inode 7.  CLEARED.
Illegal block #10282 (3443790753) in inode 7.  CLEARED.
Illegal block #10283 (2332978542) in inode 7.  CLEARED.
Illegal block #13384 (3894653357) in inode 7.  CLEARED.
Illegal block #13385 (3589061118) in inode 7.  CLEARED.
Illegal block #13386 (3771666462) in inode 7.  CLEARED.
Illegal block #13387 (2292560503) in inode 7.  CLEARED.
Illegal block #13416 (3837606578) in inode 7.  CLEARED.
Illegal block #13417 (3377237814) in inode 7.  CLEARED.
Illegal block #13418 (2597835013) in inode 7.  CLEARED.
Too many illegal blocks in inode 7.
Clear inode? yes

Restarting e2fsck from the beginning...
ext2fs_open2: Superblock checksum does not match superblock
fsck.ext4: Superblock invalid, trying backup blocks...
Resize inode not valid.  Recreate? yes

Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Block bitmap differences:  +(32768--33851) +(98304--99387) +(163840--164923) +(229376--230459) +(294912--295995) +(819200--820283) +(884736--885819) +(1605632--1606715) +(2654208--2655291) +(4096000--4097083) +(5768066--5768069) +5768073 +(5768075--5768080) +(5768082--5768083) +5768085 +(5768090--5768091) +(5768094--5768095) +(5768098--5768100) +(5768104--5768111) +5768113 +5768117 +(5768119--5768120) +5768122 +(5768126--5768129) +(5768132--5768133) +(5768135--5768136) +(5768138--5768139) +(5768142--5768146) +(5768148--5768150) +(5768152--5768154) +(5768156--5768157) +(5768160--5768161) +5768164 +5768168 +5768170 +5768172 +(5768174--5768175) +5768177 +5768179 +(5768182--5768184) +(5768187--5768188) +5768191 +5770187 +5772235 -5779403 -5781451 -5785547 -5788619 -5799883 +6293451 +6295499 -6319051 -6830027 -6842315 -6846411 +7344075 +7347147 -7351243 -7353291 -7361483 -7363531 -7364555 -7368651 +7865217 +(7865219--7865224) +(7865226--7865232) +7865236 +(7865239--7865240) +(7865242--7865244) +(7865249--7865251) +7865256 +7865258 +7865261 +(7865263--7865264) +7865267 +(7865269--7865272) +(7865275--7865280) +(7865282--7865283) +(7865286--7865287) +7865290 +7865292 +(7865295--7865296) +(7865298--7865299) +(7865302--7865303) +(7865305--7865306) +7865309 +(7865311--7865312) +(7865314--7865315) +7865320 +7865322 +7865325 +(7865328--7865329) +(7865332--7865333) +(7865335--7865336) +7865338 +7865341 +7865343 +7866315 -7884747 -7885771 -7893963 +(7962624--7963707) +8389579 -8408011 -8416203 +8913867 -8930251 +9438155 +9441227 +9444299 +9445323 -9446347 -9452491 -9455563 -9456587 -9464779 -9466827 +(11239424--11240507) +(20480000--20481083) +(23887872--23888955) +(30933888--30933889) +(30933893--30933895) +30933897 +30933900 +30933902 +30933904 +(30933906--30933907) +(30933912--30933914) +30933918 +(30933920--30933923) +30933926 +(30933929--30933932) +30933934 +(30933936--30933937) +(30933939--30933943) +(30933947--30933948) +30933951 +30933953 +(30933955--30933958) +30933961 +(30933963--30933964) +30933967 +(30933969--30933972) +30933974 +30933976 +30933979 +30933981 +30933987 +30933989 +(30933991--30933992) +(30933995--30933997) +(30933999--30934001) +30934003 +30934005 +(30934009--30934010) +(30934012--30934013) +30934015 +30936011 +30940107 -30945227 -30952395 -30956491 +31459275 -31466443 -31469515 -31470539 -31471563 -31474635 -31482827 -31487947 -31489995 +(31982465--31982467) +31982471 +(31982475--31982478) +31982480 +31982483 +(31982487--31982490) +(31982493--31982495) +(31982499--31982501) +31982503 +(31982506--31982508) +(31982510--31982511) +(31982513--31982514) +(31982516--31982522) +31982525 +(31982527--31982531) +(31982533--31982535) +31982538 +31982541 +(31982543--31982544) +31982547 +31982551 +31982553 +31982556 +31982559 +(31982561--31982562) +31982565 +(31982567--31982571) +31982573 +(31982575--31982576) +31982581 +(31982583--31982584) +(31982586--31982588) +(31982590--31982591) +31988683 +32512971 +32513995 -32519115 -32524235 +33033163 +33038283 -33048523 -33049547 -33060811 +33560523 -33566667 -33572811 -33575883 -33579979 -33582027 -33584075 -33586123 +34086859 -34099147 -34105291 -34108363 -34109387 +34603979 +34609099 +34610123 -34620363 -34622411 -34628555 -67645387 -67652555 -67654603 -67661771 +68162507 -68168651 -68187083 +68686795 -68705227 -68709323 +69206987 +(69207937--69207938) +69207940 +69207946 +(69207948--69207949) +(69207951--69207957) +(69207962--69207963) +(69207965--69207966) +(69207968--69207973) +69207976 +(69207978--69207982) +69207985 +69207994 +69207996 +69207998 +(69208000--69208001) +69208003 +69208008 +(69208011--69208013) +(69208015--69208019) +69208025 +(69208027--69208029) +(69208032--69208033) +69208035 +(69208037--69208039) +(69208041--69208044) +69208046 +69208049 +(69208056--69208058) +69212107 -69216203 -69229515 +69737419 -69757899 -69759947 +(70255488--70255492) +70255494 +(70255497--70255501) +70255505 +(70255507--70255508) +(70255510--70255511) +70255515 +(70255519--70255520) +70255523 +70255525 +(70255531--70255535) +(70255537--70255538) +70255540 +(70255543--70255544) +(70255549--70255550) +70255553 +70255561 +(70255564--70255567) +(70255572--70255573) +70255579 +(70255582--70255584) +(70255587--70255589) +(70255591--70255592) +(70255595--70255599) +(70255603--70255604) +70255606 +70255610 +70255613 +70258635 -70265803 -70267851 +70780875 +70783947 +70785995 -70791115 -70800331 -70806475 -70808523 +71306187 +71311307 -71313355 -71314379 -71322571 -71323595 -71325643 -71332811 -71333835 -71334859 +(71663616--71664699) +(78675968--78677051) +100665291 -100673483 +101192651 -101218251 +101714891 -101742539 +(102239105--102239106) +(102239108--102239109) +102239113 +(102239116--102239118) +(102239121--102239122) +(102239126--102239128) +(102239132--102239134) +102239137 +102239139 +102239141 +(102239146--102239147) +102239149 +(102239151--102239152) +(102239154--102239158) +(102239164--102239165) +102239167 +(102239173--102239174) +102239176 +102239178 +(102239180--102239183) +(102239185--102239186) +102239190 +(102239193--102239194) +(102239198--102239200) +102239202 +102239207 +(102239210--102239211) +(102239213--102239214) +(102239216--102239220) +(102239222--102239223) +102239225 +102239227 +102239230 +102240203 +102241227 -102246347 +(102400000--102401083) +102762443 -102771659 -102773707 -102777803 -102785995 -102787019 +103285638 +(103285641--103285642) +(103285644--103285645) +103285647 +103285650 +103285656 +103285659 +103285661 +103285663 +(103285666--103285668) +(103285670--103285671) +(103285674--103285676) +(103285678--103285679) +(103285682--103285689) +103285691 +(103285695--103285697) +(103285699--103285700) +(103285702--103285703) +103285707 +103285711 +103285713 +(103285716--103285717) +103285719 +103285721 +103285724 +(103285727--103285729) +103285732 +(103285735--103285739) +103285742 +(103285745--103285746) +103285756 +103285759 +103288779 -103295947 -103302091 -103308235 +103811019 +103815115 +103816139 -103839691 -103840715 +104335307 +(104336256--104336258) +104336262 +(104336264--104336265) +104336267 +104336271 +104336273 +104336276 +(104336279--104336280) +(104336282--104336285) +(104336287--104336289) +104336291 +104336294 +104336297 +104336299 +104336303 +104336315 +(104336317--104336318) +(104336321--104336323) +(104336329--104336330) +(104336332--104336337) +(104336339--104336340) +(104336344--104336345) +(104336347--104336352) +(104336358--104336359) +104336364 +(104336367--104336369) +104336372 +(104336375--104336377) +104336381 +104339403 -104344523
Fix? yes

Free blocks count wrong for group #0 (23453, counted=23454).
Fix? yes

Free blocks count wrong (119899042, counted=119899043).
Fix? yes

Directories count wrong for group #3713 (2790064128, counted=0).
Fix? yes

Padding at end of inode bitmap is not set. Fix? yes


/dev/nvme0n1p1: ***** FILE SYSTEM WAS MODIFIED *****

          11 inodes used (0.00%, out of 30531584)
           0 non-contiguous files (0.0%)
           0 non-contiguous directories (0.0%)
             # of inodes with ind/dind/tind blocks: 0/0/0
             Extent depth histogram: 2/1
     2197341 blocks used (1.80%, out of 122096384)
           0 bad blocks
           0 large files

           0 regular files
           2 directories
           0 character device files
           0 block device files
           0 fifos
           0 links
           0 symbolic links (0 fast symbolic links)
           0 sockets
------------
           2 files

有什么我做错了还是我错过了什么?

linux mount
  • 1 个回答
  • 44 Views
Martin Hope
Raul Chiarella
Asked: 2022-04-14 13:33:28 +0800 CST

仅当存在 Samba 挂载时才绑定挂载?(例如:BIND MOUNT 需要 NFS 挂载 \\172.16.xx\files...)

  • 1

我在 fstab 中使用以下内容安装了 SAMBA:

//source/files /mnt/files cifs user,_netdev,cache=none,credentials=/usr/src/access.smb 0 0

然后我有以下 mount --bind 行:

/mnt/files /var/www/html/data none defaults,bind 0 0

但是第二个挂载不起作用。如果我重新启动计算机,则只有第一个挂载有效。我需要手动安装第二个(使用绑定)

请问,有人可以帮我吗?我在 Unix Stack Exchange 上看到了这篇文章,但我不明白:https ://unix.stackexchange.com/questions/216287/how-do-i-set-up-bind-mounts-on-startup-correctly-in -系统世界

提前致谢。

linux nfs mount samba bind
  • 1 个回答
  • 93 Views
Martin Hope
ZDV
Asked: 2022-04-01 22:02:56 +0800 CST

使用 pam_mount 安装 Windows 共享 (cifs) 时出错

  • 0

我有一台 Ubuntu 21.10 电脑加入了 Samba AD 域控制器。一切工作正常 - Kerberos 工作(可以使用 kinit 获取票证),winbind 工作(可以获取有关用户和组的信息),我能够使用域凭据登录系统。

并且手动安装共享也可以使用 Kerberos 和 ntlmssp 授权:

sudo mount -t cifs //server/path /mount/point -o username=USER,domain=DOMAIN,sec=ntlmssp
sudo mount -t cifs //server/path /mount/point -o username=USER,domain=DOMAIN,sec=krb5

像 username=USER@DOMAIN 这样设置用户名也可以。

问题是当用户通过 gnome 登录时,我无法让 pam_mount 工作!

像这样在 pam_mount.conf.xml 中使用 krb5

<volume
      fstype="cifs"
      server="server"
      path="path"
      mountpoint="mount/point"
      options="sec=krb5"
  />

在 auth.conf 中给出错误

(mount.c:72): mount error(126): Required key not available

像这样在 pam_mount.conf.xml 中使用 ntlmssp

<volume
      fstype="cifs"
      server="server"
      path="path"
      mountpoint="mount/point"
      options="sec=ntlmssp"
  />

在 auth.conf 中给出不同的错误

(pam_mount.c:173): conv->conv(...): Conversation error 

在 pam_mount 中启用调试后,我还可以在 auth.log 中看到它正在执行的确切安装命令,并且当我手动运行它们时,它与上面的工作相同。

我尝试了以下方法:

  • 以不同的组合使用挂载选项:vers=3.0, _netdev,user,sec
  • 强制 Kerberos 使用 pam_winbind 配置将票证存储在 /tmp/krb5cc_%u 中的文件中
  • 阅读大量论坛

有任何想法吗?

ubuntu mount pam
  • 1 个回答
  • 510 Views
Martin Hope
AKS
Asked: 2022-02-12 12:46:20 +0800 CST

文件夹/文件上的 OWNER USER 错误: docker run -v <host_path_dir_file>:<docker_some_path_dir_file>/ not working for user defined in Dockerfile

  • 0

主机操作系统: Red Hat Enterprise Linux Server 7.9版(Maipo)

来宾操作系统,即运行的 Docker 容器:OpenSuse 15.2

Docker 版本(在主机上):Docker 版本 19.03.5,构建 633a0ea

在主机上,当我 git 克隆存储库“utilities_scripts”时,我对用户具有有效访问权限(由于 umask)。

  • docker run ...我认为这里的问题与权限无关,但是当我发出以下命令时,为什么 Dockerfile 中定义的 USER 没有被设置为 docker 容器内的文件夹/文件(正在挂载)的所有者。设置 755/775 等不是一个选项,因为我不能在容器内以目标 docker 用户的身份 chown 并且设置 777 是不好的做法。

注意:

  1. 当我从不同的 Linux 机器尝试相同的 docker 映像时,文件夹/文件作为用户“ docker_non_root_user ”安装,该用户在 Dockerfile 中定义为USER docker_non_root_user.
  2. docker build ...成功运行并创建映像,并且容器在另一台机器上工作(当我使用-v <host>:<container>docker CLI 选项语法将 git clone 存储库安装在容器内时。

来自 Dockerfile 的代码片段是:

# Define any mount points references
VOLUME ["/home/docker_non_root_user/git"]

USER docker_non_root_user
WORKDIR /home/docker_non_root_user/git

这是我在存在 DockerfileUSER ...所有权问题的主机上看到的:

[gigauser@jenkins-projectABC bitbucket_workspace]$ whoami
gigauser
[gigauser@jenkins-projectABC bitbucket_workspace]$ id
uid=gigauser(gigauser) gid=21520(jenkins) groups=21520(jenkins),3000(ectx)

[gigauser@jenkins-projectABC bitbucket_workspace]$ umask
0077
[gigauser@jenkins-projectABC bitbucket_workspace]$ ls -l
total 12
drwx------  5 gigauser jenkins 4096 Feb  3 16:36 utilities_scripts
[gigauser@jenkins-projectABC bitbucket_workspace]$


[gigauser@jenkins-projectABC bitbucket_workspace]$ sudo docker image ls
Active Directory Password:
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
project-im-opensuse   15.2                0c9ee31464cd        43 hours ago        2.39GB
[gigauser@jenkins-projectABC bitbucket_workspace]$

[gigauser@jenkins-projectABC bitbucket_workspace]$
[gigauser@jenkins-projectABC bitbucket_workspace]$ sudo docker run -v $PWD/utilities_scripts:/home/docker_non_root_user/git/utilities_scripts/ -it project-im-opensuse:15.2 bash -c "whoami; id; which bash; bash --version; ls -l; echo; ls -l utilities_scripts; ls -l /home/docker_non_root_user/git/utilities_scripts; id gigauser; echo"

WARNING: IPv4 forwarding is disabled. Networking will not work.


docker_non_root_user
uid=1000(docker_non_root_user) gid=487(docker_non_root_user) groups=487(docker_non_root_user),100(users)

/bin/bash
GNU bash, version 4.4.23(1)-release (x86_64-suse-linux-gnu)
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
total 8
drwx------ 5 gigauser 21520 4096 Feb  4 00:36 utilities_scripts

ls: cannot open directory 'utilities_scripts': Permission denied
ls: cannot open directory '/home/docker_non_root_user/git/utilities_scripts': Permission denied
id: 'gigauser': no such user

[gigauser@jenkins-projectABC bitbucket_workspace]$

当我在其他 Linux 机器上运行相同的命令时,我看到挂载utilities_scripts文件夹的所有者是docker_non_root_user.

问题:为什么我看到主机用户的 USER-ID(我在其中运行docker run命令)设置在 docker 容器中的 utility_scripts 文件夹中,而Dockerfile中没有创建这样的用户 ID/容器内不存在?(见上面输出中的倒数第二行)。它目前在 docker 容器内获得相同主机的所有者和文件夹级别权限。

gigauser即主机的用户,不在docker容器中,但文件ls -l输出显示是容器中文件夹/文件gigauser的所有者。utilities_scripts此问题不会出现在其他主机上。

我什至检查了/etc/subuid文件,对我来说看起来不错。将内部的值更改为 docker 的用户并没有帮助。我也没有在/etc/docker/daemon.json文件中看到与此相关的任何内容。

$ cat /etc/subuid
gigauser:165536:65536

docker run ....options从另一台 Linux 主机运行上述相同的命令,它显示 docker 容器内的文件夹所有权为:

drwx------ 5 docker_non_root_user 1000  272 Jan 26 21:52 utilities_scripts
linux mount permissions docker containers
  • 1 个回答
  • 368 Views
Martin Hope
alex3025
Asked: 2022-01-25 11:14:33 +0800 CST

Rsync:“chown 失败:权限被拒绝 (13)”

  • 0

我使用以下命令在每个午夜运行一个 rsync 任务:

rsync -ahzP --stats --update --delete-before --delete-excluded --exclude "*.log" --exclude temp /mnt/raid/ /mnt/backups > /root/ext_backup.log 2>&1

/mnt/backups是一个 NFS 挂载。

备份过程顺利运行了大约半小时,然后我收到以下错误:

rsync: [receiver] write failed on "/my/file": Input/output error (5)
rsync: [receiver] chown "/my/file" failed: Permission denied (13)
rsync error: error in file IO (code 11) at receiver.c(378) [receiver=3.2.3]

rsync: [sender] write error: Broken pipe (32)

可能是什么问题呢?

linux ubuntu nfs mount rsync
  • 1 个回答
  • 1049 Views
Martin Hope
Barnaba
Asked: 2022-01-03 13:52:20 +0800 CST

为什么 dar 不允许我卸载?

  • 0

我正在尝试使用 DAR 对一个巨大的目录进行多卷备份。根据教程,这应该是可能的。或者至少曾经是。

root@box:/# dar -R / -c mnt/backups/syncable -z -g home/myuser/spin/syncable -\\ home/myuser/spin/bigdir/Photos:home/myuser/spin/bigdir/src
# note: pwd is /

这里的想法是获取所有文件/home/myuser/spin/bigdir并遵循两个符号链接:Photos和src.

这需要一天的时间来运行并进行交互:

No space left on device, you have the opportunity to make room now. When ready : can we continue ? [return = YES | Esc = NO]

我的理解是我现在应该能够 umount /mnt/backups/,所以我可以用空卷替换它。没有这样的运气:

⋊> /mnt sudo umount -f /mnt/backups                                                      
umount: /mnt/backups: target is busy.

⋊> /mnt sudo lsof /mnt/backups/                                                          
COMMAND     PID USER   FD   TYPE DEVICE      SIZE/OFF NODE NAME
dar     3129146 root    4u   REG  253,3 1967814266880   12 /mnt/backups/syncable.1.dar

⋊> /mnt sudo pwdx 3129146                                                                                                      
3129146: /

如果不卸载 /mnt/backups ,我将无法用第二个空驱动器替换它,就像在教程中一样。我错过了什么?

backup mount filesystems
  • 1 个回答
  • 24 Views
Martin Hope
royarisse
Asked: 2021-11-19 10:59:43 +0800 CST

用作文件容器的多个循环设备性能不佳

  • 0

目前,我正在管理多个远程服务器的备份服务。备份是通过 rsync 写入的,每个备份都有自己的文件容器作为循环设备安装。主备份分区是 8T xfs 格式,环路设备在 100G 和 600G 之间,采用 ext2 或 ext4 格式。所以,这是简化的类似俄罗斯套娃的解决方案:

df -Th
> /dev/vdb1    xfs   8,0T   /mnt/backups
> /dev/loop1   ext2  100G   /mnt/srv1
> /dev/loop2   ext2  200G   /mnt/srv2

mount
> /dev/vdb1 on /mnt/backups
> /mnt/backups/srv1.ext2 on /mnt/srv1
> /mnt/backups/srv2.ext2 on /mnt/srv2

ls -R /mnt/backups
> /mnt/backups
> └─/mnt/backups/srv1.ext2
> └─/mnt/backups/srv2.ext2

主要问题是读/写速度,它们非常慢。此外,有时一切都会挂起并吃掉我所有的 cpu 和 ram。我可以看到循环设备导致了这种情况。

最近,我开始将容器从 ext4 切换到 ext2,因为我认为我真的不需要日志,希望它能提高速度。我也一直在从稀疏文件切换到非稀疏文件,希望它会降低 cpu/ram 的使用率。但问题仍然存在,有时会导致系统无响应。

因此,我正在寻找具有更快读/写速度的更好解决方案。此外,快速查看每个配置文件使用的磁盘空间也很重要(我df现在可以简单地使用,du会太慢)。从安全的角度来看,循环设备提供的分离很好,但也可以使用 rsync over ssh 来解决,因此不是必需的。

我一直在考虑缩小主 xfs 分区并使文件容器成为真正的 ext4 分区,但是当需要调整第一个分区的大小时,这会带来大量的停机时间。我一直在考虑使用virt-make-fsor sqashfs,因为我可以简单地获取文件大小来获取磁盘使用情况,但没有这些经验。

如果有更好的解决方案,有人有什么想法吗?

debian mount filesystems loop-device
  • 1 个回答
  • 91 Views
Martin Hope
hcr
Asked: 2021-09-03 02:48:10 +0800 CST

NFS:使用服务器上的组控制文件/文件夹访问

  • 1

我觉得问起来有点愚蠢,因为我觉得这是一个非常基本的问题,但无论如何我还没有找到解决方案:

我有一个 Linux 数据服务器和几个使用 NFS 在此数据服务器上安装文件夹的工作站。该系统的设置方式是用户在服务器和工作站上都​​具有相同的 uid。没有集中的用户管理,但帐户是相应计算机上的本地帐户。

现在我想通过为特定目的创建组并将相应的用户添加到服务器上的这些组来控制数据服务器上的文件访问。但是,当在工作站上安装目录时,我面临的问题是组只存在于服务器上,而工作站似乎不知道特定用户是否是服务器上某个组的成员。我想避免在每个工作站上创建所有组,而只在服务器上管理它们。这可能吗?

提前感谢您的任何回复!

linux nfs mount groups file-permissions
  • 1 个回答
  • 121 Views
Martin Hope
james
Asked: 2021-08-14 23:52:29 +0800 CST

NFS 不允许配置中指定的主机挂载共享

  • 1

我遇到了 NFS 拒绝允许在配置文件中指定的主机挂载共享的问题。

我在 Debian 10,BTRFS 文件系统上运行 NFS 服务器。

我的/etc/exports读物:

/share  192.220.189.0/24(rw,sync,no_subtree_check) *.domain.lan(rw,sync,no_subtree_check)

我正在尝试从 挂载host.domain.lan,但是当我尝试挂载共享时,我得到以下信息:

mount.nfs: access denied by server while mounting server.domain.lan:/share

服务器日志显示:

rpc.mountd[PID]: refused mount request from <host.domain.lan's ip> for /share (/share): unmatched host

我已经验证服务器可以解析 host.domain.lan 的主机名,由本地 DNS 服务器提供。

如果我明确指定host.domain.lanin/etc/exports而不是*.domain.lan. 但是,这不会,因为我想将该文件夹提供给 FQDN 的整个子域。

我在网上找不到任何关于此的内容,并且我已经用尽了我能想到的所有选项,请帮助!

nfs domain-name-system mount internal-dns nfs4
  • 1 个回答
  • 468 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve