Fedora Linux Support Community & Resources Center
  #1  
Old 16th March 2017, 09:32 PM
fedix Offline
Registered User
 
Join Date: Oct 2006
Location: Mpumalanga, South Africa
Posts: 66
linuxfedorafirefox
Expand LVM partition

Hi,

I have a 500GB hard drive of which 180GB is not used.
Filesystem (Partition 1) 524 MB
Partiton 2 LVM2 320 GB
Free space 180GB

I regularly get low disk space and would like to extend Partition 2 to use the 180GB free space. How do I do that?

Thanks
Reply With Quote
  #2  
Old 16th March 2017, 09:57 PM
smr54 Online
Registered User
 
Join Date: Jan 2010
Posts: 7,007
linuxchrome
Re: Expand LVM partition

I have a page that covers this. http://srobb.net/lvm.html
Reply With Quote
  #3  
Old 21st March 2017, 04:28 PM
fedix Offline
Registered User
 
Join Date: Oct 2006
Location: Mpumalanga, South Africa
Posts: 66
linuxfedorafirefox
Help with Disk space and extend

I'e read some forums and threads but none gave me workable solution.

I have 3 physical drives; sdb and sdc contains data and stuff, each with one partition.

Sda is divided in 3 partitions:
sda1 Partitio1 - filesystem 524MB Ext4 Mounted as /boot
sda2 Partition2 - 320GB LVM2 PV
sda3 Partition3 - 180GB Ext4

sda3 is all free space while my root is almost full with regular low disk notifications.

vgdisplay gave me this:
Code:
VG Name               fedora
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  4
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                3
  Open LV               3
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               297.60 GiB
  PE Size               4.00 MiB
  Total PE              76185
  Alloc PE / Size       76184 / 297.59 GiB
  Free  PE / Size       1 / 4.00 MiB
  VG UUID               Mm4Yy......Y1rl
pvscan gave this output:
Code:
PV /dev/sda2   VG fedora          lvm2 [297.60 GiB / 4.00 MiB free]
  Total: 1 [297.60 GiB] / in use: 1 [297.60 GiB] / in no VG: 0 [0   ]
I would like to extend sda2 with the free space of 180GB available on sda3, which is currently empty!

How can I do that?

Thanks
Reply With Quote
  #4  
Old 21st March 2017, 05:42 PM
nobody Offline
Registered User
 
Join Date: Mar 2012
Location: München, Deutschland
Posts: 665
windows_98_nt_2000chrome
Question Re: Help with Disk space and extend

Quote:
Originally Posted by fedix View Post
I would like to extend sda2 with the free space of 180GB available on sda3, which is currently empty!

How can I do that?
Hello Felix,

You need to post for me the info I followed/executed on my Fedora 25 VM, in exact order. One extras I need is, when you will run gparted, to capture and post for me this pop-up graphical gparted partitions window as attachment to this thread.

CLI transcript follows:

Quote:
user@localhost ~]$ df
Filesystem 1K-blocks Used Available Use% Mounted on
devtmpfs 2002512 0 2002512 0% /dev
tmpfs 2013980 0 2013980 0% /dev/shm
tmpfs 2013980 4464 2009516 1% /run
tmpfs 2013980 0 2013980 0% /sys/fs/cgroup
/dev/mapper/fedora-root 46342384 9871348 34093924 23% /
tmpfs 2013980 92 2013888 1% /tmp
/dev/sda1 999320 174884 755624 19% /boot
tmpfs 402796 16 402780 1% /run/user/42
tmpfs 402796 20 402776 1% /run/user/1000
[user@localhost ~]$ xhost +
access control disabled, clients can connect from any host
[user@localhost ~]$ su -m
Password:
[root@localhost ~]# dnf install gparted
Last metadata expiration check: 0:07:39 ago on Tue Mar 21 17:30:49 2017.
Package gparted-0.28.1-1.fc25.x86_64 is already installed, skipping.
Dependencies resolved.
Nothing to do.
Complete!
[root@localhost ~]# gparted
Created symlink /run/systemd/system/-.mount → /dev/null.
Created symlink /run/systemd/system/boot.mount → /dev/null.
Created symlink /run/systemd/system/proc-fs-nfsd.mount → /dev/null.
Created symlink /run/systemd/system/run-user-1000.mount → /dev/null.
Created symlink /run/systemd/system/run-user-42.mount → /dev/null.
Created symlink /run/systemd/system/tmp.mount → /dev/null.
Created symlink /run/systemd/system/var-lib-machines.mount → /dev/null.
Created symlink /run/systemd/system/var-lib-nfs-rpc_pipefs.mount → /dev/null.
======================
libparted : 3.2
======================
Removed /run/systemd/system/-.mount.
Removed /run/systemd/system/boot.mount.
Removed /run/systemd/system/proc-fs-nfsd.mount.
Removed /run/systemd/system/run-user-1000.mount.
Removed /run/systemd/system/run-user-42.mount.
Removed /run/systemd/system/tmp.mount.
Removed /run/systemd/system/var-lib-machines.mount.
Removed /run/systemd/system/var-lib-nfs-rpc_pipefs.mount.
[root@localhost ~]#
Thank you,
_nobody_
__________________
I am nobody, and nobody is perfect, therefore I am perfect!
Reply With Quote
  #5  
