Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

debian 8 / extend to use full drive

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
maxboost
Posts: 1
Joined: 2017-02-14 18:27

debian 8 / extend to use full drive

#1 Post by maxboost »

Hello, im looking for a way to expand the storage (lvextend -l +100%FREE /dev/mapper/debian--vg-root) but im being very careful as is an live production server i manged to get the other system done just fine months ago but forgotten the steps

storage is 1.3TB as you can see on fdisk, but on /dev/mapper/debian--vg-root is only showing 119GB

root@mx:~# fdisk -l
Disk /dev/sda: 1.3 TiB, 1395864371200 bytes, 2726297600 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
Disklabel type: dos
Disk identifier: 0x1652c7ed

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 499711 497664 243M 83 Linux
/dev/sda2 501758 251656191 251154434 119.8G 5 Extended
/dev/sda5 501760 251656191 251154432 119.8G 8e Linux LVM

Disk /dev/mapper/debian--vg-root: 114.9 GiB, 123337703424 bytes, 240893952 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 /dev/mapper/debian--vg-swap_1: 4.9 GiB, 5251268608 bytes, 10256384 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
root@mx:~# df -l
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/dm-0 118425900 16125332 96261836 15% /
udev 10240 0 10240 0% /dev
tmpfs 2004064 213800 1790264 11% /run
tmpfs 5010156 88 5010068 1% /dev/shm
tmpfs 5120 0 5120 0% /run/lock
tmpfs 5010156 0 5010156 0% /sys/fs/cgroup
/dev/sda1 240972 33620 194911 15% /boot
tmpfs 1002032 12 1002020 1% /run/user/1000
tmpfs 1002032 0 1002032 0% /run/user/0
root@mx:~# pvdisplay
--- Physical volume ---
PV Name /dev/sda5
VG Name debian-vg
PV Size 119.76 GiB / not usable 0
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 30658
Free PE 0
Allocated PE 30658
PV UUID dXxbLy-2Kf5-kCEh-8gWa-JBKl-5Arx-h3zGEl
root@mx:~# vgdisplay
--- Volume group ---
VG Name debian-vg
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 6
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 119.76 GiB
PE Size 4.00 MiB
Total PE 30658
Alloc PE / Size 30658 / 119.76 GiB
Free PE / Size 0 / 0
VG UUID 6ckK2L-IaM8-fZOK-i6qD-DPpN-VdBz-KpZTbT

User avatar
bw123
Posts: 4015
Joined: 2011-05-09 06:02
Has thanked: 1 time
Been thanked: 28 times

Re: debian 8 / extend to use full drive

#2 Post by bw123 »

Don't know about resizing, why can't you backup the 119G, do your resizing/repartitioning and copy back? Sounds safer.
resigned by AI ChatGPT

EnigmaOne
Posts: 6
Joined: 2017-03-20 03:27

Re: debian 8 / extend to use full drive

#3 Post by EnigmaOne »

Gparted or PartedMagic would do the trick quickly, on such a small partition arrangement, if you can take it offline for about an hour.

You're correct that there is a way to do it live, but I, too, don't recall the process.

User avatar
dasein
Posts: 7680
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: debian 8 / extend to use full drive

#4 Post by dasein »

Depending on a great many factors, another approach might be to move directories/content to other partitions and symlink.

But I find myself stuck on a much more fundamental question: What's taking so much space on root? Why on Earth is 120GB not enough space?

Until that question is answered, I find myself tempted to think of this as an xy problem.

Caitlin
Posts: 329
Joined: 2012-05-24 07:32
Has thanked: 3 times
Been thanked: 2 times

Re: debian 8 / extend to use full drive

#5 Post by Caitlin »

When I saw XY problem, I initially thought it was a testosterone thing.

Seriously, I looked at the link for XY problem, and it reminded me of what I call the XYZ problem.

User post a question about Y. User really WANTS an answer that addresses Y.

Other user asks why Y. First user says they're trying to accomplish X.

Second user gives Z, which will solve X. BUT THIS IS ANSWERING THE WRONG QUESTION, AS FIRST USER IS ASKING ABOUT Y, NOT X!!!!!!!!!!!

IF FIRST USER WANTED A SOLUTION TO X, THEY WOULD HAVE ASKED FOR ONE!!!!!!!!!!!

SECOND USER IS JUST BEING STUPID!!!!!!!!!!!

Caitlin

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: debian 8 / extend to use full drive

#6 Post by debiman »

i have nothing against hormones per se, but writing ALL CAPS and copious use of exclamation marks certainly points to some sort of imbalance.

the question is valid - what would take almost 120GB on / ?
it warrants investigation.

if it's system files, there's probably something amiss.
if it's media files, or things under webroot, they can be easily moved to another partition.
better avoid partition extending, which is a tedious, resource intensive and somewhat risky thing to do.

Post Reply