New Posts  All Forums:Forum Nav:

LVM Help

post #1 of 8
Thread Starter 
Trying to figure out how to extend my partition. I seemed to have been able to get the partition bigger but the OS still doesn't recognize that it is now bigger.

pvs
Code:
  PV         VG     Fmt  Attr PSize  PFree
  /dev/sda5  fedora lvm2 a--  29.29g    0 

vgs
Code:
  VG     #PV #LV #SN Attr   VSize  VFree
  fedora   1   1   0 wz--n- 29.29g    0 

lvs
Code:
  LV   VG     Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  root fedora -wi-ao---- 29.29g                                                    

lsblk -l
Code:
 NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda           8:0    0 119.2G  0 disk 
sda1          8:1    0   450M  0 part 
sda2          8:2    0   100M  0 part /boot/efi
sda5          8:5    0 118.7G  0 part 
fedora-root 253:0    0  29.3G  0 lvm  /

lvdisplay
Code:
  --- Logical volume ---
  LV Path                /dev/fedora/root
  LV Name                root
  VG Name                fedora
  LV UUID                rW7qW3-5sy3-trHn-izkY-iGQM-eBSQ-kN2SXB
  LV Write Access        read/write
  LV Creation host, time laptop-fedora, 2015-12-02 20:31:40 -0600
  LV Status              available
  # open                 1
  LV Size                29.29 GiB
  Current LE             7499
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0

Did try these commands but hasn't done anything.
Code:
lvextend –l +100%FREE /dev/fedora/root
resize2fs /dev/fedora/root
My System
(21 items)
 
Server/HTPC
(11 items)
 
 
CPUMotherboardGraphicsRAM
AMD 8320 Asus m5a99fx pro EVGA 660ti  Gskill 8GB F3-1600C9-8GXM x2 
RAMHard DriveHard DriveHard Drive
4GB x2 OCZ Agility 3 Sasmsung 840 EVO Western Digital Caviar Blue 
Hard DriveOptical DriveOptical DriveCooling
Seagate 500gb Asus DRW-24B1ST Asus BC-12B1ST cool master hyper 212 evo 
OSOSMonitorMonitor
Windows 10 Pro x64 Arch  Asus 23" VH238 Asus 23" VH238H 
PowerCase
Corsair CX600M Fractal Design Define R5  
CPUMotherboardRAMHard Drive
i3 6100 Asus Z170M-Plus something 16gb DDR4 Western Digital 500GB 
Hard DriveHard DriveHard DriveOS
Samsung 2TB Western Digital Red 3TB HGST Deskter 4TB Unraid 6.x 
OSPowerCase
Ubuntu Server - VM Corsair CX430  Cooler Master HAF 912 
  hide details  
Reply
My System
(21 items)
 
Server/HTPC
(11 items)
 
 
CPUMotherboardGraphicsRAM
AMD 8320 Asus m5a99fx pro EVGA 660ti  Gskill 8GB F3-1600C9-8GXM x2 
RAMHard DriveHard DriveHard Drive
4GB x2 OCZ Agility 3 Sasmsung 840 EVO Western Digital Caviar Blue 
Hard DriveOptical DriveOptical DriveCooling
Seagate 500gb Asus DRW-24B1ST Asus BC-12B1ST cool master hyper 212 evo 
OSOSMonitorMonitor
Windows 10 Pro x64 Arch  Asus 23" VH238 Asus 23" VH238H 
PowerCase
Corsair CX600M Fractal Design Define R5  
CPUMotherboardRAMHard Drive
i3 6100 Asus Z170M-Plus something 16gb DDR4 Western Digital 500GB 
Hard DriveHard DriveHard DriveOS
Samsung 2TB Western Digital Red 3TB HGST Deskter 4TB Unraid 6.x 
OSPowerCase
Ubuntu Server - VM Corsair CX430  Cooler Master HAF 912 
  hide details  
Reply
post #2 of 8
you can only expand to whatever unpartitioned space exists within the volume group and it looks like the logical volume is already equal to the total size of the volume group (fedora). i don't remember the exact command but something like vgextend fedora /dev/sda5 should add that 120GB of space to the volume group and then the lvextend command should work
Black & Green
(12 items)
 
Dev Box
(7 items)
 
 
CPUMotherboardGraphicsRAM
Phenom II X6 1090T ASRock 970 Extreme3 Gigabyte GTX 750 Ti mushkin Blackline PC-12800 DDR3 
Hard DriveCoolingOSMonitor
Samsung 850 EVO Cooler Master Hyper 212 EVO Debian -nosystemd- LG Flatron 
KeyboardPowerMouseAudio
MechanicalEagle Z-77 Corsair CS650M Kinzu V2 Pro Asus Xonar Essence STX 
CPUMotherboardRAMHard Drive
Core2 Duo E7400 Asus P5Q Hyper-X  Sandisk 
OSPower
Fedora 22 Thermaltake 650W 
  hide details  
