debian 8 / extend to use full drive

Kernels & Hardware, configuring network, installing services

debian 8 / extend to use full drive

Postby maxboost » 2017-02-14 18:52

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
maxboost
 
Posts: 1
Joined: 2017-02-14 18:27

Re: debian 8 / extend to use full drive

Postby bw123 » 2017-03-06 14:16

Don't know about resizing, why can't you backup the 119G, do your resizing/repartitioning and copy back? Sounds safer.
jessie/KDE4.14.2 plasma netbook, 3.16.39-1+deb8u2 (2017-03-07) x86_64 GNU/Linux
User avatar
bw123
 
Posts: 2378
Joined: 2011-05-09 06:02
Location: TN_USA

Re: debian 8 / extend to use full drive

Postby EnigmaOne » 2017-03-22 14:59

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.
EnigmaOne
 
Posts: 2
Joined: 2017-03-20 03:27

Re: debian 8 / extend to use full drive

Postby dasein » 2017-03-22 16:41

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.
User avatar
dasein
 
Posts: 7373
Joined: 2011-03-04 01:06
Location: Terra Incantationum

Re: debian 8 / extend to use full drive

Postby Caitlin » 2017-04-18 01:27

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
Caitlin
 
Posts: 186
Joined: 2012-05-24 07:32

Re: debian 8 / extend to use full drive

Postby debiman » 2017-04-18 04:48

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.
User avatar
debiman
 
Posts: 974
Joined: 2013-03-12 07:18


Return to System configuration

Who is online

Users browsing this forum: No registered users and 10 guests

fashionable