
こんにちは、私はこの役に立つガイドに従っています(https://wiki.archlinux.org/title/Resizing_LVM-on-LUKS) ファイルシステムとパーティションのサイズを縮小して、パーティション テーブルに約 100G の空き領域を生成し、Ubuntu のインストールとともに Windows をインストールする方法について説明します。
実行後に LVM コマンドを使用すると、いくつかの警告が表示されpvresize
、また、いくつかのコマンドが GiB ではなく PiB で報告していることに気付きました。これは、何か計算を間違えたのではないかと思います。マシンを消去してやり直す必要があるリスクを減らすために、作業を停止しました。重要なデータはバックアップされていますが、再構築は実行したくありません。
エラーメッセージは
WARNING: Device /dev/mapper/cryptdisk has size of 762478592 sectors which is smaller than corresponding PV size of 799508162148352 sectors. Was device resized?
WARNING: One or more devices used as PVs in VG vgubuntu have changed sizes.
以下は、私が知っているさまざまな診断コマンドの出力です。
> sudo fdisk -l
Disk /dev/nvme0n1: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: WD_BLACK SN770 500GB
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 71C114FE-3DBF-4E71-A422-6CE906592E52
Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 1050623 1048576 512M EFI System
/dev/nvme0n1p2 1050624 4550655 3500032 1.7G Linux filesystem
/dev/nvme0n1p3 4550656 976771071 972220416 463.6G Linux filesystem
> sudo lvdisplay
WARNING: Device /dev/mapper/cryptdisk has size of 762478592 sectors which is smaller than corresponding PV size of 799508162148352 sectors. Was device resized?
WARNING: One or more devices used as PVs in VG vgubuntu have changed sizes.
--- Logical volume ---
LV Path /dev/vgubuntu/root
LV Name root
VG Name vgubuntu
LV UUID hPTH7U-FRG1-VPcT-OgAk-S2lY-pD5O-hR8ixl
LV Write Access read/write
LV Creation host, time ubuntu, 2023-07-23 19:58:39 +0000
LV Status NOT available
LV Size 361.66 GiB
Current LE 92586
Segments 1
Allocation inherit
Read ahead sectors auto
--- Logical volume ---
LV Path /dev/vgubuntu/swap_1
LV Name swap_1
VG Name vgubuntu
LV UUID B5vW6H-cMcc-i0rt-CuEM-EC6a-tVQb-474jVv
LV Write Access read/write
LV Creation host, time ubuntu, 2023-07-23 19:58:39 +0000
LV Status NOT available
LV Size 1.91 GiB
Current LE 489
Segments 1
Allocation inherit
Read ahead sectors autosh
> sudo vgdisplay
WARNING: Device /dev/mapper/cryptdisk has size of 762478592 sectors which is smaller than corresponding PV size of 799508162148352 sectors. Was device resized?
WARNING: One or more devices used as PVs in VG vgubuntu have changed sizes.
--- Volume group ---
VG Name vgubuntu
System ID
Format lvm2
Metadata Areas 1
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 1
Act PV 1
VG Size 11.57 PiB
PE Size 4.00 MiB
Total PE 3106930687
Alloc PE / Size 93075 / 363.57 GiB
Free PE / Size 3106837612 / 11.57 PiB
VG UUID oIyZSZ-Ibd3-8Tjm-RpSf-wVts-ru19-88uWCR
> sudo pvdisplay
WARNING: Device /dev/mapper/cryptdisk has size of 762478592 sectors which is smaller than corresponding PV size of 799508162148352 sectors. Was device resized?
WARNING: One or more devices used as PVs in VG vgubuntu have changed sizes.
--- Physical volume ---
PV Name /dev/mapper/cryptdisk
VG Name vgubuntu
PV Size 363.57 PiB / not usable 352.00 PiB
Allocatable yes
PE Size 4.00 MiB
Total PE 3106930687
Free PE 3106837612
Allocated PE 93075
PV UUID XVxLuX-GtmB-CvcP-whyf-C1gN-n6yx-CXLzSA
> sudo pvs -v --segments /dev/mapper/cryptdisk
WARNING: Device /dev/mapper/cryptdisk has size of 762478592 sectors which is smaller than corresponding PV size of 799508162148352 sectors. Was device resized?
WARNING: One or more devices used as PVs in VG vgubuntu have changed sizes.
PV VG Fmt Attr PSize PFree Start SSize LV Start Type PE Ranges
/dev/mapper/cryptdisk vgubuntu lvm2 a-- 11.57p 11.57p 0 92586 root 0 linear /dev/mapper/cryptdisk:0-92585
/dev/mapper/cryptdisk vgubuntu lvm2 a-- 11.57p 11.57p 92586 25600 0 free
/dev/mapper/cryptdisk vgubuntu lvm2 a-- 11.57p 11.57p 118186 489 swap_1 0 linear /dev/mapper/cryptdisk:118186-118674
/dev/mapper/cryptdisk vgubuntu lvm2 a-- 11.57p 11.57p 118675 3106812012
これらのコマンドのいくつかで私が直面する問題は、一部の統計がどのような単位で与えられているか、何が正しい値で何が間違った値であるかがわからないことです。しかし、PV Size 363.57 PiB / not usable 352.00 PiB
約 360 GB 程度のものを期待しているのに、間違っているように見えます。
LUKS とパーティションのサイズ変更を続ける前に、これらのコマンド出力を読んで本当に問題があるかどうかを知らせていただけると大変助かります。