Old 21st March 2017, 07:39 PM
fedix Offline
Registered User
 
Join Date: Oct 2006
Location: Mpumalanga, South Africa
Posts: 66
linuxfedorafirefox
Re: Help with Disk space and extend

Thanks smr54. I've read your page but got lost in the process. (I easily get lost :-0 )
Reply With Quote
  #6  
Old 21st March 2017, 07:54 PM
fedix Offline
Registered User
 
Join Date: Oct 2006
Location: Mpumalanga, South Africa
Posts: 66
linuxfedorafirefox
Re: Help with Disk space and extend

Quote:
Originally Posted by nobody View Post
Hello Felix,

You need to post for me the info I followed/executed on my Fedora 25 VM, in exact order. One extras I need is, when you will run gparted, to capture and post for me this pop-up graphical gparted partitions window as attachment to this thread.

CLI transcript follows:



Thank you,
_nobody_
Hi Nobody....

df...
Code:
Lêerstelsel               1K-blok InGebruik Beskikbaar Gebruik% Geheg aan
devtmpfs                  4049464         0    4049464       0% /dev
tmpfs                     4061116    139020    3922096       4% /dev/shm
tmpfs                     4061116      1668    4059448       1% /run
tmpfs                     4061116         0    4061116       0% /sys/fs/cgroup
/dev/mapper/fedora-root  51475068  41133484    7703760      85% /
tmpfs                     4061116        72    4061044       1% /tmp
/dev/sda1                  487652    166577     291379      37% /boot
/dev/mapper/fedora-home 249352084  88578948  148083728      38% /home
tmpfs                      812220        16     812204       1% /run/user/42
tmpfs                      812220        56     812164       1% /run/user/1000
/dev/sdb1               480589520 354697920  101455940      78% /run/media/thabo/my-files
/dev/sda3               172005608     61468  163137024       1% /run/media/thabo/3dc14e84-455c-4a15-af79-4aa74960600a
/dev/sdc1               480589520 239146540  217007320      53% /run/media/thabo/my-files2
gparted:
Code:
Created symlink /run/systemd/system/-.mount → /dev/null.
Created symlink /run/systemd/system/boot.mount → /dev/null.
Created symlink /run/systemd/system/home.mount → /dev/null.
Created symlink /run/systemd/system/proc-fs-nfsd.mount → /dev/null.
Created symlink /run/systemd/system/run-media-thabo-3dc14e84\x2d455c\x2d4a15\x2daf79\x2d4aa74960600a.mount → /dev/null.
Created symlink /run/systemd/system/run-media-thabo-my\x2dfiles.mount → /dev/null.
Created symlink /run/systemd/system/run-media-thabo-my\x2dfiles2.mount → /dev/null.
Created symlink /run/systemd/system/run-user-1000.mount → /dev/null.
Created symlink /run/systemd/system/run-user-42.mount → /dev/null.
Created symlink /run/systemd/system/run-vmblock\x2dfuse.mount → /dev/null.
Created symlink /run/systemd/system/tmp.mount → /dev/null.
Created symlink /run/systemd/system/var-lib-machines.mount → /dev/null.
Created symlink /run/systemd/system/var-lib-nfs-rpc_pipefs.mount → /dev/null.
======================
libparted : 3.2
======================

