【问题标题】:ceph mount failed with (95) Operation not supportedceph 挂载失败,出现 (95) 不支持操作
【发布时间】:2017-11-02 09:41:15
【问题描述】:

我在服务器“A”和“B”上安装了 ceph,我想从“C”或“D”服务器挂载它。

但我遇到了以下错误。

ceph-fuse[4628]: ceph mount failed with (95) Operation not supported

我的服务器配置如下。

A Server: ubunt16.04(ceph-server) 10.1.1.54
B Server: ubuntu16.04(ceph-server) 10.1.1.138
C Server: AmazonLinux(clinet)
D Server: ubuntu16.04(client)

和 ceph.conf

[global]
fsid = 44f299ac-ff11-41c8-ab96-225d62cb3226
mon_initial_members = node01, node02
mon_host = 10.1.1.54,10.1.1.138
auth cluster required = none
auth service required = none
auth client required = none
auth supported = none
osd pool default size = 2
public network = 10.1.1.0/24

Ceph 也已正确安装。

头孢健康

HEALTH_OK

ceph -s

  cluster 44f299ac-ff11-41c8-ab96-225d62cb3226
     health HEALTH_OK
     monmap e1: 2 mons at {node01=10.1.1.54:6789/0,node02=10.1.1.138:6789/0}
            election epoch 12, quorum 0,1 node01,node02
     osdmap e41: 2 osds: 2 up, 2 in
            flags sortbitwise,require_jewel_osds
      pgmap v100: 64 pgs, 1 pools, 306 bytes data, 4 objects
            69692 kB used, 30629 MB / 30697 MB avail
                  64 active+clean

使用 ceph-fuse 命令时出错。

sudo ceph-fuse -m 10.1.1.138:6789 /mnt/mycephfs/ --debug-auth=10 --debug-ms=10
ceph-fuse[4628]: starting ceph client
2017-11-02 08:57:22.905630 7f8cfdd60f00 -1 init, newargv = 0x55779de6af60 newargc=11
ceph-fuse[4628]: ceph mount failed with (95) Operation not supported
ceph-fuse[4626]: mount failed: (95) Operation not supported

我收到一条错误消息,提示“ceph mount failed with (95) Operation not supported”

我添加了一个选项“--auth-client-required=none”

sudo ceph-fuse -m 10.1.1.138:6789 /mnt/mycephfs/ --debug-auth=10 --debug-ms=10 --auth-client-required=none
ceph-fuse[4649]: starting ceph client
2017-11-02 09:03:47.501363 7f1239858f00 -1 init, newargv = 0x5597621eaf60 newargc=11

行为改变,这里没有响应。

如果不使用 ceph-fuse 命令,我会收到以下错误。

sudo mount -t ceph 10.1.1.138:6789:/ /mnt/mycephfs

can't read superblock

不知何故,即使使用“auth supported = none”,似乎也需要向客户端进行身份验证

在那种情况下,如何通过服务器“c”或“d”的身份验证?

如果有身份验证以外的可能原因,请告诉我。

