On 2020-05-06 06:12, linux guy wrote:
> I would appreciate them, Ed, just to make sure I'm not missing something.   
> No rush.  Don't get up early. 
>

Maybe I should have waited.  My afternoon freed up.  So, I created a new VM.

This is BEFORE.....
                                                   
[root@f32k2 ~]# pvs
  PV         VG           Fmt  Attr PSize   PFree
  /dev/vda2  fedora_f32k2 lvm2 a--  <31.16g 4.00m

[root@f32k2 ~]# lvs
  LV   VG           Attr       LSize  Pool Origin Data%  Meta%  Move Log 
Cpy%Sync Convert
  home fedora_f32k2 -wi-ao---- 18.00g                                           
        
  root fedora_f32k2 -wi-ao---- 12.00g                                           
        
  swap fedora_f32k2 -wi-ao----  1.15g
                                                  
[root@f32k2 ~]# df -h -t ext4
Filesystem                     Size  Used Avail Use% Mounted on
/dev/mapper/fedora_f32k2-root   12G  5.5G  5.8G  49% /
/dev/mapper/fedora_f32k2-home   18G  234M   17G   2% /home
/dev/vda1

I then booted the LIVE image and this time used the -r and -L in the following 
manner.

[root@localhost-live ~]# lvresize -r -L -4G /dev/fedora_f32k2/home
fsck from util-linux 2.35.1
/dev/mapper/fedora_f32k2-home: 625/1179648 files (6.1% non-contiguous), 
166652/4718592 blocks
resize2fs 1.45.5 (07-Jan-2020)
Resizing the filesystem on /dev/mapper/fedora_f32k2-home to 3670016 (4k) blocks.
The filesystem on /dev/mapper/fedora_f32k2-home is now 3670016 (4k) blocks long.

  Size of logical volume fedora_f32k2/home changed from 18.00 GiB (4608 
extents) to 14.00 GiB (3584 extents).
  Logical volume fedora_f32k2/home successfully resized.

[root@localhost-live ~]# lvresize -r -L +4G /dev/fedora_f32k2/root
fsck from util-linux 2.35.1
/dev/mapper/fedora_f32k2-root: 185073/786432 files (0.2% non-contiguous), 
1482127/3145728 blocks
  Size of logical volume fedora_f32k2/root changed from 12.00 GiB (3072 
extents) to 16.00 GiB (4096 extents).
  Logical volume fedora_f32k2/root successfully resized.
resize2fs 1.45.5 (07-Jan-2020)
Resizing the filesystem on /dev/mapper/fedora_f32k2-root to 4194304 (4k) blocks.
The filesystem on /dev/mapper/fedora_f32k2-root is now 4194304 (4k) blocks long.

[root@localhost-live ~]# lvs
  LV   VG           Attr       LSize  Pool Origin Data%  Meta%  Move Log 
Cpy%Sync Convert
  home fedora_f32k2 -wi-a----- 14.00g                                           
        
  root fedora_f32k2 -wi-a----- 16.00g                                           
        
  swap fedora_f32k2 -wi-a-----  1.15g

Just to check I ran fsck on both

[root@localhost-live ~]# e2fsck -ff /dev/fedora_f32k2/home
e2fsck 1.45.5 (07-Jan-2020)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/fedora_f32k2/home: 625/917504 files (6.1% non-contiguous), 149166/3670016 
blocks

[root@localhost-live ~]# e2fsck -ff /dev/fedora_f32k2/root
e2fsck 1.45.5 (07-Jan-2020)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/fedora_f32k2/root: 185073/1048576 files (0.2% non-contiguous), 
1499602/4194304 blocks

I then booted normally

AFTER

[root@f32k2 ~]# pvs
  PV         VG           Fmt  Attr PSize   PFree
  /dev/vda2  fedora_f32k2 lvm2 a--  <31.16g 4.00m

[root@f32k2 ~]# lvs
  LV   VG           Attr       LSize  Pool Origin Data%  Meta%  Move Log 
Cpy%Sync Convert
  home fedora_f32k2 -wi-ao---- 14.00g                                           
        
  root fedora_f32k2 -wi-ao---- 16.00g                                           
        
  swap fedora_f32k2 -wi-ao----  1.15g
                                                   
[root@f32k2 ~]# df -h -t ext4
Filesystem                     Size  Used Avail Use% Mounted on
/dev/mapper/fedora_f32k2-root   16G  5.5G  9.5G  37% /
/dev/vda1                      829M  222M  549M  29% /boot
/dev/mapper/fedora_f32k2-home   14G  230M   13G   2% /home

-- 
The key to getting good answers is to ask good questions.
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org

Reply via email to