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, 4.6.0-0.bpo.1-amd64 GNU/Linux - Dell Mini 1012 2gb
User avatar
bw123
 
Posts: 2334
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: 7198
Joined: 2011-03-04 01:06
Location: Terra Incantationum


Return to System configuration

Who is online

Users browsing this forum: No registered users and 8 guests

fashionable