Warning: session_start(): Session cannot be started after headers have already been sent in /home/onetcomvn/public_html/wp-content/themes/Onetv2/functions.php on line 6

Deprecated: Optional parameter $post_id declared before required parameter $field is implicitly treated as a required parameter in /home/onetcomvn/public_html/wp-content/themes/Onetv2/inc/acf/includes/acf-value-functions.php on line 54

Deprecated: Optional parameter $value declared before required parameter $field is implicitly treated as a required parameter in /home/onetcomvn/public_html/wp-content/themes/Onetv2/inc/acf/includes/acf-value-functions.php on line 166

Deprecated: Optional parameter $post_id declared before required parameter $field is implicitly treated as a required parameter in /home/onetcomvn/public_html/wp-content/themes/Onetv2/inc/acf/includes/acf-value-functions.php on line 166

Deprecated: Optional parameter $key declared before required parameter $value is implicitly treated as a required parameter in /home/onetcomvn/public_html/wp-content/themes/Onetv2/inc/acf/includes/ajax/class-acf-ajax.php on line 76

Notice: Function register_sidebar được gọi không chính xác. Không có đối số id cho sidebar "Right Sidebar". Mặc định là "sidebar-1". Hãy đặt id là "sidebar-1" để tắt thông báo này và giữ nội dung hiện tại của sidebar. Vui lòng xem Hướng dẫn Debug trong WordPress để biết thêm thông tin. (Thông điệp này đã được thêm vào trong phiên bản 4.2.0.) in /home/onetcomvn/public_html/wp-includes/functions.php on line 6031

Warning: Undefined array key "ac" in /home/onetcomvn/public_html/wp-content/themes/Onetv2/functions.php on line 796

Deprecated: Optional parameter $i declared before required parameter $post_id is implicitly treated as a required parameter in /home/onetcomvn/public_html/wp-content/themes/Onetv2/inc/acf/pro/fields/class-acf-field-repeater.php on line 720

Deprecated: Optional parameter $i declared before required parameter $post_id is implicitly treated as a required parameter in /home/onetcomvn/public_html/wp-content/themes/Onetv2/inc/acf/pro/fields/class-acf-field-repeater.php on line 786

Deprecated: Optional parameter $name declared before required parameter $field is implicitly treated as a required parameter in /home/onetcomvn/public_html/wp-content/themes/Onetv2/inc/acf/pro/fields/class-acf-field-flexible-content.php on line 1038

Deprecated: Optional parameter $i declared before required parameter $post_id is implicitly treated as a required parameter in /home/onetcomvn/public_html/wp-content/themes/Onetv2/inc/acf/pro/fields/class-acf-field-flexible-content.php on line 1074

Deprecated: Optional parameter $i declared before required parameter $post_id is implicitly treated as a required parameter in /home/onetcomvn/public_html/wp-content/themes/Onetv2/inc/acf/pro/fields/class-acf-field-flexible-content.php on line 1126

Deprecated: Optional parameter $id declared before required parameter $field is implicitly treated as a required parameter in /home/onetcomvn/public_html/wp-content/themes/Onetv2/inc/acf/pro/fields/class-acf-field-gallery.php on line 296

Warning: Constant WP_MEMORY_LIMIT already defined in /home/onetcomvn/public_html/wp-config.php on line 102
[LVM] GIỚI THIỆU VỀ LOGICAL VOLUME MANAGER Onet IDC

[LVM] GIỚI THIỆU VỀ LOGICAL VOLUME MANAGER

30/12/2020

Notice: Only variables should be assigned by reference in /home/onetcomvn/public_html/wp-content/themes/Onetv2/functions.php on line 732
Tin Tức