Gparted GUI
Reply With Quote
  #7  
Old 22nd March 2017, 02:41 AM
nobody Offline
Registered User
 
Join Date: Mar 2012
Location: München, Deutschland
Posts: 665
windows_98_nt_2000chrome
Arrow Re: Help with Disk space and extend

OK, Fedix.

I see the situation. You have legacy boot, not UEFI, which is, anyway, not important for this story.

Regarding your picture, and gparted, you had or installed: the following is true!

You still have on your /dev/sda3 some data, which is, I assume, directory structure, initially created by formatting /dev/sda3 with ext4 FS.

You should do the following using your gparted GUI:

Quote:
Originally Posted by fedix View Post
Gparted GUI
[1] Delete partition /dev/sda3;
[2] Merge it with unallocated 1.00 MB partition;
[3] Execute these transactions;
[4] extend /dev/sda2 to the end of your physical HDD;
[5] Execute this transaction (if possible, since you will perform this on your active running partition)!

If not possible to do [5], you need to get to the following page: http://gparted.org/download.php

And then download EXACTLY the same (i686 or x86_64 Fedora) gparted live image you do have, and create one legacy live USB stick (minimum size 0.5GB), to perform these 5 operations I have suggested.

If all possible, please, then reboot your Fedora, and report the following:
Quote:
- df;
- Gparted GUI (image, similar to that one, you have created).
Then we go next steps from there.

_nobody_
__________________
I am nobody, and nobody is perfect, therefore I am perfect!
Reply With Quote
  #8  
Old 22nd March 2017, 02:54 PM
fedix Offline
Registered User
 
Join Date: Oct 2006
Location: Mpumalanga, South Africa
Posts: 66
linuxfedorafirefox
Thumbs up Re: Help with Disk space and extend

Quote:
Originally Posted by nobody View Post
OK, Fedix.

I see the situation. You have legacy boot, not UEFI, which is, anyway, not important for this story.

Regarding your picture, and gparted, you had or installed: the following is true!

You still have on your /dev/sda3 some data, which is, I assume, directory structure, initially created by formatting /dev/sda3 with ext4 FS.

You should do the following using your gparted GUI:



[1] Delete partition /dev/sda3;
[2] Merge it with unallocated 1.00 MB partition;
[3] Execute these transactions;
[4] extend /dev/sda2 to the end of your physical HDD;
[5] Execute this transaction (if possible, since you will perform this on your active running partition)!

If not possible to do [5], you need to get to the following page: http://gparted.org/download.php

And then download EXACTLY the same (i686 or x86_64 Fedora) gparted live image you do have, and create one legacy live USB stick (minimum size 0.5GB), to perform these 5 operations I have suggested.

If all possible, please, then reboot your Fedora, and report the following:


Then we go next steps from there.

_nobody_
Thanks Nobody! That was actually easy (up till now )

Here is the output of df:
Code:
Lêerstelsel               1K-blok InGebruik Beskikbaar Gebruik% Geheg aan
devtmpfs                  4049464         0    4049464       0% /dev
tmpfs                     4061116         4    4061112       1% /dev/shm
tmpfs                     4061116      1672    4059444       1% /run
tmpfs                     4061116         0    4061116       0% /sys/fs/cgroup
/dev/mapper/fedora-root  51475068  41212084    7625160      85% /
tmpfs                     4061116        72    4061044       1% /tmp
/dev/mapper/fedora-home 249352084  88592952  148069724      38% /home
/dev/sda1                  487652    166577     291379      37% /boot
tmpfs                      812220        12     812208       1% /run/user/42
tmpfs                      812220        44     812176       1% /run/user/1000
/dev/sdb1               480589520 354697920  101455940      78% /run/media/thabo/my-files
/dev/sdc1               480589520 239146540  217007320      53% /run/media/thabo/my-files2
.....
and the screenshot of gparted GUI after reboot.
Reply With Quote
  #9  
