История изменений
Исправление Vsevolod-linuxoid, (текущая версия) :
root@vbox:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 32G 0 disk
├─sda1 8:1 0 2G 0 part [SWAP]
└─sda2 8:2 0 30G 0 part /
sdb 8:16 0 32G 0 disk
sdc 8:32 0 32G 0 disk
sr0 11:0 1 1024M 0 rom
root@vbox:~# pvcreate /dev/sdb
Physical volume "/dev/sdb" successfully created.
root@vbox:~# pvcreate /dev/sdc
Physical volume "/dev/sdc" successfully created.
root@vbox:~# vgcreate vg_raid1 /dev/sdb /dev/sdc
Volume group "vg_raid1" successfully created
root@vbox:~# lvcreate --mirrors 1 --type raid1 --nosync -L24g -n lv0 vg_raid1
WARNING: New raid1 won't be synchronised. Don't read what you didn't write!
Logical volume "lv0" created.
root@vbox:~# lvcreate --mirrors 1 --type raid1 --nosync -l100%FREE -n lv1 vg_raid1
WARNING: New raid1 won't be synchronised. Don't read what you didn't write!
Logical volume "lv1" created.
root@vbox:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 32G 0 disk
├─sda1 8:1 0 2G 0 part [SWAP]
└─sda2 8:2 0 30G 0 part /
sdb 8:16 0 32G 0 disk
├─vg_raid1-lv0_rmeta_0 254:0 0 4M 0 lvm
│ └─vg_raid1-lv0 254:4 0 24G 0 lvm
├─vg_raid1-lv0_rimage_0 254:1 0 24G 0 lvm
│ └─vg_raid1-lv0 254:4 0 24G 0 lvm
├─vg_raid1-lv1_rmeta_0 254:5 0 4M 0 lvm
│ └─vg_raid1-lv1 254:9 0 8G 0 lvm
└─vg_raid1-lv1_rimage_0 254:6 0 8G 0 lvm
└─vg_raid1-lv1 254:9 0 8G 0 lvm
sdc 8:32 0 32G 0 disk
├─vg_raid1-lv0_rmeta_1 254:2 0 4M 0 lvm
│ └─vg_raid1-lv0 254:4 0 24G 0 lvm
├─vg_raid1-lv0_rimage_1 254:3 0 24G 0 lvm
│ └─vg_raid1-lv0 254:4 0 24G 0 lvm
├─vg_raid1-lv1_rmeta_1 254:7 0 4M 0 lvm
│ └─vg_raid1-lv1 254:9 0 8G 0 lvm
└─vg_raid1-lv1_rimage_1 254:8 0 8G 0 lvm
└─vg_raid1-lv1 254:9 0 8G 0 lvm
sr0 11:0 1 1024M 0 rom
root@vbox:~# lvdisplay
--- Logical volume ---
LV Path /dev/vg_raid1/lv0
LV Name lv0
VG Name vg_raid1
LV UUID EuLoWi-Yys3-liTf-b8RH-R0Zo-rzT6-CiwGLS
LV Write Access read/write
LV Creation host, time vbox, 2025-01-12 11:55:02 +0300
LV Status available
# open 0
LV Size 24,00 GiB
Current LE 6144
Mirrored volumes 2
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:4
--- Logical volume ---
LV Path /dev/vg_raid1/lv1
LV Name lv1
VG Name vg_raid1
LV UUID SSQA0q-etf8-GXkA-nbT0-3O0A-2CUY-RZoDUf
LV Write Access read/write
LV Creation host, time vbox, 2025-01-12 11:55:26 +0300
LV Status available
# open 0
LV Size <7,99 GiB
Current LE 2045
Mirrored volumes 2
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:9
root@vbox:~# vgdisplay
--- Volume group ---
VG Name vg_raid1
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 5
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 0
Max PV 0
Cur PV 2
Act PV 2
VG Size 63,99 GiB
PE Size 4,00 MiB
Total PE 16382
Alloc PE / Size 16382 / 63,99 GiB
Free PE / Size 0 / 0
VG UUID ujRbQf-sbQO-OFL5-40Y3-yLPq-63hf-u4CEy4
root@vbox:~# pvdisplay
--- Physical volume ---
PV Name /dev/sdb
VG Name vg_raid1
PV Size 32,00 GiB / not usable 4,00 MiB
Allocatable yes (but full)
PE Size 4,00 MiB
Total PE 8191
Free PE 0
Allocated PE 8191
PV UUID HuBJNo-DUH7-dmZJ-WjVo-5xdU-mdd0-QwLeje
--- Physical volume ---
PV Name /dev/sdc
VG Name vg_raid1
PV Size 32,00 GiB / not usable 4,00 MiB
Allocatable yes (but full)
PE Size 4,00 MiB
Total PE 8191
Free PE 0
Allocated PE 8191
PV UUID RniHS8-ePIr-kdAf-zhXH-d8P4-Jwqr-FhdKpS
root@vbox:~#
Исходная версия Vsevolod-linuxoid, :
root@vbox:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 32G 0 disk
├─sda1 8:1 0 2G 0 part [SWAP]
└─sda2 8:2 0 30G 0 part /
sdb 8:16 0 32G 0 disk
sdc 8:32 0 32G 0 disk
sr0 11:0 1 1024M 0 rom
root@vbox:~# pvcreate /dev/sdb
Physical volume "/dev/sdb" successfully created.
root@vbox:~# pvcreate /dev/sdc
Physical volume "/dev/sdc" successfully created.
root@vbox:~# vgcreate vg_raid1 /dev/sdb /dev/sdc
Volume group "vg_raid1" successfully created
root@vbox:~# lvcreate --mirrors 1 --type raid1 --nosync -L24g -n lv0 vg_raid1
WARNING: New raid1 won't be synchronised. Don't read what you didn't write!
Logical volume "lv0" created.
root@vbox:~# lvcreate --mirrors 1 --type raid1 --nosync -l100%FREE -n lv1 vg_raid1
WARNING: New raid1 won't be synchronised. Don't read what you didn't write!
Logical volume "lv1" created.
root@vbox:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
sda 8:0 0 32G 0 disk
├─sda1 8:1 0 2G 0 part [SWAP]
└─sda2 8:2 0 30G 0 part /
sdb 8:16 0 32G 0 disk
├─vg_raid1-lv0_rmeta_0 254:0 0 4M 0 lvm
│ └─vg_raid1-lv0 254:4 0 24G 0 lvm
├─vg_raid1-lv0_rimage_0 254:1 0 24G 0 lvm
│ └─vg_raid1-lv0 254:4 0 24G 0 lvm
├─vg_raid1-lv1_rmeta_0 254:5 0 4M 0 lvm
│ └─vg_raid1-lv1 254:9 0 8G 0 lvm
└─vg_raid1-lv1_rimage_0 254:6 0 8G 0 lvm
└─vg_raid1-lv1 254:9 0 8G 0 lvm
sdc 8:32 0 32G 0 disk
├─vg_raid1-lv0_rmeta_1 254:2 0 4M 0 lvm
│ └─vg_raid1-lv0 254:4 0 24G 0 lvm
├─vg_raid1-lv0_rimage_1 254:3 0 24G 0 lvm
│ └─vg_raid1-lv0 254:4 0 24G 0 lvm
├─vg_raid1-lv1_rmeta_1 254:7 0 4M 0 lvm
│ └─vg_raid1-lv1 254:9 0 8G 0 lvm
└─vg_raid1-lv1_rimage_1 254:8 0 8G 0 lvm
└─vg_raid1-lv1 254:9 0 8G 0 lvm
sr0 11:0 1 1024M 0 rom
root@vbox:~# lvdisplay
--- Logical volume ---
LV Path /dev/vg_raid1/lv0
LV Name lv0
VG Name vg_raid1
LV UUID EuLoWi-Yys3-liTf-b8RH-R0Zo-rzT6-CiwGLS
LV Write Access read/write
LV Creation host, time vbox, 2025-01-12 11:55:02 +0300
LV Status available
# open 0
LV Size 24,00 GiB
Current LE 6144
Mirrored volumes 2
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:4
--- Logical volume ---
LV Path /dev/vg_raid1/lv1
LV Name lv1
VG Name vg_raid1
LV UUID SSQA0q-etf8-GXkA-nbT0-3O0A-2CUY-RZoDUf
LV Write Access read/write
LV Creation host, time vbox, 2025-01-12 11:55:26 +0300
LV Status available
# open 0
LV Size <7,99 GiB
Current LE 2045
Mirrored volumes 2
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 254:9
root@vbox:~# vgdisplay
--- Volume group ---
VG Name vg_raid1
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 5
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 0
Max PV 0
Cur PV 2
Act PV 2
VG Size 63,99 GiB
PE Size 4,00 MiB
Total PE 16382
Alloc PE / Size 16382 / 63,99 GiB
Free PE / Size 0 / 0
VG UUID ujRbQf-sbQO-OFL5-40Y3-yLPq-63hf-u4CEy4
root@vbox:~# pvdiplay
-bash: pvdiplay: команда не найдена
root@vbox:~# pvdisplay
--- Physical volume ---
PV Name /dev/sdb
VG Name vg_raid1
PV Size 32,00 GiB / not usable 4,00 MiB
Allocatable yes (but full)
PE Size 4,00 MiB
Total PE 8191
Free PE 0
Allocated PE 8191
PV UUID HuBJNo-DUH7-dmZJ-WjVo-5xdU-mdd0-QwLeje
--- Physical volume ---
PV Name /dev/sdc
VG Name vg_raid1
PV Size 32,00 GiB / not usable 4,00 MiB
Allocatable yes (but full)
PE Size 4,00 MiB
Total PE 8191
Free PE 0
Allocated PE 8191
PV UUID RniHS8-ePIr-kdAf-zhXH-d8P4-Jwqr-FhdKpS
root@vbox:~#