pkg update -f and pkf upgrade -f
-
@kevindd992002 So, you're saying you already setup the ZFS on the single and installed pfSense? If that's the case, then run zfs set copies=2 yourpoolname at the CLI, then do the cron job...I take it your pool name is pool1.
-
@NollipfSense said in pkg update -f and pkf upgrade -f:
@kevindd992002 So, you're saying you already setup the ZFS on the single and installed pfSense? If that's the case, then run zfs set copies=2 yourpoolname at the CLI, then do the cron job...I take it your pool name is pool1.
- Reinstalled pfsense with ZFS
- After installation, you have the option to go the shell and set the zfs copies to 2. My pool name is the default zroot.
- Since the setting of the copies was done practically after the installation of pfsense, the system files are not duplicated until they get modified.
- The cron job is for the scrubbing part and that is not my concern here. My concern is how to get most of the files in the system modified so that zfs creates a duplicate for all of them. As per the post I linked to, he says and I quote:
"Just wait for the next update to your pfSense system, the update will rewrite almost all of the base system files and then you can do the 'pkg upgrade -f' trick to reinstall the rest."
The next update will modify/rewrite most of the files, I understand that. What I don't understand is why the need to do a
pkg upgrade -f
after the upgrade. What does this accomplish? -
@kevindd992002 It seems to be upgrading a pkg text file in the system; however, I'll link
@stephenw10 in the hope that he could explain better. -
@kevindd992002 said in pkg update -f and pkf upgrade -f:
The next update will modify/rewrite most of the files, I understand that. What I don't understand is why the need to do a
pkg upgrade -f
after the upgrade. What does this accomplish?Ah, I understand your question a bit better now. All
pkg upgrade -f
does is force thepkg
utility to reinstall all the concurrently installed package files whether they are "current" or not. Normally the utility will only install (or download and write files to disk) when there are newer versions posted on whatever remote repositorypkg
is pointed at. The "-f
" flag just tellspkg
to download and rewrite all of the installed package files regardless if they are already current.So the effect with that switch is everything
pkg
initially installed is installed again. This would touch all of those files and rewrite their physical content to disk. The normal behavior ofpkg upgrade
would be to only download and rewrite files to disk when the remote repository contains newer versions of those files. This is explained in that link I provided earlier. -
@bmeeks said in pkg update -f and pkf upgrade -f:
@kevindd992002 said in pkg update -f and pkf upgrade -f:
The next update will modify/rewrite most of the files, I understand that. What I don't understand is why the need to do a
pkg upgrade -f
after the upgrade. What does this accomplish?Ah, I understand your question a bit better now. All
pkg upgrade -f
does is force thepkg
utility to reinstall all the concurrently installed package files whether they are "current" or not. Normally the utility will only install (or download and write files to disk) when there are newer versions posted on whatever remote repositorypkg
is pointed at. The "-f
" flag just tellspkg
to download and rewrite all of the installed package files regardless if they are already current.So the effect with that switch is everything
pkg
initially installed is installed again. This would touch all of those files and rewrite their physical content to disk.Yeah, I figured that that's what it will do by reading this
Now, as I understand it you also need to update the catalogue before doing an upgrade. That's where
pkg update -f
comes in. This says that the -f switch will force a full download of the repository. Without it, does it just do a differential download of some sort? -
@kevindd992002 said in pkg update -f and pkf upgrade -f:
@bmeeks said in pkg update -f and pkf upgrade -f:
@kevindd992002 said in pkg update -f and pkf upgrade -f:
The next update will modify/rewrite most of the files, I understand that. What I don't understand is why the need to do a
pkg upgrade -f
after the upgrade. What does this accomplish?Ah, I understand your question a bit better now. All
pkg upgrade -f
does is force thepkg
utility to reinstall all the concurrently installed package files whether they are "current" or not. Normally the utility will only install (or download and write files to disk) when there are newer versions posted on whatever remote repositorypkg
is pointed at. The "-f
" flag just tellspkg
to download and rewrite all of the installed package files regardless if they are already current.So the effect with that switch is everything
pkg
initially installed is installed again. This would touch all of those files and rewrite their physical content to disk.Yeah, I figured that that's what it will do by reading this
Now, as I understand it you also need to update the catalogue before doing an upgrade. That's where
pkg update -f
comes in. This says that the -f switch will force a full download of the repository. Without it, does it just do a differential download of some sort?Yes, it always attempts to minimize the amount of downloaded/installed data when possible. The
-f
switch overrides that behavior. If you are familiar with how the Linux package managers work (apt, rpm, etc.) it's the same idea. The normal behavior downloads the smallest bits possible to accomplish the task.pkg
on FreeBSD is the equivalent ofapt
on Ubuntu. -
@bmeeks said in pkg update -f and pkf upgrade -f:
@kevindd992002 said in pkg update -f and pkf upgrade -f:
@bmeeks said in pkg update -f and pkf upgrade -f:
@kevindd992002 said in pkg update -f and pkf upgrade -f:
The next update will modify/rewrite most of the files, I understand that. What I don't understand is why the need to do a
pkg upgrade -f
after the upgrade. What does this accomplish?Ah, I understand your question a bit better now. All
pkg upgrade -f
does is force thepkg
utility to reinstall all the concurrently installed package files whether they are "current" or not. Normally the utility will only install (or download and write files to disk) when there are newer versions posted on whatever remote repositorypkg
is pointed at. The "-f
" flag just tellspkg
to download and rewrite all of the installed package files regardless if they are already current.So the effect with that switch is everything
pkg
initially installed is installed again. This would touch all of those files and rewrite their physical content to disk.Yeah, I figured that that's what it will do by reading this
Now, as I understand it you also need to update the catalogue before doing an upgrade. That's where
pkg update -f
comes in. This says that the -f switch will force a full download of the repository. Without it, does it just do a differential download of some sort?Yes, it always attempts to minimize the amount of downloaded/installed data when possible. The
-f
switch overrides that behavior. If you are familiar with how the Linux package managers work (apt, rpm, etc.) it's the same idea. The normal behavior downloads the smallest bits possible to accomplish the task.pkg
on FreeBSD is the equivalent ofapt
on Ubuntu.Yes, I do have a Debian system and I use apt update and apt upgrade. The only difference is that they don't have a -f switch which got me confused.
-
@kevindd992002 said in pkg update -f and pkf upgrade -f:
@bmeeks said in pkg update -f and pkf upgrade -f:
@kevindd992002 said in pkg update -f and pkf upgrade -f:
@bmeeks said in pkg update -f and pkf upgrade -f:
@kevindd992002 said in pkg update -f and pkf upgrade -f:
The next update will modify/rewrite most of the files, I understand that. What I don't understand is why the need to do a
pkg upgrade -f
after the upgrade. What does this accomplish?Ah, I understand your question a bit better now. All
pkg upgrade -f
does is force thepkg
utility to reinstall all the concurrently installed package files whether they are "current" or not. Normally the utility will only install (or download and write files to disk) when there are newer versions posted on whatever remote repositorypkg
is pointed at. The "-f
" flag just tellspkg
to download and rewrite all of the installed package files regardless if they are already current.So the effect with that switch is everything
pkg
initially installed is installed again. This would touch all of those files and rewrite their physical content to disk.Yeah, I figured that that's what it will do by reading this
Now, as I understand it you also need to update the catalogue before doing an upgrade. That's where
pkg update -f
comes in. This says that the -f switch will force a full download of the repository. Without it, does it just do a differential download of some sort?Yes, it always attempts to minimize the amount of downloaded/installed data when possible. The
-f
switch overrides that behavior. If you are familiar with how the Linux package managers work (apt, rpm, etc.) it's the same idea. The normal behavior downloads the smallest bits possible to accomplish the task.pkg
on FreeBSD is the equivalent ofapt
on Ubuntu.Yes, I do have a Debian system and I use apt update and apt upgrade. The only difference is that they don't have a -f switch which got me confused.
They have a
--force
switch or something similar. Been a while since I've needed to use either from the command line. -
apt-get does, but not apt. Anyway, will doing a pkg update -f do any potential damage compared to just letting its thing do without the switch?
-
@kevindd992002 said in pkg update -f and pkf upgrade -f:
apt-get does, but not apt. Anyway, will doing a pkg update -f do any potential damage compared to just letting its thing do without the switch?
No, so long as you have not manually monkeyed with the
repo.conf
file and say pointed it at some other remote repository that might contain different versions of stuff. But with a stock pfSense installation there is no harm in using the-f
switch other than just downloading and rewriting data that strictly does not require such.