Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 3316  / 1 Year ago, mon, april 10, 2023, 4:32:01

I installed ubuntu server using LVM partitioning on a 1 TB hard disk. However, after installation, i can only see 10 Gig space
here is the fidsk output



`
# fdisk -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00041507

Device Boot Start End Blocks Id System
/dev/sda1 * 1 10 71680 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 10 121602 976689152 8e Linux LVM

Disk /dev/dm-0: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 2147 MB, 2147483648 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/dm-1 doesn't contain a valid partition table
You have new mail in /var/mail/root

and df -h output

df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/system-root
9.9G 6.6G 2.8G 71% /
devtmpfs 1.9G 232K 1.9G 1% /dev
tmpfs 1.9G 4.0K 1.9G 1% /dev/shm
/dev/sda1 68M 22M 43M 34% /boot
tmpfs 6.0G 0 6.0G 0% /var/spool/asterisk/monitor
You have new mail in /var/mail/root


`



any way to increase this space without reisntalling?


More From » disk-usage

 Answers
3

You apparently only allocated 10gb to your root fs. You can use pvs to see how much space lvm has allocated to volumes, and how much it has left, and lvextend to increase the size of a logical volume ( does not need to be unmounted ). After increasing the size of the logical volume, you will need to tell the fs to use the new space. Assuming you are using ext[234], you can do this with resize2fs, which also can expand without unmounting.



sudo lvextend -L 20g system/root
sudo resize2fs /dev/mapper/system-root


Note that expanding the volume to use ALL of the unallocated space may not be such a great idea, since you won't have any left to add new volumes later, should you choose to do so, or make use of lvm snapshots. You can reduce the size of the volume later to free up some space, but that requires the fs to be unmounted, thus you will need to boot the server from some other medium.


[#37113] Monday, April 10, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
lishrag

Total Points: 306
Total Questions: 109
Total Answers: 125

Location: Saint Lucia
Member since Wed, Feb 8, 2023
1 Year ago
;