知乎專欄 | 多維度架構 | 微信號 netkiller-ebook | QQ群:128659835 請註明“讀者” |
目錄
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 的官方網站
過程 74.1. Openfiler Storage Control Center
登錄管理界面
https://<ip address>:446/
初始帳號和密碼是: openfiler/password
首先要修改預設密碼
Accounts->Admin Password
Current Password:
password
New Password:
新密碼
Confirm New Password:
確認密碼
Submit 提交
用戶認證
openfiler.ldif
dn: ou=people,dc=bg7nyt,dc=cn ou: people objectClass: organizationalUnit dn: ou=Idmap,dc=bg7nyt,dc=cn ou: Idmap objectClass: organizationalUnit
添加people組織單元
[chenjingfeng@backup ldap]$ ldapadd -x -D "cn=root,dc=bg7nyt,dc=cn" -W -f openfiler.ldif Enter LDAP Password: adding new entry "ou=people,dc=bg7nyt,dc=cn" adding new entry "ou=Idmap,dc=bg7nyt,dc=cn"
Accounts->Authentication
Use LDAP: 打勾
Server:
ldap.bg7nyt.cn
Base DN:
dc=bg7nyt,dc=cn
Root bind DN:
cn=root,dc=bg7nyt,dc=cn
Root bind Password:
你的密碼
Services->LDAP Settings
Base DN:
dc=bg7nyt,dc=cn
Root bind DN:
cn=root,dc=bg7nyt,dc=cn
Root Password:
你的密碼
Services->Enable/Disable
Accounts->Account Administration
Group Administration
Group Name:
nfs
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 <ou=people,dc=bg7nyt,dc=cn> with scope sub # filter: (objectclass=*) # requesting: ALL # # people, bg7nyt.cn dn: ou=people,dc=bg7nyt,dc=cn ou: people objectClass: organizationalUnit # neo, People, bg7nyt.cn dn: uid=neo,ou=People,dc=bg7nyt,dc=cn objectClass: inetOrgPerson objectClass: posixAccount homeDirectory: /dev/null loginShell: /bin/false cn: neo givenName: neo sn: neo uid: neo uidNumber: 500 gidNumber: 500 # search result search: 2 result: 0 Success # numResponses: 3 # numEntries: 2
卷管理 [Volumes]
我這裡是使用VMware做的試驗,在VMware中增加一些硬碟即可.
Volumes -> Physical Storage Mgmt.
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"
Mode:
Primary
Partition Type:
[Physical volume]
/ [RAID array member]Starting cylinder:
1
Ending cylinder Size:
1044
Size:
自動產生
單擊"Create"創建分區
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
Volumes->Volume Group Mgmt.
Volume Group 可以實現動態擴展空間,注意如果在使用中有一個成員盤損壞,你將無法恢復數據.
應急使用可以,不建議長期使用.
Volume group name:
vg0
Select physical volumes to add:
在列表前面打勾
/dev/sdb1 8.00 GB /dev/sdc1 8.00 GB
單擊"Add volume group"創建vg0
表 74.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]按鈕
分區列表前面打勾
[Submit]提交
Volumes -> Create New Volume
選擇VG
創建卷
Volume Name:
卷名
Volume Description:
描述
Required Space (MB):
配額
Filesystem type:
檔案系統
單擊[Create]按鈕
Openfiler提供軟RAID.
Volumes -> Physical Storage Mgmt.
點擊"Edit Disk"列表內硬碟標籤,之後可以看到"Create a partition in /dev/sdb"
單擊[Create]按鈕創建RAID組成員
單擊[Back to the list of physical storage devices]返回到 "Physical Storage Management"
Volumes -> Software RAID Mgmt.
Select RAID array type:
RAID(0,1,5,6,10)
Select chunk size:
這可以針對你的需求做優化
Select RAID devices to add:
打勾選擇
單擊[Add array]創建RAID
RAID創建完成後,就可以卷組和卷
Volumes -> Volume Group Mgmt. -> Create New Volume
RAID 6 採用雙校驗盤最少4塊硬碟
Volumes -> Create New Volume
單擊[Create]按鈕
單擊[Update]按鈕
Services -> Enable/Disable -> iSCSI target 確認已經 Enable
General -> Local Networks
單擊[Update]按鈕
Volumes -> List of Existing Volumes -> Select Volume Group
單擊 iScsi 卷列表 Properties 下的 [Edit] 連接
預設是:Deny, 修為Allow
開始菜單 找到 Microsoft iSCSI Initiator 並運行
單擊 Discovery 選項卡
單擊 [ Add ] 按鈕
單擊 [ OK ] 按鈕
單擊 Targets 選項卡
單擊 [Refresh] 按鈕 -> [Log On...]
單擊 [ OK ] 按鈕
完成Initiator設置
我的電腦 -> 單擊滑鼠右鍵 -> 管理
初始化硬碟
選擇硬碟
初始化完成,紅色表徵圖消失後你就可以對磁碟分區,掛載卷,格式化。
使用 iSCSI 與使用本地磁碟完全一樣。
Status -> iSCSI