Reply
Black & Green
(12 items)
 
Dev Box
(7 items)
 
 
CPUMotherboardGraphicsRAM
Phenom II X6 1090T ASRock 970 Extreme3 Gigabyte GTX 750 Ti mushkin Blackline PC-12800 DDR3 
Hard DriveCoolingOSMonitor
Samsung 850 EVO Cooler Master Hyper 212 EVO Debian -nosystemd- LG Flatron 
KeyboardPowerMouseAudio
MechanicalEagle Z-77 Corsair CS650M Kinzu V2 Pro Asus Xonar Essence STX 
CPUMotherboardRAMHard Drive
Core2 Duo E7400 Asus P5Q Hyper-X  Sandisk 
OSPower
Fedora 22 Thermaltake 650W 
  hide details  
Reply
post #3 of 8
Thread Starter 
I'll have to look up that command. I did extend it with gparted just everything still shows it as only 30gigs, still 90gigs more to add.
My System
(21 items)
 
Server/HTPC
(11 items)
 
 
CPUMotherboardGraphicsRAM
AMD 8320 Asus m5a99fx pro EVGA 660ti  Gskill 8GB F3-1600C9-8GXM x2 
RAMHard DriveHard DriveHard Drive
4GB x2 OCZ Agility 3 Sasmsung 840 EVO Western Digital Caviar Blue 
Hard DriveOptical DriveOptical DriveCooling
Seagate 500gb Asus DRW-24B1ST Asus BC-12B1ST cool master hyper 212 evo 
OSOSMonitorMonitor
Windows 10 Pro x64 Arch  Asus 23" VH238 Asus 23" VH238H 
PowerCase
Corsair CX600M Fractal Design Define R5  
CPUMotherboardRAMHard Drive
i3 6100 Asus Z170M-Plus something 16gb DDR4 Western Digital 500GB 
Hard DriveHard DriveHard DriveOS
Samsung 2TB Western Digital Red 3TB HGST Deskter 4TB Unraid 6.x 
OSPowerCase
Ubuntu Server - VM Corsair CX430  Cooler Master HAF 912 
  hide details  
Reply
My System
(21 items)
 
Server/HTPC
(11 items)
 
 
CPUMotherboardGraphicsRAM
AMD 8320 Asus m5a99fx pro EVGA 660ti  Gskill 8GB F3-1600C9-8GXM x2 
RAMHard DriveHard DriveHard Drive
4GB x2 OCZ Agility 3 Sasmsung 840 EVO Western Digital Caviar Blue 
Hard DriveOptical DriveOptical DriveCooling
Seagate 500gb Asus DRW-24B1ST Asus BC-12B1ST cool master hyper 212 evo 
OSOSMonitorMonitor
Windows 10 Pro x64 Arch  Asus 23" VH238 Asus 23" VH238H 
PowerCase
Corsair CX600M Fractal Design Define R5  
CPUMotherboardRAMHard Drive
i3 6100 Asus Z170M-Plus something 16gb DDR4 Western Digital 500GB 
Hard DriveHard DriveHard DriveOS
Samsung 2TB Western Digital Red 3TB HGST Deskter 4TB Unraid 6.x 
OSPowerCase
Ubuntu Server - VM Corsair CX430  Cooler Master HAF 912 
  hide details  
Reply
post #4 of 8
While the space may have increased, the partition itself may not have (yet). You'll need to actually expand the partition, then resize2fs in order to get the fs to realize it can expand.

One of the ways I've been using and seen it done before (albeit not using lvm too much) is to fdisk the drive, delete the partition, recreate the partition with the new size and original starting blocks, then write the changes, then resize2fs. If you do it all in one go, you shouldn't have any issue. However, make to always have a backup in case the worst case scenario happens.

Or, if you have space, rsync the partition contents to another place for backup, re-create the parition with the right size, and then rsync back and edit the /etc/fstab accordingly.
Router
(12 items)
 
  
Reply
Router
(12 items)
 
  
Reply
post #5 of 8
Thread Starter 
If I have to go through all that I'll just wipe the thing, don't have enough for it to be worth it. Just haven't had the time lately.
My System
(21 items)
 