【问题讨论】:

    标签: storage ceph


    【解决方案1】:

    我认为您需要更多步骤,例如格式化文件系统,所以 你应该再次检查你的安装步骤,Ceph 对每个服务都有多个组件,例如对象存储、块存储、文件系统和 API。每个服务都需要其配置步骤。

    此安装指南对您的案例很有帮助。

    https://github.com/infn-bari-school/cloud-storage-tutorials/wiki/Ceph-cluster-installation-(jewel-on-CentOS)

    如果您想构建 Ceph 文件系统进行测试,您可以按照以下安装步骤构建小型 CephFS。 步骤和CLI用法的细节我就略过,你可以从官方文档中获取更多信息。

    环境信息

    • Ceph 版本:Jewel,10.2.9
    • 操作系统:CentOS 7.4

    安装 Ceph 文件系统之前的先决条件。

    • 此配置需要4个节点,

      • ceph-admin 节点:部署监视器、元数据服务器
      • ceph-osd0:osd 服务
      • ceph-osd1:osd 服务
      • ceph-osd2:osd 服务
    • 启用 NTP - 所有节点

    • 用于部署 ceph 组件的操作系统用户需要升级权限设置(例如 sudoers)
    • SSH 公钥配置(方向:ceph-admin -> OSD 节点)

    在 ceph-admin 管理节点上安装 ceph-deploy 工具。

    # yum install -y ceph-deploy

    为 Ceph 文件系统部署所需的 Ceph 组件

    1. 使用普通操作系统用户在 ceph-admin 管理节点上创建集群(用于部署 ceph 组件)

      $ mkdir ./cluster

      $ cd ./cluster

      $ ceph-deploy new ceph-admin

    2. 修改ceph.conf到集群目录。

      $ vim ceph.conf

      [global]

      ..snip...

      mon_initial_members = ceph-admin

      mon_host = $MONITORSERVER_IP_OR_HOSTNAME

      auth_cluster_required = cephx

      auth_service_required = cephx

      auth_client_required = cephx

      # the number of replicas for objects in the pool, default value is 3

      osd pool default size = 3

      public network = $YOUR_SERVICE_NETWORK_CIDR

    3. 为相关节点安装monitor和osd服务。

      $ ceph-deploy install --release jewel ceph-admin ceph-osd0 ceph-osd1 ceph-osd2

    4. 启动监控服务

      $ ceph-deploy mon create-initial

    5. 创建 OSD 设备

      ceph-deploy osd list ceph-osd{0..2}:vdb

    为 Ceph 文件系统服务添加元数据服务器组件。

    1. 添加元数据服务器(该服务只需要 Ceph 文件系统)

      ceph-deploy mds create ceph-admin

    2. 检查状态

      ceph mds stat

    3. 为 cephFS 创建池

      ceph osd pool create cephfs_data_pool 64

      ceph osd pool create cephfs_meta_pool 64

    4. 创建 ceph 文件系统

      ceph fs new cephfs cephfs_meta_pool cephfs_data_pool

    挂载 Ceph 文件系统

    1. 节点上需要安装 ceph-fuse 包。

    2. 挂载为 cephFS

      ceph-fuse -m MONITOR_SERVER_IP_OR_HOSTNAME:PORT_NUMBER <LOCAL_MOUNTPOINT>

    结束...

    【讨论】:

    • 如果您可以阅读文档并提取答案并在此处发布而不是发布 URL,那就更好了。如果将来链接失效。这个答案也无效。
    【解决方案2】:

    我通过修复三个设置解决了这个问题。

    1.

    ceph.conf中的auth设置返回如下

    auth cluster required = cephx
    auth service required = cephx
    auth client required = cephx
    

    2.

    公网出错了。

    public network = 10.1.1.0/24
    

    public network = 10.0.0.0/8
    

    我的客户端 IP 地址是 10.1.0.238... 这是一个愚蠢的错误。

    3.

    我将 secret 选项更改为 secretfile 选项,一切都很好。

    在这种情况下,它失败了。

    sudo mount -t ceph 10.1.1.138:6789:/ /mnt/mycephfs -o name=client.admin,secret=`sudo ceph-authtool -p /etc/ceph/ceph.client.admin.keyring`
    

    输出:

    mount error 1 = Operation not permitted
    

    但在这种情况下,它是成功的。

    sudo mount -vvvv -t ceph 10.1.1.138:6789:/ /mnt/mycephfs -o name=admin,secretfile=admin.secret
    

    输出:

    parsing options: rw,name=admin,secretfile=admin.secret
    mount: error writing /etc/mtab: Invalid argument
    

    ※ Invalid argument 该错误似乎被忽略了。

    显然,两者是同一个键。

    sudo ceph-authtool -p /etc/ceph/ceph.client.admin.keyring
    AQBd9f9ZSL46MBAAqwepJDC5tuIL/uYp0MXjCA==
    
    
    cat admin.secret 
    AQBd9f9ZSL46MBAAqwepJDC5tuIL/uYp0MXjCA==
    

    我不知道原因,但我可以使用 secretfile 选项挂载。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2022-10-25
      • 1970-01-01
      • 2020-10-12
      • 1970-01-01
      • 1970-01-01
      • 2020-05-24
      • 1970-01-01
      相关资源
      最近更新 更多