+7 495 008 8452 пн.-пт. 10:00 – 17:00
Если у вас возникли какие либо вопросы которые вы не смогли решить по нашим публикациям самостоятельно,
то ждем ваше обращение в нашей службе тех поддержки.


Сделайте сами любой размер:

1. На выключенной ВМ измените размер виртуального диска на нужный средствами гипервизора.

2. Внутри ВМ, от root:

Код
[root@localhost ~]# 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): c
DOS Compatibility flag is not set

Command (m for help): d
Partition number (1-4): 2

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (64-2610, default 64):
Using default value 64
Last cylinder, +cylinders or +size{K,M,G} (64-2610, default 2610):
Using default value 2610

Command (m for help): t
Partition number (1-4): 2
Hex code (type L to list codes): 8e
Changed system type of partition 2 to 8e (Linux LVM)

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe( or kpartx(
Syncing disks.
[root@localhost ~]#

reboot


Код
[root@localhost /]# pvresize /dev/sda2
File descriptor 7 (pipe:[10730&#93 leaked on pvresize invocation. Parent PID 2237: bash
  Physical volume "/dev/sda2" changed
  1 physical volume(s) resized / 0 physical volume(s) not resized 
 
[root@localhost /]# lvextend -l +100%free /dev/mapper/VolGroup-lv_root
File descriptor 7 (pipe:[10730&#93 leaked on lvextend invocation. Parent PID 2237: bash
  Extending logical volume lv_root to 19.71 GiB
  Logical volume lv_root successfully resized
 
[root@localhost /]# resize2fs /dev/mapper/VolGroup-lv_root
resize2fs 1.41.12 (17-May-2010)
Filesystem at /dev/mapper/VolGroup-lv_root is mounted on /; on-line resizing required
old desc_blocks = 2, new_desc_blocks = 2
Performing an on-line resize of /dev/mapper/VolGroup-lv_root to 5166080 (4k) blocks.
The filesystem on /dev/mapper/VolGroup-lv_root is now 5166080 blocks long.

[root@localhost /]#


Назад в раздел

Подписаться на новые материалы раздела:












CAPTCHA