resize raw disk without logical volumes

gerdnl

Member
Oct 21, 2013
114
0
16
Hi all,
i resized my raw disk in proxmox.
but im unsure how to enlarge it in my linux vm, it has no logical volume

Code:
[B]root@igeni[/B]:[B]~[/B]# df -hFilesystem      Size  Used Avail Use% Mounted on
/dev/vda1        49G  1.8G   44G   4% /
none            4.0K     0  4.0K   0% /sys/fs/cgroup
udev            487M  4.0K  487M   1% /dev
tmpfs           100M  368K  100M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            497M     0  497M   0% /run/shm
none            100M     0  100M   0% /run/user

Code:
[B]root@igeni[/B]:[B]~[/B]# fdisk /dev/vda

Command (m for help): p


Disk /dev/vda: 375.8 GB, 375809638400 bytes
255 heads, 63 sectors/track, 45689 cylinders, total 734003200 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: 0x000e33d3


   Device Boot      Start         End      Blocks   Id  System
/dev/vda1   *        2048   102762495    51380224   83  Linux
/dev/vda2       102764542   104855551     1045505    5  Extended
/dev/vda5       102764544   104855551     1045504   82  Linux swap / Solaris

how do i extend vda1 to the full size without loosing data
the original size was 50 gig it has to become 350gig
 
Read the description of this:
Code:
man resize2fs
Note especially this paragraph:
The resize2fs program does not manipulate the size of partitions. If you wish to enlarge a filesystem, you must make sure you can expand the size
of the underlying partition first. This can be done using fdisk(8) by deleting the partition and recreating it with a larger size or using lvex‐
tend(8), if you're using the logical volume manager lvm(8). When recreating the partition, make sure you create it with the same starting disk
cylinder as before! Otherwise, the resize operation will certainly not work, and you may lose your entire filesystem. After running fdisk(8), run
resize2fs to resize the ext2 filesystem to use all of the space in the newly enlarged partition

And make a backup before!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!