Quantcast
Channel: Ubuntu Forums - Virtualisation
Viewing all articles
Browse latest Browse all 4211

[ubuntu] Increase root disk space without loosing data

$
0
0
Hi all,

I'm running a virtual machine with Ubuntu 14.04.1 LTS.
And i want to increase my disk space without loosing data.

I tried many same solution on the net but i cant really understand if i will loose my data.
I tried this command:

sudo resize2fs /dev/sda1 100G

resize2fs 1.42.9 (4-Feb-2014)
The containing partition (or device) is only 15728384 (4k) blocks.
You requested a new size of 26214400 blocks.



I can't run a live CD i'm on remote mode and here is informaion about my machine.

df -Th

Filesystem Type Size Used Avail Use% Mounted on
/dev/sda1 ext4 59G 35G 21G 63% /
none tmpfs 4.0K 0 4.0K 0% /sys/fs/cgroup
udev devtmpfs 7.9G 4.0K 7.9G 1% /dev
tmpfs tmpfs 1.6G 504K 1.6G 1% /run
none tmpfs 5.0M 0 5.0M 0% /run/lock
none tmpfs 7.9G 0 7.9G 0% /run/shm
none tmpfs 100M 0 100M 0% /run/user

fdisk -l


Disk /dev/sda: 161.1 GB, 161061273600 bytes
255 heads, 63 sectors/track, 19581 cylinders, total 314572800 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: 0x000f290d

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 125829119 62913536 83 Linux
/dev/sda2 125831166 134215679 4192257 5 Extended
/dev/sda5 125831168 134215679 4192256 82 Linux swap / Solaris




lsblk

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 150G 0 disk
├─sda1 8:1 0 60G 0 part /
├─sda2 8:2 0 1K 0 part
└─sda5 8:5 0 4G 0 part [SWAP]
sr0 11:0 1 1024M 0 rom


Best regards,
Nizar

Viewing all articles
Browse latest Browse all 4211

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>