0

Yesterday my server provider provide me a 2TB SSD Ubuntu 20.04 server. But After sync with AWS S3 bucket around after used 185 GB space my server showing out of Space. I am novice in managing Server Space. I stored all file in /srv folder. What should I do? How I can I use remaining space? Please help

Here my SSD information:

sudo lshw -C disk
  *-disk                    
       description: ATA Disk
       product: CT2000MX500SSD1
       physical id: 0.0.0
       bus info: scsi@3:0.0.0
       logical name: /dev/sda
       version: 022
       serial: 1831E14C2802
       size: 1863GiB (2TB)
       capabilities: gpt-1.00 partitioned partitioned:gpt
       configuration: ansiversion=5 guid=a12f8a10-eab0-4417-9736-447f958bd104 logicalsectorsize=512 sectorsize=4096

Here the df information

df -h
Filesystem                         Size  Used Avail Use% Mounted on
tmpfs                              1.5G  1.3M  1.5G   1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv  196G  185G  1.4G 100% /
tmpfs                              7.5G     0  7.5G   0% /dev/shm
tmpfs                              5.0M     0  5.0M   0% /run/lock
tmpfs                              4.0M     0  4.0M   0% /sys/fs/cgroup
/dev/sda2                          976M  113M  796M  13% /boot
tmpfs                              1.5G  4.0K  1.5G   1% /run/user/1000

Another Information:

$ lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL
NAME                      FSTYPE       SIZE MOUNTPOINT        LABEL
loop0                     squashfs    55.3M /snap/core18/1885 
loop1                     squashfs    69.2M /snap/lxd/17936   
loop2                     squashfs    30.9M /snap/snapd/9721  
loop3                     squashfs    32.3M /snap/snapd/13170 
loop4                     squashfs    61.8M /snap/core20/1081 
loop5                     squashfs    55.4M /snap/core18/2128 
loop6                     squashfs    72.5M /snap/lxd/21497   
sda                                    1.8T                   
├─sda1                                   1M                   
├─sda2                    ext4           1G /boot             
└─sda3                    LVM2_member  1.8T                   
  └─ubuntu--vg-ubuntu--lv ext4         200G /     
1
  • Please try and reword the question I can make no sense of it and I think it needs more details.
    – David
    Oct 1, 2021 at 12:03

1 Answer 1

2

You are using LVM and your logical volume is only 200GB. You can extend your logical volume with the following:

lvextend -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv

You do not need to unmount to extend it. After that, extend the volume group with:

resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv

You can view status with these commands

pvs (view physical volumes)
vgs (view volume groups)
lvs (view logical volumes)

Another option would be to create more volumes and mount points using LVM, then move the data over to the new mount point. For instance make a /var volume and move the data from your /var to it, clean up the old and mount the new.

1
  • Thanks. It worked I extended the remaining space instead of creating. Oct 1, 2021 at 12:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .