You are on page 1of 5

1.

Initial Setup
Sau khi cài đặt (FreeNAS 8.3.0), reboot lại server FreeNAS
Cấu hình Network Interface (nếu cần). Xem IP của FreeNAS server. Giả sử là 192.168.1.62

2. Truy cập vào FreeNAS server từ trình duyệt:


http://192.168.1.62

3. Vì các đĩa lưu trữ (storage disks) tách biệt khỏi hệ điều hành FreeNAS, nên sẽ không có hệ
thống NAS cho đến khi nào bạn cấu hình các đĩa (disks) thành ít nhất một volume.
– Volume: được tạo từ 1 hoặc nhiều disks

4. Tạo volume
Storage/ Volume Manager:
Volume name: vol1
Member disk: chọn ổ đĩa
Filesystem type: ZFS (mặc dù định dạng ZFS, nhưng ta có thể chia sẻ volume này đồng thời cho
cả Windows và Linux, Unix, Mac…)
Sau khi tạo ra, vol1 được mount vào /mnt/vol1

5. Chia sẻ vol1 cho Windows


Sharing/ Windows (CIFS)/ Add Windows (CIFS) Share
Name: data
Path: /mnt/vol1
Khởi động service CIFS trong Sevices/ Control Services

Đăng nhập vào Windows XP, truy cập vào \\192.168.1.62\data để sử dụng hoặc ánh xạ ổ đĩa.

6. Chia sẻ vol1 cho Unix/Linux (NFS)


Sharing/ Unix (NFS) Shares/ Add Unix (NFS) Share
Comment: for Linux users
Khởi động service NFS trong Services/ Control Services

Đăng nhập vào máy Linux tạo thư mục mới và mount vol1:
# mkdir /mnt/temp
# mount 192.168.1.62:/mnt/vol1 /mnt/temp

7. Tương tự có thể tạo volume vol2 từ 2 ổ đĩa và dùng mirror


Storage/ Volume Manager
Volume name: vol2
Member disk: chọn 2 ổ đĩa có cùng dung lượng
Filesystem type: ZFS
Group type: mirror

——————————-
/* Sử dụng iCSI trên FreeNAS */
Một số thuật ngữ trước khi cấu hình:
– iSCSI: là một chuẩn giao thức để thống nhất việc lưu trữ dữ liệu. iSCSI cho phép FreeNAS
đóng vai trò như một SAN (Storage Area Network) trên một mạng Ethernet.
– CHAP/ Mutual CHAP: phương thức xác thực dùng khóa bí mật chia sẻ (shared secret).
-  Initiator: client có quyền truy cập dữ liệu chia sẻ trên FreeNAS. Cần phải có phần mềm kết nối
initiator.
– Target: là một tài nguyên (storage resource) lưu trữ trên FreeNAS.
– Extent: đơn vị lưu trữ (storage unit) được chia sẻ. Có thể là một file hoặc một thiết bị lưu trữ
(như ổ đĩa vật lý chẳng hạn).
– LUN: đại diện cho một thiết bị SCSI logic.
– Initiator thương lượng với một target để thiết lập kết nối đến LUN. Khi đó kết nối iSCSI được
giả lập như một kết nối đến ổ đĩa cứng SCSI. Kết quả là Initiator xem iSCSI LUNs tương tự như
một ổ đĩa SCSI hoặc IDE vật lý cục bộ (thay vì là một thư mục chia sẻ từ xa). Do đó, initiator có
thể format và quản lý filesystem trực tiếp trên iSCSI LUNs.
1. Cấu hình Authorized Accesses (để xác thực giữa iSCSI server và iSCSI client qua giao thức
CHAP)
Services/ iSCSI/ Authorized Accesses
Group ID: 1
User: initiator (user account initiator được tạo trên FreeNAS, password tối thiểu 12 ký tự)
Secret: abcdef123456 (password của user initiator, tối thiểu 12 ký tự)