Logical Volume Manager (LVM) cho phép quản lý nhiều ổ cứng , giúp việc resizing các partition đơn giản hơn . Tính năng này có trong nhân Linux từ năm 1999 và cho đến nay được hỗ trợ bởi tất cả các bản phân phối . Phương pháp cấu hình thiết bị này được sử dụng rộng rãi bởi các system admin cho các server , hệ thống NAT , SAN chạy bằng linux nhằm cải thiện tối đa hiệu quả khi sử dụng ổ đĩa .

1. Định nghĩa :

LVM là phương pháp quản lý các storage device , các logical volume dễ dàng , linh hoạt hơn . Với kỹ thuật Logical Volume Manager (LVM) bạn có thể thay đổi kích thước mà không cần phải sửa lại partition table của OS .

2. Cấu trúc LVM :

LVM phân các lớp trên các ổ cứng vật lý .Bao gồm các thành phần sau : Hard drives – Drives :

  • Thiết bị lưu trữ dữ liệu, ví dụ như trong linux nó là /dev/sda .

Partition:

  • Partitions là các phân vùng của Hard drives, mỗi Hard drives có 4 partition, trong đó partition bao gồm 2 loại là primary partition và extended partition.
  • Primary partition: Phân vùng chính, có thể khởi động , mỗi đĩa cứng có thể có tối đa 4 phân vùng này.
  • Extended partition: Phân vùng mở rộng

Physical Volumes:

  • Kí hiệu : pv…
  • Là những thành phần cơ bản được sử dụng bởi LVM dể xây dựng lên các tầng cao hơn . Một Physical Volume không thể mở rộng ra ngoài phạm vi một ổ đĩa. Chúng ta có thể kết hợp nhiều Physical Volume thành Volume Groups

Volume Group

  • Nhiều Physical Volume trên những ổ đĩa khác nhau được kết hợp lại thành một Volume Group
  • Volume Group được sử dụng để tạo ra các Logical Volume, trong đó người dùng có thể tạo, thay đổi kích thước, lưu trữ, gỡ bỏ và sử dụng.

  • 1 Volume group bao gồm nhiều các Physical Volume gộp thành .Các LE được cấp bởi các PE của các Physical Volume , Một Logical Volume là một ánh xạ mà LVM duy trì giữa các Logical và Physical extent.

Lưu ý :

  • Extent trên Physical Volume được gọi là Physical extent.
  • Extent trên Logical Volume được gọi là các Logical extent.

Logical Volumes:

Kí hiệu: lv…(có thể là lvm… trong hệ thống) – Có chức năng là các phân vùng trong ổ cứng vật lý , có thể thu hồi hoặc thêm dung lượng một cách dễ dàng . Là thành phần chính để người dùng và các phần mềm tương tác .

3. Cài đặt LVM :

Cấu hình :

  • Tạo máy ảo CentOS7 trên VMWare.
  • Add thêm 3 ổ cứng ảo vào .
  • Sau khi add xong khởi động lại máy ảo , kiểm tra xem máy đã nhận 3 ổ ảo chưa bằng lệnh

lsblk

Tạo Logical Volume :

– Tạo các partition cho các ổ mới , bắt đầu từ sdb với lệnh :
fdisk /dev/sdb


Trong đó :

  • Command n để bắt đầu tạo partition.
  • Chọn p để tạo partition primary
  • Chọn 1 để đặt partition number
  • First sector để mặc định
  • Last sector để +1G (có các tùy chọn KB, MB ,GB)
  • Sau khi hoàn thành các bước trên nhấn t để đổi định dạng partition
  • Chọn 8e để thay đổi định dạng partition
  • Sau khi hoàn thành ấn w để lưu và thoát

– Tương tự tạo thêm các partition primary từ sdb ,sdc,sdd.

Tạo Physical Volum :

  • Từ các partition /dev/sdb1 /dev/sdc1 /dev/sdd1 ta tạo các Physical Volume bằng lệnh sau :

pvcreate /dev/sdb1

pvcreate /dev/sdc1

pvcreate /dev/sdd1

  • Kiểm tra bằng lệnh pvs hoặc pvdisplay xem các physical volume đã được tạo chưa :

