Month: October 2022

Ubuntu iSCSI connect to multiple targets on boot

Ubuntu iSCSI connect to multiple targets on boot

Using iSCSI grub parameters can login to one iSCSI target at booting time, but for more than one targets, auto iSCSI session login might not be possible, at least I haven't found a way to do that.

In order to login to other multiple targets, modification need to be done in iSCSI discovered configuration

Login on boot

After discover the iSCSI targets, the targets will be in /etc/iscsi/nodes folder. Then found the correct target which in the format as below.

/etc/iscsi/nodes/<IQN>/<IP>,<Port>,1/default

Modify the above file and change following two parameters

...
node.startup = automatic
...
node.conn[0].startup = onboot
...

QEMU agent `qemu-ga` on ubuntu with high CPU utilization

QEMU agent qemu-ga on ubuntu with high CPU utilization

The qemu-ga process has 99% CPU utilization consistently.

Fix by restart

Restart qemu-qa agent

Fix by uninstall

In Proxmox VE, the qemu-guest-agent is used for mainly two things:

  • To properly shutdown the guest, instead of relying on ACPI commands or windows policies
  • To freeze the guest file system when making a backup (on windows, use the volume shadow copy service VSS).

If uninstall as the permanent solution, make sure that untick the Use QEMU Guest Agent under VM options.

References

qemu-agent 100% CPU usage
Qemu-guest-agent

Exclude files when run `rmlint`

Exclude files when run rmlint

To exclude files, using find command, then pass the parameter - to rmlint as folder name

$ find /target/dir -type f ! -name '*.nib' ! -name '*.icon' ! -name '*.plist' | rmlint [options] -

For only search specific type of file, can use following command:

find /mm -iname "*.DFF" -type f | rmlint -T df --config=sh:handler=hardlink -

References

How do I exclude/ignore specific file types/extensions with rmlint?

Update NextCloudPi

Update NextCloudPi

If go thru NextCloudPI WebUI to update NextCloudPi or NextCloud running by NextCloudPi in Docker, errors could be occurred, which can lead the user not found error. The correct way to do is recreate container using new image.

Note: /data in container must be mapped or backed up.

Update NextCloudPI Image

docker image pull ownyourbits/nextcloudpi-x86

Remove existing container

docker stop nextcloudpi
docker rm nextcloudpi

Recreate container

Use the previous docker parameter, make sure /data was mapped.

docker run -d -p 4443:4443 -p 443:443 -p 80:80 -v /app/nc/data:/data --name nextcloudpi ownyourbits/nextcloudpi-x86 $IP

Update NextCloudPi

Login to NextCloudPi, the NextCloudPi will update itself, need to wait for the process pigz completed.

Restore data from backup (If required)

Go to Backup => nc-backup-auto in NextCloudPi WebUI, to find out the backup path, and restore the latest if required.

Manual Update NextCloud

Go to Updates => nc-update-nextcloud in NextCloudPi WebUI, to update NextCloud Manually.

Install Ansible for Ubuntu

Install Ansible for Ubuntu

Install pip

Check pip installed

python3 -m pip -V

Install pip using root

apt install python3-pip

Install ansible

Install ansible using normal user

python3 -m pip install --user ansible

Note: ignore the warning message about .local/bin, the folder will be created and will be in the path after re-login

Upgrade ansible

python3 -m pip install --upgrade --user ansible

References

Installing Ansible