Server/HTPC
(11 items)
 
 
CPUMotherboardGraphicsRAM
AMD 8320 Asus m5a99fx pro EVGA 660ti  Gskill 8GB F3-1600C9-8GXM x2 
RAMHard DriveHard DriveHard Drive
4GB x2 OCZ Agility 3 Sasmsung 840 EVO Western Digital Caviar Blue 
Hard DriveOptical DriveOptical DriveCooling
Seagate 500gb Asus DRW-24B1ST Asus BC-12B1ST cool master hyper 212 evo 
OSOSMonitorMonitor
Windows 10 Pro x64 Arch  Asus 23" VH238 Asus 23" VH238H 
PowerCase
Corsair CX600M Fractal Design Define R5  
CPUMotherboardRAMHard Drive
i3 6100 Asus Z170M-Plus something 16gb DDR4 Western Digital 500GB 
Hard DriveHard DriveHard DriveOS
Samsung 2TB Western Digital Red 3TB HGST Deskter 4TB Unraid 6.x 
OSPowerCase
Ubuntu Server - VM Corsair CX430  Cooler Master HAF 912 
  hide details  
Reply
My System
(21 items)
 
Server/HTPC
(11 items)
 
 
CPUMotherboardGraphicsRAM
AMD 8320 Asus m5a99fx pro EVGA 660ti  Gskill 8GB F3-1600C9-8GXM x2 
RAMHard DriveHard DriveHard Drive
4GB x2 OCZ Agility 3 Sasmsung 840 EVO Western Digital Caviar Blue 
Hard DriveOptical DriveOptical DriveCooling
Seagate 500gb Asus DRW-24B1ST Asus BC-12B1ST cool master hyper 212 evo 
OSOSMonitorMonitor
Windows 10 Pro x64 Arch  Asus 23" VH238 Asus 23" VH238H 
PowerCase
Corsair CX600M Fractal Design Define R5  
CPUMotherboardRAMHard Drive
i3 6100 Asus Z170M-Plus something 16gb DDR4 Western Digital 500GB 
Hard DriveHard DriveHard DriveOS
Samsung 2TB Western Digital Red 3TB HGST Deskter 4TB Unraid 6.x 
OSPowerCase
Ubuntu Server - VM Corsair CX430  Cooler Master HAF 912 
  hide details  
Reply
post #6 of 8
let us say a prayer for the innocent bytes that will once again be sacrificed to the whims of the partition gods tongue.gif
Black & Green
(12 items)
 
Dev Box
(7 items)
 
 
CPUMotherboardGraphicsRAM
Phenom II X6 1090T ASRock 970 Extreme3 Gigabyte GTX 750 Ti mushkin Blackline PC-12800 DDR3 
Hard DriveCoolingOSMonitor
Samsung 850 EVO Cooler Master Hyper 212 EVO Debian -nosystemd- LG Flatron 
KeyboardPowerMouseAudio
MechanicalEagle Z-77 Corsair CS650M Kinzu V2 Pro Asus Xonar Essence STX 
CPUMotherboardRAMHard Drive
Core2 Duo E7400 Asus P5Q Hyper-X  Sandisk 
OSPower
Fedora 22 Thermaltake 650W 
  hide details  
Reply
Black & Green
(12 items)
 
Dev Box
(7 items)
 
 
CPUMotherboardGraphicsRAM
Phenom II X6 1090T ASRock 970 Extreme3 Gigabyte GTX 750 Ti mushkin Blackline PC-12800 DDR3 
Hard DriveCoolingOSMonitor
Samsung 850 EVO Cooler Master Hyper 212 EVO Debian -nosystemd- LG Flatron 
KeyboardPowerMouseAudio
MechanicalEagle Z-77 Corsair CS650M Kinzu V2 Pro Asus Xonar Essence STX 
CPUMotherboardRAMHard Drive
Core2 Duo E7400 Asus P5Q Hyper-X  Sandisk 
OSPower
Fedora 22 Thermaltake 650W 
  hide details  
Reply
post #7 of 8
I don't know if you solved this yet, but this is from the Gentoo Wiki.
Quote:
Extend VG

Volume groups group physical volumes, allowing administrators to use a pool of storage resources to allocate to file systems. When a volume group does not hold enough storage resources, it is necessary to extend the volume group with additional physical volumes.

The next example extends the volume group vg0 with a physical volume at /dev/sdc1:
Code:
root #vgextend vg0 /dev/sdc1

Remember that the physical volume first needs to be initialized as such!

Extend LV

When a logical volume needs to be expanded, then the lvextend command can be used to grow the allocated space for the logical volume.

For instance, to extend the logical volume lvol1 to a total of 500 MB:
Code:
root # lvextend -L500M /dev/vg0/lvol1

It is also possible to use the size to be added rather than the total size:
Code:
root # lvextend -L+350MB /dev/vg0/lvol1

An extended volume group does not immediately provide the additional storage to the end users. For that, the file system on top of the volume group needs to be increased in size as well. Not all file systems allow online resizing, so check the documentation for the file system in question for more information.

For instance, to resize an ext4 file system to become 500MB in size:
Code:
root # resize2fs /dev/vg0/lvol1 500M

