N
N
Nikolay Baranenko2019-03-10 11:04:06
linux
Nikolay Baranenko, 2019-03-10 11:04:06

How to properly expand the volume of the root partition?

Hello.
In openstack, I created a virtual machine
after starting the OS

Filesystem      Size  Used Avail Use% Mounted on
devtmpfs        7.7G     0  7.7G   0% /dev
tmpfs           7.8G     0  7.8G   0% /dev/shm
tmpfs           7.8G   17M  7.7G   1% /run
tmpfs           7.8G     0  7.8G   0% /sys/fs/cgroup
/dev/vda1       5.0G  3.9G  1.2G  77% /
tmpfs           1.6G     0  1.6G   0% /run/user/20226

then I added 195 GB and would like this volume to be expanded
/dev/vda1 5.0G 3.9G 1.2G 77% /
with an additional partition
Disk /dev/vdb: 209.4 GB, 209379655680 bytes, 408944640 sectors

fdisk -l
Disk /dev/vda: 5368 MB, 5368709120 bytes, 10485760 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 label type: dos
Disk identifier: 0x000ad846

   Device Boot      Start         End      Blocks   Id  System
/dev/vda1   *        2048    10485759     5241856   83  Linux

Disk /dev/vdb: 209.4 GB, 209379655680 bytes, 408944640 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 label type: dos
Disk identifier: 0xd5efa923

   Device Boot      Start         End      Blocks   Id  System
/dev/vdb1            2048   408944639   204471296   8e  Linux LVM

lsblk -f
NAME   FSTYPE      LABEL UUID                                   MOUNTPOINT
vda
└─vda1 xfs               b22f809d-38b7-43fd-8eda-22acb001877f   /
vdb
└─vdb1 LVM2_member       N4Emfs-vvOn-NeWf-oQ6D-jcLV-Mkbx-5Fx0LO

How to do it right?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
CityCat4, 2019-03-11
@drno-reg

/dev/vda is not LVM, so no way, just reformatting, transferring data, or mount a new disk somewhere and transfer data to it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question