Linux 查看 LVM 逻辑卷的读写策略

2021-06-08  本文已影响0人  awker

LVM 逻辑卷的读写策略有两种:

查看 LVM 逻辑卷的读写策略的方式:lvdisplay -m "LV Path"

看到 --- Segments ---Type linear,所以这里的 LVM 逻辑卷读写策略是 linear 线性方式

root@node-1:~# lvdisplay 
  --- Logical volume ---
  LV Path                /dev/cache_vg00/cache_lv00
  LV Name                cache_lv00
  VG Name                cache_vg00
  LV UUID                SxIt27-kH9m-2lzb-yOGJ-vYVn-xwi2-qY30PK
  LV Write Access        read/write
  LV Creation host, time 10-1-2-159, 2021-06-04 15:05:32 +0800
  LV Status              available
  # open                 1
  LV Size                2.72 TiB
  Current LE             713820
  Segments               6
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0

root@node-1:~# lvdisplay -m /dev/cache_vg00/cache_lv00 
  --- Logical volume ---
  LV Path                /dev/cache_vg00/cache_lv00
  LV Name                cache_lv00
  VG Name                cache_vg00
  LV UUID                SxIt27-kH9m-2lzb-yOGJ-vYVn-xwi2-qY30PK
  LV Write Access        read/write
  LV Creation host, time node-1, 2021-06-07 15:05:32 +0800
  LV Status              available
  # open                 1
  LV Size                2.72 TiB
  Current LE             713820
  Segments               6
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0
   
  --- Segments ---
  Logical extents 0 to 118969:
    Type        linear
    Physical volume /dev/sdb1
    Physical extents    0 to 118969
省略其他信息……  

看到 --- Segments ---Type striped,所以这里的 LVM 逻辑卷读写策略是 striped 条带方式

root@node-2:~# lvdisplay -m /dev/cache_vg00/cache_lv00 
  --- Logical volume ---
  LV Path                /dev/cache_vg00/cache_lv00
  LV Name                cache_lv00
  VG Name                cache_vg00
  LV UUID                7mlqJc-Cxa9-Trhj-O2wp-TeuG-SFYH-Eny0nm
  LV Write Access        read/write
  LV Creation host, time node-2, 2021-06-07 15:11:12 +0800
  LV Status              available
  # open                 1
  LV Size                1.95 TiB
  Current LE             512000
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     1280
  Block device           253:1
   
  --- Segments ---
  Logical extents 0 to 511999:
    Type        striped
    Stripes         5
    Stripe size     64.00 Kib
省略其他信息……   

参考:

  1. Striped Logical Volume in Logical volume management (LVM):https://www.linuxsysadmins.com/create-striped-logical-volume-on-linux/
上一篇 下一篇

猜你喜欢

热点阅读