2. Tạo device extent


Services/ iSCSI/ Device Extents/ Add Device Extent
Extent Name: extent1
Comment: shared device for Windows clients
Disk device: chọn ổ đĩa vật lý tương ứng

3.

4. Tạo initiator
Services/ iSCSI/ Initiators/ Add Initiator
Initiators:
Authorized network:

5. Tạo portal (để chỉ ra địa chỉ ip & port của interface mà các iSCSI client được phép kết nối
vào)
Services/ iSCSI/ Portals/ Add Portals
Comment:
IP Address: 0.0.0.0 (cho tất cả các interface)
Port: 3260

6. Cấu hình Target Global Configuration


Services/ iSCSI/ Target Global Configuration
Discovery Auth Method: CHAP
Discovery Auth Group: 1 (chính là Group ID được tạo trong Authorized Accesses)
Enable LUC: checked
Controller IP address: 127.0.0.1
Controller TCP port: 3621
Controoler Authorized Network: 127.00.0/8
Controller Auth Method: CHAP
Controller Auth Group: 1

7. Tạo target
Services -> iSCSI -> Targets -> Add Target
Target Name: target1
Portal Group ID: 1 (tạo ở bước Portal)
Initiator Group ID: 1 (tạo ở bước Initiator)
Auth Method: CHAP
Authentication Group: 1

8. Kết nối Targets/ Extents


Services -> iSCSI -> Targets/ Extents -> Add Targets/ Extents
Target: target1
Extent: extent1

9. Khởi động service iSCSI


Services -> Control Services -> iSCSI on

10. Kết nối từ iSCSI client (Initiator) Windows XP


– Download & cài đặt gói Microsoft iSCSI Software Initiator Version 2.08 từ link:
http://www.microsoft.com/en-us/download/details.aspx?id=18986

– Chạy chương trình Microsoft iSCSI Initiator -> tab Discovery -> Add -> Nhập IP của iSCSI là
192.168.1.62 -> Click Advanced… ->
Chọn CHAP logon information:
User name: initiator
Targrt secret: abcdef123456
-> OK -> OK

– Chuyển sang tab Targets -> chọn Target tương ứng -> Log On…

– Vào Computer Management -> sẽ thấy một ổ đĩa vật lý mới -> Format và sử dụng bình thường
như ổ đĩa local (mặc dù nó nằm trên FreeNAS được kết nối qua giao thức iSCSI)

Goog luck!

khoivd

Advertisements
Report this ad
Report this ad

Share this:
 Nhấn để chia sẻ trên Twitter (Opens in new window)
 Click to share on Facebook (Opens in new window)

Liên quan

Cấu hình RAID trên CentOSIn "Hệ thống"

Cấu hình Disk Quota trên CentOSIn "Hệ thống"

Log trên hệ thống LinuxIn "Hệ thống"

Filed under Bảo mật, Hệ thống, Unix-Linux Tagged with freenas, iSCSI

Trả lời

Tìm kiếm cho:

Bài viết mới

 Linux Netcat command – The swiss army knife of networking


 iptables: SNAT & DNAT
 5 phút đầu khi xử lý sự cố trên server
 FreeNAS–Một số cấu hình
 Tham khảo–02/2012

Chuyên mục

 Bảo mật
 Hệ thống
 Kỹ năng mềm
 Kiến thức
 Tham khảo
 Tin tức
 Unix-Linux

Thư viện

 Tháng Tư 2013
 Tháng Ba 2013
 Tháng Hai 2012
 Tháng Một 2012
 Tháng Mười Hai 2011
 Tháng Mười Một 2011
 Tháng Mười 2011

Meta

 Đăng ký
 Đăng nhập
 RSS cho bài viết
 Dòng thông tin các phản hồi.
 WordPress.com

Advertisements
Report this ad

Tạo một website miễn phí hoặc 1 blog với WordPress.com.

 Theo dõi

You might also like