Pages

Thursday, January 25, 2018

Fedora 27 : About storage management and LVM.

About storage management offering flexibility like a complex task and LVM contributes to this complexity.
If you have seen incorrect usage of LVM many times and users are often neither aware of the possibilities or alternatives for the particular storage stacks.
If you use a VirtualBox software the you can increase the vdi file:
VBoxManage modifyhd fedora.vdi --resize 30960
About LVM
The wikipedia tell us:
In Linux, Logical Volume Manager is a device mapper target that provides logical volume management for the Linux kernel. Most modern Linux distributions are LVM-aware to the point of being able to have their root file systems on a logical volume.

To create a LVM, we need to run through the following steps:
  • Select the physical storage devices for LVM 
  • Create the Volume Group from Physical Volumes 
  • Create Logical Volumes from Volume Group
All linux commands start in this case with lv and pv .
If you want to have a good management of storage then one most common task is :

The resize the PV (Physical Volume) with all free space.

All LVM commands start with lv so try to find all into your terminal by type lv ant then use keys TAB+TAB.
To resize the LVM use this commands:
$sudo su 
# pvs
  PV         VG              Fmt  Attr PSize   PFree
...
# lvdisplay
  --- Logical volume ---
  LV Path                /dev/fedora/root
  LV Name                
...
# lvextend -l+100%FREE /dev/fedora/root 
...
# df -Th
If you use Volume group on LVM then you need to use:
vgextend your_vg /dev/sda...

Wednesday, January 3, 2018

Fedora 27 : Fix your distro with package-cleanup command.

Happy New Year 2018 !
A new beginning for us, fedora distribution users, and I prefer to write about what we all use in Fedora and maybe is less well known by new  readers.
Let's start with the development process of Fedora distro come and all the installed kernels.
Normally reason why you maybe want remove kernels is limited disk space, fix problems and see what is wrong with your Fedora distro.
First issue is about installed kernels, use this command:
#rpm -q kernel
Install this package tool named dnf-utils (is a collection of add-on tool for dnf tool).
#dnf install dnf-utils
Let's start with this command, we see that several packages are seemingly installed more than once:
#package-cleanup --cleandupes
If there’s any remaining trouble with the yum database you can see with this command:
#package-cleanup --problems
To remove installed kernels from old Fedora distros use this command:
#package-cleanup --oldkernels --count=2
... the Fedora 27 use this command:
#package-cleanup --oldkernels 2
To obtain list of orphaned packages currently residing in the system:
#package-cleanup --leaves