Хабр Курсы для всех
РЕКЛАМА
Практикум, Хекслет, SkyPro, авторские курсы — собрали всех и попросили скидки. Осталось выбрать!
[root@TestVM ~]# ./fsextender /dev/mapper/VolGroup-lv_root --do
2017/01/24 17:02:02 Can't get disk size: /dev/loop0
2017/01/24 17:02:02 Can't get disk size: /dev/loop1
2017/01/24 17:02:02 Can't get disk size: /dev/loop2
2017/01/24 17:02:02 Can't get disk size: /dev/loop3
2017/01/24 17:02:02 Can't get disk size: /dev/loop4
2017/01/24 17:02:02 Can't get disk size: /dev/loop5
2017/01/24 17:02:02 Can't get disk size: /dev/loop6
2017/01/24 17:02:02 Can't get disk size: /dev/loop7
2017/01/24 17:02:02 I can't work with non msdos/gpt table partition. TODO.: /dev/loop0,
2017/01/24 17:02:02 I can't work with non msdos/gpt table partition. TODO.: /dev/loop3,
2017/01/24 17:02:02 I can't work with non msdos/gpt table partition. TODO.: /dev/loop6,
2017/01/24 17:02:02 I can't work with non msdos/gpt table partition. TODO.: /dev/loop7,
2017/01/24 17:02:02 I can't work with non msdos/gpt table partition. TODO.: /dev/loop1,
2017/01/24 17:02:02 I can't work with non msdos/gpt table partition. TODO.: /dev/loop2,
2017/01/24 17:02:02 I can't work with non msdos/gpt table partition. TODO.: /dev/loop4,
2017/01/24 17:02:02 I can't work with non msdos/gpt table partition. TODO.: /dev/loop5,
2017/01/24 17:02:02 DO 0: [Type: type_PARTITION, Path: /dev/sda2, Size: 19.5GiB (+10.0GiB), Child: 1, PartNum=2]
2017/01/24 17:02:02 Partition resized: /dev/sda2 to 29.5GiB (+10.0GiB)
2017/01/24 17:02:02 NEED REBOOT!
2017/01/24 17:02:02 DO 1: [Type: type_LVM_PV, Path: /dev/sda2, Size: 19.5GiB (+10.0GiB), Child: 4, ExtentSize: 4.0MiB]
2017/01/24 17:02:02 LVM PV Resized: /dev/sda2 to 19.5GiB (+0.0B)
2017/01/24 17:02:02 DO 2: [Type: type_SKIP, Path: /dev/sda3, Size: 0.0B (+10.0GiB), Child: 3, Reason: Partition layout optimization. Partition number may be wrong becouse it optimize too.]
2017/01/24 17:02:02 Skip item: Partition layout optimization. Partition number may be wrong becouse it optimize too. type_PARTITION_NEW /dev/sda3 0.0B
2017/01/24 17:02:02 DO 3: [Type: type_SKIP, Path: /dev/sda3, Size: 0.0B (+0.0B), Child: 4, Reason: Partition layout optimization. Partition number may be wrong becouse it optimize too.]
2017/01/24 17:02:02 Skip item: Partition layout optimization. Partition number may be wrong becouse it optimize too. type_LVM_PV_NEW /dev/sda3 0.0B
2017/01/24 17:02:02 DO 4: [Type: type_LVM_GROUP, Path: VolGroup, Size: 19.5GiB (+0.0B), Child: 5, ExtentSize: 4.0MiB]
2017/01/24 17:02:02 Free space on LVM_GROUP 'VolGroup' 0.0B
2017/01/24 17:02:02 DO 5: [Type: type_LVM_LV, Path: VolGroup/lv_root, Size: 17.5GiB (+0.0B), Child: 6]
2017/01/24 17:02:02 Resize LVM_LV VolGroup/lv_root to 17.5GiB(+0.0B)
2017/01/24 17:02:02 DO 6: [Type: type_FS, Path: /dev/dm-0, Size: 17.5GiB (+0.0B), Child: -1, FS: ext4]
2017/01/24 17:02:02 Filesystem doesn't extend. Log of resize:
stdout:
stderr: resize2fs 1.41.12 (17-May-2010)
The filesystem is already 4589568 blocks long. Nothing to do!
2017/01/24 17:02:02 Sleep a second before retry.
2017/01/24 17:02:03 Filesystem doesn't extend. Log of resize:
stdout:
stderr: resize2fs 1.41.12 (17-May-2010)
The filesystem is already 4589568 blocks long. Nothing to do!
2017/01/24 17:02:03 Sleep a second before retry.
2017/01/24 17:02:04 Filesystem doesn't extend. Log of resize:
stdout:
stderr: resize2fs 1.41.12 (17-May-2010)
The filesystem is already 4589568 blocks long. Nothing to do!
2017/01/24 17:02:04 Sleep a second before retry.
2017/01/24 17:02:05 Filesystem doesn't extend. Log of resize:
stdout:
stderr: resize2fs 1.41.12 (17-May-2010)
The filesystem is already 4589568 blocks long. Nothing to do!
2017/01/24 17:02:05 Sleep a second before retry.
2017/01/24 17:02:06 Filesystem doesn't extend. Log of resize:
stdout:
stderr: resize2fs 1.41.12 (17-May-2010)
The filesystem is already 4589568 blocks long. Nothing to do!
NEED REBOOT AND START ME ONCE AGAIN.
[root@TestVM ~]# reboot
Broadcast message from root@TestVM
(/dev/pts/0) at 17:02 ...
The system is going down for reboot NOW!
[root@TestVM ~]#
login as: root
root@192.168.0.27's password:
Last login: Tue Jan 24 17:01:02 2017 from computer.domain.tld
[root@TestVM ~]# ./fsextender /dev/mapper/VolGroup-lv_root --do
2017/01/24 17:02:56 Can't get disk size: /dev/loop0
2017/01/24 17:02:56 Can't get disk size: /dev/loop1
2017/01/24 17:02:56 Can't get disk size: /dev/loop2
2017/01/24 17:02:56 Can't get disk size: /dev/loop3
2017/01/24 17:02:56 Can't get disk size: /dev/loop4
2017/01/24 17:02:56 Can't get disk size: /dev/loop5
2017/01/24 17:02:56 Can't get disk size: /dev/loop6
2017/01/24 17:02:56 Can't get disk size: /dev/loop7
2017/01/24 17:02:56 I can't work with non msdos/gpt table partition. TODO.: /dev/loop5,
2017/01/24 17:02:56 I can't work with non msdos/gpt table partition. TODO.: /dev/loop7,
2017/01/24 17:02:56 I can't work with non msdos/gpt table partition. TODO.: /dev/loop2,
2017/01/24 17:02:56 I can't work with non msdos/gpt table partition. TODO.: /dev/loop3,
2017/01/24 17:02:56 I can't work with non msdos/gpt table partition. TODO.: /dev/loop4,
2017/01/24 17:02:56 I can't work with non msdos/gpt table partition. TODO.: /dev/loop6,
2017/01/24 17:02:56 I can't work with non msdos/gpt table partition. TODO.: /dev/loop0,
2017/01/24 17:02:56 I can't work with non msdos/gpt table partition. TODO.: /dev/loop1,
2017/01/24 17:02:56 DO 0: [Type: type_PARTITION, Path: /dev/sda2, Size: 29.5GiB (+0.0B), Child: 1, PartNum=2]
2017/01/24 17:02:56 Partition resized: /dev/sda2 to 29.5GiB (+0.0B)
2017/01/24 17:02:56 DO 1: [Type: type_LVM_PV, Path: /dev/sda2, Size: 19.5GiB (+10.0GiB), Child: 2, ExtentSize: 4.0MiB]
2017/01/24 17:02:56 LVM PV Resized: /dev/sda2 to 29.5GiB (+10.0GiB)
2017/01/24 17:02:56 DO 2: [Type: type_LVM_GROUP, Path: VolGroup, Size: 19.5GiB (+10.0GiB), Child: 3, ExtentSize: 4.0MiB]
2017/01/24 17:02:56 Free space on LVM_GROUP 'VolGroup' 10.0GiB
2017/01/24 17:02:56 DO 3: [Type: type_LVM_LV, Path: VolGroup/lv_root, Size: 17.5GiB (+10.0GiB), Child: 4]
2017/01/24 17:02:56 Resize LVM_LV VolGroup/lv_root to 27.5GiB(+10.0GiB)
2017/01/24 17:02:56 DO 4: [Type: type_FS, Path: /dev/dm-0, Size: 17.5GiB (+10.0GiB), Child: -1, FS: ext4]
2017/01/24 17:03:01 Resize filesystem: /dev/dm-0 to 27.5GiB (+10.0GiB)
OK
[root@TestVM ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
27G 1.3G 25G 5% /
tmpfs 939M 0 939M 0% /dev/shm
/dev/sda1 477M 110M 343M 25% /boot
Расширение разделов без потери данных