我正在研究 HPC 应用程序和并行文件系统。我遇到了术语暂存空间和暂存文件系统。
我无法想象这个暂存空间存在于哪里。它是作为挂载文件系统 /scratch 在计算节点上还是在主存储空间上。
其内容是什么。
暂存空间在每个计算节点上是否独立,或者两个或多个节点可以共享单个暂存空间。
假设我有一个文件 123.txt 我想并行处理。暂存空间将包含该文件的部分内容还是将复制整个文件。
我很困惑,谷歌上没有任何地方有明确的描述。请大家指点一下。
多谢。
找不到功能'nfs_mount'.这是用户永远不会看到的内部错误.请报告错误.
Cmd
C:\var\www\cc-dev-env>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/trusty64' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
    default: Adapter 2: hostonly
==> default: Forwarding ports...
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine …我正在复制控制器示例 [1] 中尝试 Kubernetes NFS 卷声明。
我已经设置了 NFS 服务器、PV 和 PVC。我的复制控制器看起来像这样
apiVersion: v1
kind: ReplicationController
metadata:
  name: node-manager
  labels:
    name: node-manager
spec:
  replicas: 1
  selector:
    name: node-manager
  template:
    metadata:
      labels:
        name: node-manager
    spec:
      containers:
      -
        name: node-manager
        image: org/node-manager-1.0.0:1.0.0
        ports:
        -
          containerPort: 9763
          protocol: "TCP"
        -
          containerPort: 9443
          protocol: "TCP"
        volumeMounts:
          - name: nfs
            mountPath: "/mnt/data"
      volumes:
      - name: nfs
        persistentVolumeClaim:
          claimName: nfs
当我尝试部署Replication Controller时,容器处于ContainerCreating状态,我可以在minion的日志中看到以下错误
Feb 26 11:39:41 node-01 kubelet[1529]: Mounting arguments: 172.17.8.102:/ /var/lib/kubelet/pods/0e66affa-dc79-11e5-89b3-080027f84891/volumes/kubernetes.io~nfs/nfs nfs []
Feb 26 11:39:41 node-01 …我正在使用 docker NFS 容器,但在安装导出的目录(甚至在本地主机上)时遇到问题。
exportfs: <path> does not support NFS export
我的容器使用入口点脚本来
/etc/exports,rpcbindand service nfs-kernel-server start, andinotifywait继续运行。Dockerfile 没什么特别的。我安装inotify-tools并nfs-kernel-server公开端口 2049,并复制入口点脚本。
docker-machine我正在El Capitan Macbook 上使用。
我将卷从主机映射到容器中,以使 nfs 服务器能够访问我想要导出的目录。
modprobe nfs
modprobe nfsd
for x in ${@}; do
   echo -e "$x\t*(rw,sync,no_subtree_check,crossmnt,fsid=root,no_root_squash)" >> /etc/exports
done
source /etc/default/nfs-kernel-server
source /etc/default/nfs-common
rpcbind
service nfs-kernel-server start
exec inotifywait --monitor /exports
这是我尝试导出的设置。
%> ls $HOME/mounts
a
%> ls $HOME/mounts/a …我results.txt在服务器上有一个文件,多个 VM 通过 NFS 访问该文件。一个进程在每个 VM 上运行,它读取results.txt文件并修改它。如果两个进程,A和B,同时读取文件,则 A 或 B 的修改将results.txt根据进程写入文件的顺序出现。
如果进程A对文件有写锁,则进程B必须等到锁被释放才能读取results.txt文件。
我曾尝试使用 Python 实现这一点:
import fcntl
f = open("/path/result.txt")
fcntl.flock(f,fcntl.LOCK_EX)
#code
它对本地磁盘上的文件按预期工作。
但是当我运行尝试锁定挂载路径上的文件时,出现以下错误:
Traceback (most recent call last):
  File "lock.py", line 12, in <module>
    fcntl.flock(f,fcntl.LOCK_EX)
IOError: [Errno 45] Operation not supported 
我试过了fcntl.fcntl,fcntl.flock但得到了同样的错误。这是我使用方式的问题fcntl吗?存储文件的服务器是否需要任何配置?
编辑:
这就是我使用的方式fcntl.fcntl:
f= open("results.txt")
lockdata = struct.pack('hhllhh', fcntl.F_RDLCK,0,0,0,0,0)
rv = fcntl.fcntl(f, fcntl.F_SETLKW, lockdata) …我的 docker 引擎在 Ubuntu 16 上运行。
我尝试基于以下内容设置 NFS 服务器:使用https://github.com/ErezHorev/dockerized_nfs_server/blob/master/docker/Dockerfile
NFS 服务器正在运行。容器IP为172.17.0.2
但我无法安装在同一个容器或其他容器中。
错误 :
root@71d5a4bc32bc:/#  mount -v -t nfs -o proto=tcp,port=2049 172.17.0.2:/exports/opt /mnt
mount.nfs: timeout set for Tue Aug  9 13:06:36 2016
mount.nfs: trying text-based options 'proto=tcp,port=2049,vers=4,addr=172.17.0.2,clientaddr=172.17.0.2'
mount.nfs: mount(2): Operation not permitted
mount.nfs: trying text-based options 'proto=tcp,port=2049,addr=172.17.0.2'
mount.nfs: prog 100005, trying vers=3, prot=6
mount.nfs: portmap query failed: RPC: Program not registered
**mount.nfs: requested NFS version or transport protocol is not supported**
调试
root@71d5a4bc32bc:/# rpcinfo
   program version netid     address                service …我正在尝试将 AWS EFS 挂载到我的本地 macbook(还有其他本地计算机)但是,在尝试了很多事情之后,它不起作用。
