Notes

Here I give some short notes related to the administration of a Linux system.

Table of contents

  1. Cleaning up space in /
  2. Mounting LVM2 (LVMR?) filesystems

Cleaning up space in /

Though it is much less prevalent nowadays, in the past it was occasionally possible to run out of disk space in the root directory (i.e., /). Usually, most of the space was “eaten up” by /var/cache and /var/log, so the task then is to free them.

There are a few possibilities to try, such as:

journalctl --disk-usage
journalctl --verify
journalctl --vacuum-size=50M

or edit

/etc/systemd/journald.conf

Alternatively, one can try cleaning the packagekit cache (which isn’t done automatically!?).

pkcan refresh force -c -1

Mounting LVM2 (LVMR?) filesystems

I came across this difficulty while trying to mount a hard drive which had an old Fedora install while running a fresh (i.e., newer) version of Fedora. A key issue may be that all Fedora (default) installs give these volumes the same name.

Here is what I did to solve the mounting problem (and re-gain access to all the old files):

su -
lvmdiskscan
lvdisplay # get LV name and VG name
vgdisplay
lvscan # see which are inactive
vgrename <UUID> <VolumeGroupName>

where <UUID> is the Volume Group UUID and <VolumeGroupName> is the New Volume Group Name.

modprobe dm-mod
vgchange -ay

Now you should be able to mount the old drive!

Some other commands that may be usefull are:

pvscan
vgscan

Copyright © 2020-2023 Ryan M. L. McFadden.