LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-14-2022, 02:44 AM   #1
smsuil
LQ Newbie
 
Registered: Nov 2022
Posts: 19

Rep: Reputation: 0
How to increase the disc space


Hi all,

Ubuntu 22.04
Disc - 2TB PCIe Gen 3 x 4 NVMe SSD

It was restored on the backup image
Ubuntu 22.04
Disc - 1TB PCIe Gen 3 x4 NVMe SSD

$ lsblk -e 7 -o name,size,type,fstype,mountpoint
Code:
NAME                    SIZE TYPE FSTYPE      MOUNTPOINT
sda                     3.6T disk             
└─sda1                  3.6T part ext4        
sdb                   931.5G disk             
├─sdb1                  450M part ntfs        
├─sdb2                   99M part vfat        
├─sdb3                   16M part             
├─sdb4                929.9G part ntfs        
├─sdb5                  518M part ntfs        
└─sdb6                  516M part ntfs        
sdc                   465.8G disk             
├─sdc1                  512M part vfat        
└─sdc2                465.3G part ext4        
nvme0n1                 1.8T disk             
├─nvme0n1p1             512M part vfat        /boot/efi
└─nvme0n1p2           953.4G part LVM2_member 
  ├─ubuntu--vg-root   930.4G lvm  ext4        /
  └─ubuntu--vg-swap_1   976M lvm  swap        [SWAP]
The disc is now running short of space. Actually it has 1TB un-allotted to ubuntu--vg-root.

Please advise how can I use the un-alloted 1TB space?

Thanks in advance.

Regards
 
Old 11-14-2022, 03:50 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,145

Rep: Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124Reputation: 4124
Let's see these.
Code:
df -hT
pvs
vgs
lvs
You should be able to exclude those snaps from the df as well ...

Last edited by syg00; 11-14-2022 at 03:54 AM.
 
Old 11-14-2022, 05:02 AM   #3
smsuil
LQ Newbie
 
Registered: Nov 2022
Posts: 19

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by syg00 View Post
Let's see these.
Code:
df -hT
pvs
vgs
lvs
$ df -hT
Code:
Filesystem                  Type   Size  Used Avail Use% Mounted on
tmpfs                       tmpfs  3.0G  2.0M  3.0G   1% /run
/dev/mapper/ubuntu--vg-root ext4   915G  858G   12G  99% /
tmpfs                       tmpfs   15G  6.7M   15G   1% /dev/shm
tmpfs                       tmpfs  5.0M  4.0K  5.0M   1% /run/lock
/dev/nvme0n1p1              vfat   511M  5.3M  506M   2% /boot/efi
tmpfs                       tmpfs  3.0G  1.7M  3.0G   1% /run/user/1000
$ pvs
Code:
  WARNING: Running as a non-root user. Functionality may be unavailable.
  /run/lock/lvm/P_global:aux: open failed: Permission denied
$ sudo pvs
Code:
  PV             VG        Fmt  Attr PSize    PFree  
  /dev/nvme0n1p2 ubuntu-vg lvm2 a--  <953.37g <22.05g
$ sudo vgs
Code:
  VG        #PV #LV #SN Attr   VSize    VFree  
  ubuntu-vg   1   2   0 wz--n- <953.37g <22.05g
$ sudo lvs
Code:
  LV     VG        Attr       LSize    Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  root   ubuntu-vg -wi-ao---- <930.37g                                                    
  swap_1 ubuntu-vg -wi-ao----  976.00m
Quote:
You should be able to exclude those snaps from the df as well ...
How?

Pls advise. Thanks

Regards
 
Old 11-14-2022, 06:44 AM   #4
smsuil
LQ Newbie
 
Registered: Nov 2022
Posts: 19

Original Poster
Rep: Reputation: 0
Hi syg00,

Further to my previous posting;

$ lsblk -o "NAME,MAJ:MIN,RM,SIZE,FSTYPE,MOUNTPOINT,UUID" | grep ubuntu
Code:
  ├─ubuntu--vg-root   253:0    0 930.4G ext4        /                                ef229efa-3019-4ba9-bddc-88c399244e99
  └─ubuntu--vg-swap_1 253:1    0   976M swap        [SWAP]                           ae829a93-d744-47b2-b378-85d58950c720
$ lsblk -o "NAME,MAJ:MIN,RM,SIZE,FSTYPE,MOUNTPOINT,UUID" | grep nvme0n1
Code:
nvme0n1               259:0    0   1.8T                                              
├─nvme0n1p1           259:1    0   512M vfat        /boot/efi                        0E3A-4ABA
└─nvme0n1p2           259:2    0 953.4G LVM2_member                                  WmiqMV-mxBN-xNbz-WKk3-04Qm-OEvb-gfo2C6
compare the screenshot "Computer/dev/disk/by-uuid (attached here)

ubuntu--vg-root -> ef229efa-3019-4ba9-bddc-88c399244e99 is there

nvme0n1p2 -> WmiqMV-mxBN-xNbz-WKk3-04Qm-OEvb-gfo2C6 is NOT there. Not mount yet?

Regards
Attached Thumbnails
Click image for larger version

Name:	screenshot_by-uuid.png
Views:	5
Size:	55.6 KB
ID:	39865  
 
Old 11-15-2022, 06:34 PM   #5
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,371

Rep: Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593Reputation: 1593
I think this will work.
Boot from the other installed ubuntu or from live usb.
use gparted to fix drive size and resize /dev/nvme0n1p2
Code:
sudo pvresize /dev/nvme0n1p2
sudo lvresize -l +100%FREE /dev/mapper/ubuntu--vg-root
sudo e2fsck -f /dev/mapper/ubuntu--vg-root
sudo resize2fs /dev/mapper/ubuntu--vg-root

Last edited by colorpurple21859; 11-15-2022 at 07:17 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Iso, disc backup, dd, disc to disc backup, UEFI, unmounting?, cyno77 Linux - Newbie 8 03-31-2021 08:34 PM
[SOLVED] consumed space bigger than total disc space? WiseDraco Slackware 6 02-19-2015 01:12 AM
user need to increase space to run a program its showing not enough space svani Red Hat 4 04-16-2010 04:04 AM
hard disk partitioning/I am out of space /how to increase linux space? RMLinux Red Hat 8 09-05-2008 12:33 PM
how much swap space is needed; how to increase swap space? johnpaulodonnell Linux - Newbie 5 03-23-2007 03:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration