博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
第 75 章 Network Attached Storage(NAS 网络附加存储)
阅读量:7073 次
发布时间:2019-06-28

本文共 5220 字,大约阅读时间需要 17 分钟。

75.1. Network Storage - Openfiler

Openfiler is a powerful, intuitive browser-based network storage software distribution. Openfiler delivers file-based Network Attached Storage and block-based Storage Area Networking in a single framework.

openfiler 的官方网站

过程 75.1. Openfiler Storage Control Center

  1. 登录管理界面

    https://
    :446/

    初始帐号和密码是: openfiler/password

  2. 首先要修改默认密码

    Accounts->Admin Password

    Current Password:  passwordNew Password:  新密码Confirm New Password:  确认密码

    Submit 提交

75.1.1. Accounts

  • 用户认证

    openfiler.ldif

    dn: ou=people,dc=bg7nyt,dc=cnou: peopleobjectClass: organizationalUnitdn: ou=Idmap,dc=bg7nyt,dc=cnou: IdmapobjectClass: organizationalUnit

    添加people组织单元

    [chenjingfeng@backup ldap]$ ldapadd -x -D "cn=root,dc=bg7nyt,dc=cn" -W -f openfiler.ldifEnter LDAP Password:adding new entry "ou=people,dc=bg7nyt,dc=cn"adding new entry "ou=Idmap,dc=bg7nyt,dc=cn"
    1. Accounts->Authentication

      Use LDAP: 打勾

      Server:  ldap.bg7nyt.cnBase DN:  dc=bg7nyt,dc=cnRoot bind DN:  cn=root,dc=bg7nyt,dc=cnRoot bind Password:  你的密码
    2. Services->LDAP Settings

      openfiler_services_ldap.png
      Base DN:  dc=bg7nyt,dc=cnRoot bind DN:  cn=root,dc=bg7nyt,dc=cnRoot Password:  你的密码
    3. Services->Enable/Disable

      openfiler_services_en_dis.png
    4. Accounts->Account Administration

      1. Group Administration

        Group Name: nfs
      2. User Administration

        Username: 用户名Password: 密码Retype password: 确认密码Primary Group: 用户组

        查看组织单元:ou=people,dc=bg7nyt,dc=cn

        [chenjingfeng@backup ldap]$ ldapsearch -x -b 'ou=people,dc=bg7nyt,dc=cn'# extended LDIF## LDAPv3# base 
        with scope sub# filter: (objectclass=*)# requesting: ALL## people, bg7nyt.cndn: ou=people,dc=bg7nyt,dc=cnou: peopleobjectClass: organizationalUnit# neo, People, bg7nyt.cndn: uid=neo,ou=People,dc=bg7nyt,dc=cnobjectClass: inetOrgPersonobjectClass: posixAccounthomeDirectory: /dev/nullloginShell: /bin/falsecn: neogivenName: neosn: neouid: neouidNumber: 500gidNumber: 500# search resultsearch: 2result: 0 Success# numResponses: 3# numEntries: 2

75.1.2. Volumes

  • 卷管理 [Volumes]

    我这里是使用VMware做的试验,在VMware中增加一些硬盘即可.

    1. Volumes -> Physical Storage Mgmt.

      openfiler_volumes_physical.png
      Edit Disk Type Description Size Label type Partitions/dev/sda SCSI VMware, VMware Virtual S 8.00 GB msdos 3 (view)/dev/sdb SCSI VMware, VMware Virtual S 8.00 GB gpt 0 (view)/dev/sdc SCSI VMware, VMware Virtual S 8.00 GB gpt 0 (view)/dev/sdd SCSI VMware, VMware Virtual S 8.00 GB gpt 0 (view)...

      openfiler安装在/dev/sda,/dev/sda硬盘空间不用太大,单独给openfiler使用.建议做RAID 1(硬件RAID卡或服务器主版提供的RAID)

      其它硬盘是用于存储的硬盘,如果有条件这些硬盘组也最好做成硬RAID,没有条件我们可以在openfiler中做软件RAID.

      点击"Edit Disk"列表内硬盘标签,之后可以看到"Create a partition in /dev/sdb"

      openfiler-volumes-1.png
      Mode: PrimaryPartition Type: [Physical volume] / [RAID array member]Starting cylinder: 1Ending cylinder Size: 1044Size: 自动产生

      单击"Create"创建分区

      openfiler-volumes-2.png

      Back to the list of physical storage devices

      如果没有特别需求,不需要创建多个分区.

      Edit partitions in /dev/sdb (1044 cylinders with "gpt" label)Device Type Number Start cyl End cyl Blocks Size Type Delete/dev/sdb1 Linux Physical Volume (0x8e) 1 1 10 78831 76.98 MB Primary Delete/dev/sdb2 Linux Physical Volume (0x8e) 2 10 100 721920 705.00 MB Primary Delete/dev/sdb3 Linux Physical Volume (0x8e) 3 100 200 801792 783.00 MB Primary Delete/dev/sdb4 Linux Physical Volume (0x8e) 4 200 300 802816 784.00 MB Primary Delete/dev/sdb5 Linux Physical Volume (0x8e) 5 300 400 801792 783.00 MB Primary Delete
    2. Volumes->Volume Group Mgmt.

      Volume Group 可以实现动态扩展空间,注意如果在使用中有一个成员盘损坏,你将无法恢复数据.

      应急使用可以,不建议长期使用.

      openfiler-vg-0.png
      Volume group name: vg0Select physical volumes to add: 在列表前面打勾/dev/sdb1 8.00 GB/dev/sdc1 8.00 GB

      单击"Add volume group"创建vg0

      openfiler-vg-1.png

      表 75.1. Volume Group Management

      Volume Group Name Size Allocated Free Members Add physical storage Delete VG
      vg0

      15.94 GB

      0 bytes 15.94 GB View member PVs Add PVs Delete

      扩展Volume Group单击[PVs Add]按钮

      openfiler-vg-2.png

      分区列表前面打勾

      [Submit]提交

    3. Volumes -> Create New Volume

      选择VG

      openfiler_cnv_svg.png

      创建卷

      openfiler_cnv_cv.png
      Volume Name: 卷名Volume Description: 描述Required Space (MB): 配额Filesystem type: 文件系统

      单击[Create]按钮

      openfiler_cnv_loev.png

75.1.2.1. RAID

Openfiler提供软RAID.

  1. Volumes -> Physical Storage Mgmt.

    openfiler_volumes_physical.png

    点击"Edit Disk"列表内硬盘标签,之后可以看到"Create a partition in /dev/sdb"

    openfiler_raid_array_member.png

    单击[Create]按钮创建RAID组成员

    openfiler_volumes_physical_edit_partitio

    单击[Back to the list of physical storage devices]返回到 "Physical Storage Management"

  2. Volumes -> Software RAID Mgmt.

    openfiler_volumes_raidmanage.png
    Select RAID array type: RAID(0,1,5,6,10)Select chunk size: 这可以针对你的需求做优化Select RAID devices to add: 打勾选择

    单击[Add array]创建RAID

    openfiler_volumes_raidmanage1.png

    RAID创建完成后,就可以卷组和卷

    Volumes -> Volume Group Mgmt. -> Create New Volume

    RAID 6 采用双校验盘最少4块硬盘

75.1.2.2. iSCSI

Volumes -> Create New Volume

openfiler_volumes_create_iscsi.png

单击[Create]按钮

openfiler_volumes_loev_iscsi.png

单击[Update]按钮

Services -> Enable/Disable -> iSCSI target 确认已经 Enable

General -> Local Networks

openfiler_general_local_networks.png

单击[Update]按钮

Volumes -> List of Existing Volumes -> Select Volume Group

单击 iScsi 卷列表 Properties 下的 [Edit] 连接

openfiler_volumes_iscsi_access.png

默认是:Deny, 修为Allow

75.1.2.2.1. Microsoft iSCSI Software Initiator

开始菜单 找到 Microsoft iSCSI Initiator 并运行

单击 Discovery 选项卡

单击 [ Add ] 按钮

ms_iscsi_add_target_portal.png

单击 [ OK ] 按钮

ms_iscsi_discovery.png

单击 Targets 选项卡

ms_iscsi_targets.png

单击 [Refresh] 按钮 -> [Log On...]

ms_iscsi_logon.png

单击 [ OK ] 按钮

完成Initiator设置

我的电脑 -> 单击鼠标右键 -> 管理

ms_iscsi_disk_manager.png

初始化硬盘

ms_iscsi_disk_initial.png

选择硬盘

ms_iscsi_disk_select.png

初始化完成,红色图标消失后你就可以对磁盘分区,挂载卷,格式化。

使用 iSCSI 与使用本地磁盘完全一样。

Status -> iSCSI

75.1.3. Quota

  • [注意] 注意

    有些文件系统不支持Quota

    1. Quota -> Guest Quota

      openfiler_quota_sv.png

      单击[Change]按钮

      openfiler_quota_guest.png

      单击[Apply]按钮

75.1.4. Shares

  • Shares

    openfiler_share.png

    单击列表内的连接.

    openfiler_share_subfolder.png
    Folder name: 输入文件夹名

    单击 [Create Sub-folder] 按钮 创建文件夹

    openfiler_share_make_share.png
    Share name: 输入共享名Share description: 描述Override SMB share name:
    openfiler_share_edit.png

    单击[Change]按钮 修改

    组的权限制

    openfiler_share_group_access.png

    单击[Update]按钮

    主机访问权限配置

    openfiler_share_host.png

    单击[Update]按钮

原文出处:Netkiller 系列 手札

本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。

你可能感兴趣的文章