我的端口 22 和 2049 作为测试是完全开放的。
我尝试了几个命令 
mount -t nfs4 -o nfservers=4.1 xxx.xxx.xxx.xxx:/ efs/
但我不断收到connection timed out错误。
我还尝试将此 EFS 安装到另一个 AWS 帐户 EC2 实例。但不断得到同样的错误。
例如。我在 Account1 中有 EFS,在 Account2(不同的 VPC)中有 EC2 并尝试
sudo mount -t nfs4 -o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2 xxx.xxx.xxx.xxx:/ /efs/
它不工作。
它仅适用于我的 EC2 在同一个帐户(即 account1)中的情况。
有没有办法可以在不同的帐户或本地计算机上安装这个 EFS?
做了很多谷歌搜索和 AWS 论坛搜索......但没有运气。
encrypting-file-system nfs amazon-ec2 amazon-web-services amazon-efs
我在 pod 中创建了一个 nfs 服务器以将其用作卷。使用卷创建另一个 pod 时,卷挂载确实使用 nfs pod 的 ip。由于这个ip不能保证保持不变,我为我的nfs pod添加了一个服务并添加了一个固定的集群ip。使用卷挂载启动容器时,它总是失败并显示以下错误:
无法为 pod“nginx_default(35ecd8ec-a077-11e8-b7bc-0cc47a9aec96)”挂载卷:等待卷挂载或挂载 pod“default”/“nginx”超时超时。卸载卷列表=[nfs-demo]。未附加卷列表=[nfs-demo nginx-test-account-token-2dpgg]
    apiVersion: v1
    kind: Pod
    metadata:
      name: nfs-server
      labels:
        name: nfs-server
    spec:
      containers:
      - name: nfs-server
        image: my-nfs-server:v1
        args: ["/exports"]
        securityContext:
          privileged: true
    ---
    kind: Service
    apiVersion: v1
    metadata:
      name: nfs-service
    spec:
      selector:
        name: nfs-server
      clusterIP: "10.96.0.3"
      ports:
        - name: nfs
          port: 2049
          protocol: UDP
        - name: mountd
          port: 20048
          protocol: UDP   
        - name: rpcbind
          port: 111
          protocol: UDP
        - name: nfs-tcp
          port: 2049
          protocol: …我正在尝试在 docker 容器中挂载 NFS 共享,但我无法这样做,因为在 rootlesskit 下运行的容器没有在主机上使用升级权限的权限。
有没有办法使用 rootlesskit 挂载共享或以某种方式修改 rootlesskit?
问题是这样的:我们有几个 microk8s 集群运行在不同的网络上;但每个人都可以访问我们的 NAS 所在的存储网络。
在 Kubernetes 中,我们使用 nfs-provisioner (nfs-externalsubdir) 创建磁盘。有些磁盘是使用指定的 NAS 服务器的 IP 创建的。当我们需要更改IP时,我们发现磁盘与IP绑定了,更改IP意味着在其中创建新的存储资源。
为了避免这种情况,我们希望能够在 Kubernetes 集群级别设置 DNS 记录,以便我们可以使用 nfs 配置程序基于名称而不是 IP 创建存储资源,并且我们可以在需要时更改 DNS 记录(当例如,我们升级或迁移我们的外部 NAS 设备)例如,我想告诉每个 microk8s 环境:
192.168.1.4 my-nas.mydomain.local
...就像我在 /etc/hosts 文件中一样。
有没有正确的方法来实现这一目标?我尝试遵循此链接上的建议:Is there a way to add randomrecords to kube-dns? (答案被赞成 15 次,集群部分),重新启动部署,但它不起作用
我无法使用 hostAliases 功能,因为我们使用的每个图表上并未提供该功能,这就是我正在寻找更全局的解决方案的原因。
此致,
nfs ×10
docker ×3
kubernetes ×3
vagrant ×2
amazon-ec2 ×1
amazon-efs ×1
containers ×1
coredns ×1
fcntl ×1
file-locking ×1
filesystems ×1
hpc ×1
linux ×1
lustre ×1
macos ×1
nfsclient ×1
python ×1
python-2.7 ×1
root ×1
rootless ×1
vagrantfile ×1
virtualbox ×1