Old 22nd March 2017, 04:15 PM
nobody Offline
Registered User
 
Join Date: Mar 2012
Location: München, Deutschland
Posts: 665
windows_98_nt_2000chrome
Talking Re: Help with Disk space and extend

OK, Fedix,

Please, bear in mind that this is also new area for me. I just (reading sm54's http://srobb.net/lvm.html) understood what I need to do (and I did it, in the very same way/I had the same use case as you - as I am advising you)!

You here did just the first step of extending your LVM. You extended Physical Volume to the physical end of your only HDD device: /dev/sda (actually, you added physical limit to your /dev/sda2, which is your current LVM).

Now, we need to do the logical additions.

You do NOT have Volume Groups (more physical HDDs and partitions to be unified under LV umbrella). Thus, we'll skip VG commands, as my best understanding is.
_______

Please, do the following: # lvdisplay

My best guess is the following (you'll get first three line of lvdisplay as this):

Code:
  --- Logical volume ---
  LV Path                /dev/fedora/root
  LV Name                root
  VG Name                fedora
Now, the two commands (you should issue as root) are the following:
[1] # lvextend -l 100%VG /dev/fedora/root
[2] # resize2fs /dev/fedora/root

This should work. Every command should notify you that it performed success! Then you reboot your notebook, and df command will show you the rest.

Please, let us know!

_nobody_
__________________
I am nobody, and nobody is perfect, therefore I am perfect!
Reply With Quote
  #10  
Old 22nd March 2017, 05:10 PM
lsatenstein Offline
Registered User
 
Join Date: Jun 2005
Location: Montreal, Que, Canada
Posts: 3,940
linuxfedorafirefox
Re: Help with Disk space and extend

I ran into a similar situation. I have 5 disks. This is what I did.

On the disk with ample space, I set aside a partition which I called scratch. Its mount point is /scratch
(refer to my fstab below). I created on /scratch, a few directories (refer to my script below)
I use a set of softlinks to that directory. I don't have to move all of / to that device, just what I wanted.
Code:
#
# /etc/fstab
# Created by anaconda on Sun Feb 26 08:02:34 2017
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
#<file system>                              <mount>     <type>  <options>             <dmpPass>  <xref>      <label>
UUID=4a46cd6c-b135-427c-91c3-606e488e4da6   /           xfs     defaults                0  0     #/dev/sdd6  sdd7RFRslash
UUID=7682d6bf-4fbb-4a9c-9f58-e18896939242   /boot       ext4    defaults,noatime        1  2     #/dev/sdd5  sdd5RFRboot
UUID=e5a6595d-d099-4d8d-bfa7-e9d42882a141   /home       ext4    defaults,noatime        1  2     #/dev/sdd8  sdd8RFRhome
UUID=f7cc2a9f-020d-4dde-b1b3-e7bd882aa573   /scratch    xfs     defaults                0  0     #/dev/sdb2  sdb2scratch
UUID=bab6395e-ca0e-4d90-9b56-7ffacb52be1d   swap        swap    defaults                0  0     #/dev/sdd7  sdd8RFRswap
tmpfs                                       /tmp        tmpfs   nodev,nosuid,size=1G    0  0     #/dev/tmpfs ramdisk
My root, the / , has a sudo chmod 1777 for /scratch vis ls -l /scratch
drwxrwxrwt. 36 root root 4096 Mar 22 00:25 scratch

My home folder Notice the soft links I created for the directories I moved to that 300gig partition.
Code:
lrwxrwxrwx. 1 leslie leslie   12 Feb 26 08:39 bin -> /scratch/bin
drwxrwxr-x. 4 leslie leslie 4096 Mar  4 15:08 'Calibre Library'
drwxr-xr-x. 2 leslie leslie 4096 Feb 26 08:38 Desktop
lrwxrwxrwx. 1 leslie leslie   20 Feb 26 08:39 Development -> /scratch/Development
lrwxrwxrwx. 1 leslie leslie   18 Feb 26 08:39 Documents -> /scratch/Documents
lrwxrwxrwx. 1 leslie leslie   18 Feb 26 08:39 Downloads -> /scratch/Downloads
drwx------. 9 leslie leslie 4096 Mar 22 11:30 Dropbox
lrwxrwxrwx. 1 leslie leslie   14 Feb 26 08:39 Music -> /scratch/Music
lrwxrwxrwx. 1 leslie leslie   17 Feb 26 08:39 Pictures -> /scratch/Pictures
lrwxrwxrwx. 1 leslie leslie   15 Feb 26 08:39 Public -> /scratch/Public
lrwxrwxrwx. 1 leslie leslie    8 Feb 26 08:39 scratch -> /scratch
lrwxrwxrwx. 1 leslie leslie   18 Feb 26 08:39 Templates -> /scratch/Templates
lrwxrwxrwx. 1 leslie leslie   15 Feb 26 08:39 Videos -> /scratch/Videos
The following is the script that I use when I initially create a new fresh Fedora or other Linux.
Code:
#!/bin/bash
if [ $EUID != 1000 ]; then
        echo "only valid for usr 1000. You are not authorized to use this script"
        echo "only valid for usr 1000. You are not authorized to use this script"
        exit
fi
cd ~
DIRS="bin Documents Development Documents Downloads Music Pictures Public Videos Templates "
  cd ~
  for var in $DIRS
  do
   rmdir ~/$var
   mkdir -p /scratch/$var
    ln -s /scratch/$var $var
   echo ""
  done

ln -s /scratch scratch
echo "ln -s /scratch scratch"
  ls -l ~
I also use testing distributions such as Fedora26, and Rawhide (Fedora27). I use F25KDE and F25Gnome. All store the data on that common /scratch.
Intentionally not shown is a Backup for /scratch to a second disk and as well, to an external backup.

By the way, if I destroy a Linux, I do not destroy the /scratch. When I reinstall, I add the /scratch to the fstab and run that script shown above. I am the only user of my system, though what I show can be setup for a multi-user environment.
__________________
Leslie in Montreal

Interesting web sites list
http://forums.fedoraforum.org/showth...40#post1697840
Reply With Quote
  #11  
Old 23rd March 2017, 05:34 PM
fedix Offline
Registered User
 
Join Date: Oct 2006
Location: Mpumalanga, South Africa
Posts: 66
linuxfedorafirefox
Thumbs up Re: Help with Disk space and extend

Quote:
Originally Posted by nobody View Post
OK, Fedix,

Please, bear in mind that this is also new area for me. I just (reading sm54's http://srobb.net/lvm.html) understood what I need to do (and I did it, in the very same way/I had the same use case as you - as I am advising you)!

You here did just the first step of extending your LVM. You extended Physical Volume to the physical end of your only HDD device: /dev/sda (actually, you added physical limit to your /dev/sda2, which is your current LVM).

Now, we need to do the logical additions.

You do NOT have Volume Groups (more physical HDDs and partitions to be unified under LV umbrella). Thus, we'll skip VG commands, as my best understanding is.
_______

Please, do the following: # lvdisplay

My best guess is the following (you'll get first three line of lvdisplay as this):

Code:
  --- Logical volume ---
  LV Path                /dev/fedora/root
  LV Name                root
  VG Name                fedora
Now, the two commands (you should issue as root) are the following:
[1] # lvextend -l 100%VG /dev/fedora/root
[2] # resize2fs /dev/fedora/root

This should work. Every command should notify you that it performed success! Then you reboot your notebook, and df command will show you the rest.

Please, let us know!

_nobody_
Thanks nobody!!!! That worked perfectly!

---------- Post added at 06:33 PM ---------- Previous post was at 06:32 PM ----------

Quote:
Originally Posted by lsatenstein View Post
I ran into a similar situation. I have 5 disks. This is what I did.

On the disk with ample space, I set aside a partition which I called scratch. Its mount point is /scratch
(refer to my fstab below). I created on /scratch, a few directories (refer to my script below)
I use a set of softlinks to that directory. I don't have to move all of / to that device, just what I wanted.
Code:
#
# /etc/fstab
# Created by anaconda on Sun Feb 26 08:02:34 2017
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
#<file system>                              <mount>     <type>  <options>             <dmpPass>  <xref>      <label>
UUID=4a46cd6c-b135-427c-91c3-606e488e4da6   /           xfs     defaults                0  0     #/dev/sdd6  sdd7RFRslash
UUID=7682d6bf-4fbb-4a9c-9f58-e18896939242   /boot       ext4    defaults,noatime        1  2     #/dev/sdd5  sdd5RFRboot
UUID=e5a6595d-d099-4d8d-bfa7-e9d42882a141   /home       ext4    defaults,noatime        1  2     #/dev/sdd8  sdd8RFRhome
UUID=f7cc2a9f-020d-4dde-b1b3-e7bd882aa573   /scratch    xfs     defaults                0  0     #/dev/sdb2  sdb2scratch
UUID=bab6395e-ca0e-4d90-9b56-7ffacb52be1d   swap        swap    defaults                0  0     #/dev/sdd7  sdd8RFRswap
tmpfs                                       /tmp        tmpfs   nodev,nosuid,size=1G    0  0     #/dev/tmpfs ramdisk
My root, the / , has a sudo chmod 1777 for /scratch vis ls -l /scratch
drwxrwxrwt. 36 root root 4096 Mar 22 00:25 scratch

My home folder Notice the soft links I created for the directories I moved to that 300gig partition.
Code:
lrwxrwxrwx. 1 leslie leslie   12 Feb 26 08:39 bin -> /scratch/bin
drwxrwxr-x. 4 leslie leslie 4096 Mar  4 15:08 'Calibre Library'
drwxr-xr-x. 2 leslie leslie 4096 Feb 26 08:38 Desktop
lrwxrwxrwx. 1 leslie leslie   20 Feb 26 08:39 Development -> /scratch/Development
lrwxrwxrwx. 1 leslie leslie   18 Feb 26 08:39 Documents -> /scratch/Documents
lrwxrwxrwx. 1 leslie leslie   18 Feb 26 08:39 Downloads -> /scratch/Downloads
drwx------. 9 leslie leslie 4096 Mar 22 11:30 Dropbox
lrwxrwxrwx. 1 leslie leslie   14 Feb 26 08:39 Music -> /scratch/Music
lrwxrwxrwx. 1 leslie leslie   17 Feb 26 08:39 Pictures -> /scratch/Pictures
lrwxrwxrwx. 1 leslie leslie   15 Feb 26 08:39 Public -> /scratch/Public
lrwxrwxrwx. 1 leslie leslie    8 Feb 26 08:39 scratch -> /scratch
lrwxrwxrwx. 1 leslie leslie   18 Feb 26 08:39 Templates -> /scratch/Templates
lrwxrwxrwx. 1 leslie leslie   15 Feb 26 08:39 Videos -> /scratch/Videos
The following is the script that I use when I initially create a new fresh Fedora or other Linux.
Code:
#!/bin/bash
if [ $EUID != 1000 ]; then
        echo "only valid for usr 1000. You are not authorized to use this script"
        echo "only valid for usr 1000. You are not authorized to use this script"
        exit
fi
cd ~
DIRS="bin Documents Development Documents Downloads Music Pictures Public Videos Templates "
  cd ~
  for var in $DIRS
  do
   rmdir ~/$var
   mkdir -p /scratch/$var
    ln -s /scratch/$var $var
   echo ""
  done

ln -s /scratch scratch
echo "ln -s /scratch scratch"
  ls -l ~
I also use testing distributions such as Fedora26, and Rawhide (Fedora27). I use F25KDE and F25Gnome. All store the data on that common /scratch.
Intentionally not shown is a Backup for /scratch to a second disk and as well, to an external backup.

By the way, if I destroy a Linux, I do not destroy the /scratch. When I reinstall, I add the /scratch to the fstab and run that script shown above. I am the only user of my system, though what I show can be setup for a multi-user environment.

Thanks Leslie. I'll definitely play around with your suggestion. I like the idea of been able to change the installation but still have everything "as is" on the "scratch" partition!

---------- Post added at 06:34 PM ---------- Previous post was at 06:33 PM ----------

Thank you guys! My issue has been resolved!
Reply With Quote
  #12  
Old 23rd March 2017, 09:57 PM
nobody Offline
Registered User
 
Join Date: Mar 2012
Location: München, Deutschland
Posts: 665
windows_98_nt_2000chrome
Talking Re: Help with Disk space and extend

Quote:
Originally Posted by fedix View Post
Thanks nobody!!!! That worked perfectly!


(fedix, you should mark this thread solved, BTW)
_______

Kudos to smr54. Not only for the finding solutions, but I, reading his page (which is somehow not well organized for beginners/much better for advanced Fedora/Linux users), I was able to get to the core of it:

http://srobb.net/lvm.html#Expanding

Quote:
Originally Posted by smr54
We will now extend the volumegroup testvol into the new physical volume.
vgextend testvol /dev/sdd2
If we now run vgdisplay testvol we'll see that we have 5353 extents free. We can, once again, either use -l 5353 or -l 100%VG.
lvextend -l 100%VG /dev/testvol/test
(I believe that using lvextend -lr will resize the file system, but, to be honest, haven't tried it. These days, I'm usually using zfs instead.)

Lastly we have to resize the filesystem as well. (But see above). One can unmount the partition, first, but usually, it's not necessary. If one runs df -H at this point, you'll still see the old size of 20GB. If using the RedHat and offshoots default of an XFS file system, use xfs_growfs, otherwise, use resize2fs.
resize2fs /dev/testvol/test
Thanks to this text, and other findings on the net, I finally understood what this LVM crap is about (which, because of my lazyness, was for me Chineses' Villages for years). Man!

_nobody_
__________________
I am nobody, and nobody is perfect, therefore I am perfect!
Reply With Quote
  #13  
Old 23rd March 2017, 11:02 PM
smr54 Online
Registered User
 
Join Date: Jan 2010
Posts: 7,007
linuxchrome
Re: Help with Disk space and extend

Thanks for the kind words. At the time I made it, I was mostly using it with stuff at work. I'm far too lazy to try to reorganize it again, but at least there's a table of contents.

Last edited by smr54; 24th March 2017 at 03:13 PM.
Reply With Quote
  #14  
Old 24th March 2017, 10:31 AM
antikythera Offline
Administrator
 
Join Date: Dec 2013
Location: United Kingdom
Posts: 4,078
linuxchrome
Re: Help with Disk space and extend

@fedix - please do not open duplicate threads for the same issue. threads merged.
__________________
Download, Install and Share Fedora - Official ISO Torrents | Live ISO Respins containing post-release updates
Reply With Quote
  #15  
Old 24th March 2017, 05:57 PM
fedix Offline
Registered User
 
Join Date: Oct 2006
Location: Mpumalanga, South Africa
Posts: 66
linuxfedorafirefox
Thumbs up Re: Help with Disk space and extend

Quote:
Originally Posted by antikythera View Post
@fedix - please do not open duplicate threads for the same issue. threads merged.
SORRY!, I actually forgot that I already posted a question and only realised it when I got to read smr54's reply.

---------- Post added at 06:57 PM ---------- Previous post was at 06:56 PM ----------

Quote:
Originally Posted by smr54 View Post
Thanks for the kind words. At the time I made it, I was mostly using it with stuff at work. I'm far too lazy to try to reorganize it again, but at least there's a table of contents.
Agree with nobody; now I understand your post better...
Reply With Quote
Reply

Tags
disk, expand, extend, lvm, partition, space

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Remove Windows, use free space, extend LVM? robinmuilwijk Using Fedora 4 8th August 2015 07:01 PM
Extend LVM into unallocated space after using clonezilla to clone to a larger HD tmort Using Fedora 9 13th March 2012 05:07 PM
HELP to extend LVM with free space coffee412 Using Fedora 4 9th October 2009 02:29 AM
Hard disk -- Free space not equal to available space ?? michaeleekk Hardware & Laptops 2 30th August 2006 02:20 PM


Current GMT-time: 20:41 (Monday, 29-05-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat