Hello techrunnr readers, this document deals with issue “exact volume not showing in aws centos ec2”.
Here I have created an AWS Ec2 centos machine of 30Gb root hard disk. when I log in and check the server is was showing 6GB. Here is the method which I followed to solve this issue.
You Need root access to the server.
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda 202:0 0 30G 0 disk
└─xvda1 202:1 0 6G 0 part /
$ sudo su
# yum install gdisk
....snip...
# gdisk /dev/xvda
Command (? for help): p
Disk /dev/xvda: 62914560 sectors, 30.0 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 1CB06BCB-6003-4826-8208-C368357EAEDE
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 20971486
Partitions will be aligned on 2048-sector boundaries
Total free space is 8388541 sectors (4.0 GiB)
Number Start (sector) End (sector) Size Code Name
1 2048 12584959 6.0 GiB EF00
From the above output, you can see I used 30GB HDD but only 6GB is available.
I then delete the partition table information and create a new partition. I accepted the defaults and when prompted for the ‘Hex code or GUID’ I input EF00 which I found when I printed out the disk information above.
Command (? for help): x
Expert command (? for help): g
Enter the disk's unique GUID ('R' to randomize): 1CB06BCB-6003-4826-8208-C368357EAEDE
The new disk GUID is 1CB06BCB-6003-4826-8208-C368357EAEDE
Expert command (? for help): w
Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!
Do you want to proceed? (Y/N): Y
OK; writing new GUID partition table (GPT) to /dev/xvda.
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot.
The operation has completed successfully.
I then place gdisk into expert mode and set the unique GUID back to the original value that I got from the first print above. Finally write the new partition information to disk. At this point I rebooted and after reconnecting to the instance I now have access to all 30G.
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda 202:0 0 30G 0 disk
└─xvda1 202:1 0 30G 0 part /
$ df -hT
Filesystem Type Size Used Avail Use% Mounted on
/dev/xvda1 ext4 30G 2.1G 26G 8% /
tmpfs tmpfs 498M 0 498M 0% /dev/shm
Share this on WhatsApp Hi all, this document deals with how to install MongoDB compass. MongoDB Compass is a GUI application to visualize data in MongoDB. MongoDB compass allows you to view the real-time performance Read more…
Share this on WhatsApp Hi All, this document deals with how to setup documentdb in aws. A document database is a type of nonrelational database that is designed to store semistructured data as documents. AWS Read more…
Share this on WhatsApp Hi All, this document deals with different types of load balancer in AWS. The load balancer is one if the technology used in Computing which can distribute workload on various resources Read more…