Tạo Volume group:
– Sau khi tạo các Physical Volume ta gộp các PV đó thành 1 Volume Group bằng lệnh sau :
vgcreate vg-demo1 /dev/sdb1 /dev/sdc1 /dev/sdd1

– Dùng các lệnh vgs hoặc vgdisplay để kiểm tra :

Tạo Logical Volume:

  • Từ một Volume group , ta tạo các Logical Volume để sử dụng bằng lệnh sau :

lvcreate -L 1G -n lv-demo1 vg-demo1

Trong đó :

  • L : Chỉ ra dung lượng của logical volume
  • n : Chỉ ra tên của logical volume
  • Kiểm tra bằng lệnh lvs hoặc lvdisplay

Định dạng Logical Volume:

  • Format các Logical Volume thành các định dạng ext2,ext3,ext4,… :

mkfs -t ext4 /dev/vg-demo1/lv-demo1

Mount và sử dụng:

  • Ta tạo một thư mục để mount Logical Volume :

mkdir demo1

  • Tiến hành mount logical volume lv-demo1 vào thư mục demo1

mount /dev/vg-demo1/lv-demo1 demo

  • Kiểm tra bằng lệnh df -h

4. Tài liệu tham khảo :

– https://www.ufsexplorer.com/articles/storage-technologies/lvm-data-organization.php

– https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/logical_volume_manager_administration/lvm_examples

ONET IDC thành lập vào năm 2012, là công ty chuyên nghiệp tại Việt Nam trong lĩnh vực cung cấp dịch vụ Hosting, VPS, máy chủ vật lý, dịch vụ Firewall Anti DDoS, SSL… Với 10 năm xây dựng và phát triển, ứng dụng nhiều công nghệ hiện đại, ONET IDC đã giúp hàng ngàn khách hàng tin tưởng lựa chọn, mang lại sự ổn định tuyệt đối cho website của khách hàng để thúc đẩy việc kinh doanh đạt được hiệu quả và thành công.
Bài viết liên quan

How to Use Manjaro Hardware Detection Tool


Warning: Undefined array key "p" in /home/onetcomvn/public_html/wp-content/themes/Onetv2/functions.php on line 236

Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /home/onetcomvn/public_html/wp-content/themes/Onetv2/functions.php on line 236
Manjaro is based on the well-known Arch Linux. Among all the facilities, Manjaro Hardware Detection Tool is a unique one....
29/12/2020

NƠI BÁN PROXY GIÁ RẺ NHẤT HIỆN NAY Onet.com.vn


Warning: Undefined array key "p" in /home/onetcomvn/public_html/wp-content/themes/Onetv2/functions.php on line 236

Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /home/onetcomvn/public_html/wp-content/themes/Onetv2/functions.php on line 236
DỊCH VỤ THUÊ PROXY PRIVATE DEDICATED ONET IDC cung cấp dịch vụ IP Proxy Private giúp quý khách sử dụng...
09/11/2022

VIM Spell Check


Warning: Undefined array key "p" in /home/onetcomvn/public_html/wp-content/themes/Onetv2/functions.php on line 236

Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /home/onetcomvn/public_html/wp-content/themes/Onetv2/functions.php on line 236
Spell checkers are nothing more than a software that keeps on checking the spelling of whatever word you’re typing against...
29/12/2020
Bài Viết

Bài Viết Mới Cập Nhật

Dịch vụ thuê mua proxy US UK uy tín, chất lượng số #1
13/05/2024

Thuê mua proxy Việt Nam: Báo giá & các thông tin MỚI NHẤT
13/05/2024

Dịch vụ thuê mua proxy giá rẻ an toàn, tốc độ cao
13/05/2024

Thuê mua proxy V6 uy tín, chất lượng tại đâu?
11/05/2024

Thuê mua proxy Tiktok tăng doanh thu, hiệu quả cao
11/05/2024