VirtualBox Linuxゲスト(Oracle Enterprise Linux 6)があり、最近ハードドライブを50Gbから100Gbに拡張し、GPartedを使用して新しく追加された50GB(割り当てられていないため)を使用するようにサイズ変更しました。これらはすべてうまくいきましたが、「利用可能な空きセクタがありません」というエラーが発生しました。
[root@oralab1 Desktop]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_oralab1-lv_root
45G 4.2G 39G 10% /
tmpfs 7.9G 100K 7.9G 1% /dev/shm
/dev/sda1 485M 55M 405M 12% /boot
[root@oralab1 Desktop]#
[root@oralab1 Desktop]# fdisk -l
Disk /dev/sda: 107.4 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000ef7c4
Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 13055 104344576 8e Linux LVM
Disk /dev/mapper/vg_oralab1-lv_root: 49.0 GB, 48997859328 bytes
255 heads, 63 sectors/track, 5956 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/vg_oralab1-lv_swap: 4160 MB, 4160749568 bytes
255 heads, 63 sectors/track, 505 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
[root@oralab1 Desktop]#
[root@oralab1 Desktop]#
[root@oralab1 Desktop]#
[root@oralab1 Desktop]#
[root@oralab1 Desktop]# fdisk /dev/sda
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): p
Disk /dev/sda: 107.4 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000ef7c4
Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 13055 104344576 8e Linux LVM
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 3
No free sectors available
Command (m for help): ^C
100GBをすべて拡張して使用する必要があります。
ベストアンサー1
pvs
コマンドが示すように、すでにsda2にすべてのディスクがあります(サイズ99Gb、50GBが利用可能)。
したがって、既存のlvsパーティションを追加するだけです。
lvextend -l +100%FREE /dev/mapper/vg_oralab1-lv_root
そして、OSレベルでサイズを変更します。
resize2fs /dev/mapper/vg_oralab1-lv_root
これで、lvmファイルシステムのすべてのサイズを使用しています。