私の240GB SSDには最初に2つのパーティションがありました。 1つはLinux Mintの論理ボリュームを含み、もう1つはWindowsと共有されるNTFSパーティションを含みました。
NTFSパーティションを削除し、空きディスク領域を使用するために論理ボリュームグループを拡張しようとしています。
私がどうするボリュームグループの拡張、私のもの/home を含む論理ボリュームそしてファイルシステム(ext4)/家に?オンラインでできますか?
PS:はい、データをバックアップする必要があることを知っています:)
/dev/sdb/ (240GB)
linuxvg (160GB) should use 100% of the disk space
swap
root
home (ext4, 128GB) should be extended to use the remaining space
出力sudo vgdisplay
:
--- Volume group ---
VG Name linuxvg
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 3
Open LV 3
Max PV 0
Cur PV 1
Act PV 1
VG Size 160,00 GiB
PE Size 4,00 MiB
Total PE 40959
Alloc PE / Size 40959 / 160,00 GiB
Free PE / Size 0 / 0
VG UUID ...
--- Logical volume ---
LV Path /dev/linuxvg/swap
LV Name swap
VG Name linuxvg
LV UUID ...
LV Write Access read/write
LV Creation host, time mint, 2013-08-06 22:48:32 +0200
LV Status available
# open 2
LV Size 8,00 GiB
Current LE 2048
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:0
--- Logical volume ---
LV Path /dev/linuxvg/root
LV Name root
VG Name linuxvg
LV UUID ...
LV Write Access read/write
LV Creation host, time mint, 2013-08-06 22:48:43 +0200
LV Status available
# open 1
LV Size 24,00 GiB
Current LE 6144
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:1
--- Logical volume ---
LV Path /dev/linuxvg/home
LV Name home
VG Name linuxvg
LV UUID ...
LV Write Access read/write
LV Creation host, time mint, 2013-08-06 22:48:57 +0200
LV Status available
# open 1
LV Size 128,00 GiB
Current LE 32767
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:2
--- Physical volumes ---
PV Name /dev/sdb1
PV UUID ...
PV Status allocatable
Total PE / Free PE 40959 / 0
出力sudo fdisk -l
:
Disk /dev/sdb: 240.1 GB, 240057409536 bytes
255 heads, 63 sectors/track, 29185 cylinders, total 468862128 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 1 468862127 234431063+ ee GPT
Disk /dev/mapper/linuxvg-swap: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders, total 16777216 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/linuxvg-root: 25.8 GB, 25769803776 bytes
255 heads, 63 sectors/track, 3133 cylinders, total 50331648 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/linuxvg-home: 137.4 GB, 137434759168 bytes
255 heads, 63 sectors/track, 16708 cylinders, total 268427264 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
ベストアンサー1
サイズ変更したいファイルシステムで実行している間は、プロセス全体を完了できます(たとえば、安全で完全にサポートされています)。回復CDやバックアップオペレーティングシステムは必要ありません。
- パーティションのサイズを変更します(システムの実行中でもこれを実行できます)。ゴポット使いやすく、サイズ変更をサポートします。
などの低レベルのツールを使用することもできますfdisk
。ただし、パーティションを削除して再作成する必要があります。これを行うときは、新しいパーティションがまったく同じ場所から始まっていることを確認してください。 - 再起動。パーティションテーブルは実行中のシステムで変更されるため、再起動するまで適用されません。
pvresize /dev/sdXY
LVMに新しいスペースを確保するには、実行してください。- サイズ変更論理ボリュームを使用してください
lvextend
。すべてを使用するには、ファイルシステムのサイズも変更されますlvextend -r -l +100%FREE /dev/VGNAME/LVNAME
。-r
私は常にフルボリュームグループを使用しないことをお勧めします。今後何が必要なのかは決してわかりません。後でいつでも拡張できますが、常に折りたたむことはできません。