29 May 2016

Extending LVM volume

An LVM setup on a physical disk helps to increase the logical volume size in case it is almost full. Steps to be able to extend a logical volume, when there is free space on the physical volume:

  1. Unmount the volume
  2. Check if there is free space on physical volume (if no, need to add physical volume and extend group first)
  3. Extend logical volume using $> sudo lvextend -L+10G /dev/gp02/virtual
  4. Run fsck on logical volume: $> sudo e2fsck -f /dev/gp02/virtual
  5. Extend the file system on the logical volume: $> sudo resize2fs /dev/gp02/virtual
  6. Mount the logical volume: $> sudo mount -t auto /dev/gp02/virtual /virtual
Where:
/dev/gp02/virtual - is the logical volume
-L+10G - adds 10 GiB to the logical volume

In case there is no free space left on the physical volume, one needs to add a new physical volume to the group and then extend the logical volume.

References:
LVM HowTo [tldp.org]
Debian LVM [debian.org]
Working with LVM [debian-administration.org]

18 May 2016

pfSense 2.3.1 available.....almost

Warning: Upgrade your firewall after having a proper plan and back out option. As a minimum a snapshot before starting work and backup of the firewall configuration is recommended.


Did a Xenserver setup in the last few days with a pfSense 2.3 instance running on it. After finishing another VM and configuring the setup, what appears on pfSense administration page?


All issues marked for the 2.3.1 release had been closed recently, but didn't know that the update will appear out of the blue without any announcement on the pfSense blog!

Update 1


Tried to upgrade pfSense to 2.3.1.....
>>> Updating repositories metadata...
Updating pfSense-core repository catalogue...
pfSense-core repository is up-to-date.
Updating pfSense repository catalogue...
pfSense repository is up-to-date.
All repositories are up-to-date.
>>> Upgrading pkg... failed.
Failed

Need to wait a bit I think...

Update 2

Seems things are not ready yet
>>> Updating repositories metadata...
Updating pfSense-core repository catalogue...
pkg: http://pkg.pfsense.org/pfSense_v2_3_0_amd64-core/meta.txz: Connection reset by peer
repository pfSense-core has no meta file, using default settings
pkg: http://pkg.pfsense.org/pfSense_v2_3_0_amd64-core/packagesite.txz: Connection reset by peer
Unable to update repository pfSense-core
Updating pfSense repository catalogue...
pkg: http://pkg.pfsense.org/pfSense_v2_3_0_amd64-pfSense_v2_3_0/meta.txz: Connection reset by peer
repository pfSense has no meta file, using default settings
pkg: http://pkg.pfsense.org/pfSense_v2_3_0_amd64-pfSense_v2_3_0/packagesite.txz: Connection reset by peer
Unable to update repository pfSense
Failed


Update 3

Still got the first error above when trying to upgrade via console. Blog has a detailed post about the release now.

Update 4

Went to pfSense forums and noticed others are having similar issues. Need to wait for mirrors to synchronize as one of the packages is not there yet!

root: pfSense-upgrade -d
>>> Updating repositories metadata...
Updating pfSense-core repository catalogue...
pfSense-core repository is up-to-date.
Updating pfSense repository catalogue...
pfSense repository is up-to-date.
All repositories are up-to-date.
>>> Upgrading pkg...
Updating pfSense-core repository catalogue...
pfSense-core repository is up-to-date.
Updating pfSense repository catalogue...
pfSense repository is up-to-date.
All repositories are up-to-date.
New version of pkg detected; it needs to be installed first.
The following 1 package(s) will be affected (of 0 checked):

Installed packages to be UPGRADED:
        pkg: 1.6.2 -> 1.7.2_2 [pfSense]

The process will require 91 KiB more space.
2 MiB to be downloaded.
pkg: http://pkg.pfsense.org/pfSense_v2_3_0_amd64-pfSense_v2_3_0/All/pkg-1.7.2_2.txz: Not Found

Final update

Apparently, pfSense was not looking in the right place and was looking in the 2.3.0 folders. Waited for another half an hour and tried again and it downloaded the correct information and was able to find all packages needed for upgrade. 2.3.1 is up and running. Verifying functionality before deleting snapshot.