I've extended my lvm, and I just followed the wiki.
Boinc Desktop
(14 items)
 
CrunchAholic
(8 items)
 
 
CPUMotherboardGraphicsRAM
AMD Ryzen 7 1700X ASRock X370 Taichi Gigabyte GTX 970 G1 HyperX Predator 
Hard DriveCoolingCoolingCooling
Hyper Predator M.2 Watercool Heatkiller IV PRO AM4 CPU Block EKWB GTX 970 GPU Block EKWB Coolstream XE 240 Radiator 
CoolingCoolingOSPower
EKWB Coolstream PE 360 Radiator Watercool Heatkiller 150mm Tube Res Gentoo Linux EVGA 850 G2 
CaseMouse
Thermaltake View 31 Tempered Glass RGB Edition Roccat Kone EMP 
CPUCPUMotherboardGraphics
Intel Xeon E5-2670 Intel Xeon E5-2670 Asrock Rack EP2C602 XFX RX 480 RS 
RAMHard DriveOSPower
64 GBs Samsung M939B1K70CHD-CH9 PC3-10600R Samsung HD322HJ Arch Linux Corsair AX1200 
  hide details  
Reply
Boinc Desktop
(14 items)
 
CrunchAholic
(8 items)
 
 
CPUMotherboardGraphicsRAM
AMD Ryzen 7 1700X ASRock X370 Taichi Gigabyte GTX 970 G1 HyperX Predator 
Hard DriveCoolingCoolingCooling
Hyper Predator M.2 Watercool Heatkiller IV PRO AM4 CPU Block EKWB GTX 970 GPU Block EKWB Coolstream XE 240 Radiator 
CoolingCoolingOSPower
EKWB Coolstream PE 360 Radiator Watercool Heatkiller 150mm Tube Res Gentoo Linux EVGA 850 G2 
CaseMouse
Thermaltake View 31 Tempered Glass RGB Edition Roccat Kone EMP 
CPUCPUMotherboardGraphics
Intel Xeon E5-2670 Intel Xeon E5-2670 Asrock Rack EP2C602 XFX RX 480 RS 
RAMHard DriveOSPower
64 GBs Samsung M939B1K70CHD-CH9 PC3-10600R Samsung HD322HJ Arch Linux Corsair AX1200 
  hide details  
Reply
post #8 of 8
Thread Starter 
No I haven't had a chance to play with it yet. Thanks for the info.
My System
(21 items)
 
Server/HTPC
(11 items)
 
 
CPUMotherboardGraphicsRAM
AMD 8320 Asus m5a99fx pro EVGA 660ti  Gskill 8GB F3-1600C9-8GXM x2 
RAMHard DriveHard DriveHard Drive
4GB x2 OCZ Agility 3 Sasmsung 840 EVO Western Digital Caviar Blue 
Hard DriveOptical DriveOptical DriveCooling
Seagate 500gb Asus DRW-24B1ST Asus BC-12B1ST cool master hyper 212 evo 
OSOSMonitorMonitor
Windows 10 Pro x64 Arch  Asus 23" VH238 Asus 23" VH238H 
PowerCase
Corsair CX600M Fractal Design Define R5  
CPUMotherboardRAMHard Drive
i3 6100 Asus Z170M-Plus something 16gb DDR4 Western Digital 500GB 
Hard DriveHard DriveHard DriveOS
Samsung 2TB Western Digital Red 3TB HGST Deskter 4TB Unraid 6.x 
OSPowerCase
Ubuntu Server - VM Corsair CX430  Cooler Master HAF 912 
  hide details  
Reply
My System
(21 items)
 
Server/HTPC
(11 items)
 
 
CPUMotherboardGraphicsRAM
AMD 8320 Asus m5a99fx pro EVGA 660ti  Gskill 8GB F3-1600C9-8GXM x2 
RAMHard DriveHard DriveHard Drive
4GB x2 OCZ Agility 3 Sasmsung 840 EVO Western Digital Caviar Blue 
Hard DriveOptical DriveOptical DriveCooling
Seagate 500gb Asus DRW-24B1ST Asus BC-12B1ST cool master hyper 212 evo 
OSOSMonitorMonitor
Windows 10 Pro x64 Arch  Asus 23" VH238 Asus 23" VH238H 
PowerCase
Corsair CX600M Fractal Design Define R5  
CPUMotherboardRAMHard Drive
i3 6100 Asus Z170M-Plus something 16gb DDR4 Western Digital 500GB 
Hard DriveHard DriveHard DriveOS
Samsung 2TB Western Digital Red 3TB HGST Deskter 4TB Unraid 6.x 
OSPowerCase
Ubuntu Server - VM Corsair CX430  Cooler Master HAF 912 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Linux, Unix