Menu

7/24/25

Dựng NFS server (Almalinux) làm datastore cho EXSI 8

 Cập nhật hệ thống:

sudo dnf update -y

Cài đặt NFS Utilities:

sudo dnf install -y nfs-utils

Kích hoạt và khởi động dịch vụ NFS:

sudo systemctl enable nfs-server rpcbind 

sudo systemctl start nfs-server rpcbind

Kiểm tra trạng thái:

sudo systemctl status nfs-server rpcbind

Cấu hình FirewallD:

sudo firewall-cmd --permanent --add-service=nfs 

sudo firewall-cmd --permanent --add-service=rpc-bind

 sudo firewall-cmd --permanent --add-service=mountd sudo firewall-cmd --reload

Bạn có thể kiểm tra các dịch vụ đã được thêm:

sudo firewall-cmd --list-all

Tạo thư mục chia sẻ NFS: Tạo một thư mục mới sẽ được chia sẻ cho ESXi. Ví dụ: /exports/datastore_NFS

sudo mkdir -p /exports/datastore_NFS

Gán quyền cho thư mục chia sẻ:

sudo chown nobody:nobody /exports/datastore_NFS

sudo chmod 777 /exports/datastore_NFS

Chỉnh sửa file /etc/exports:

sudo vi /etc/exports

/exports/datastore_NFS 192.168.1.0/24(rw,sync,no_root_squash)

Áp dụng thay đổi: sudo exportfs -ra

Kiểm tra chia sẻ: showmount -e localhost

Nhập thông tin Datastore trên EXSI:

Nhập thông tin NFS Datastore trên EXSI 8 hoặc Vcenter

  • Name: Đặt tên cho Datastore của bạn (ví dụ: AlmaLinux_NFS_DS01).

  • Folder: Nhập đường dẫn thư mục mà bạn đã chia sẻ trên AlmaLinux. Phải khớp chính xác với đường dẫn trong /etc/exports. Ví dụ: /exports/datastore01.

  • Server: Nhập địa chỉ IP hoặc hostname của AlmaLinux VM (NFS Server).

Nhấp Next.