This is an old revision of the document!
Programming and Computing - ShellScript
Installing Linux on TBao Laptops - PartedMagic
PDF Documents and Plugin
Embed videos & playlists Instructions
Tweet to @glassparrot
My Twitter Google Search
1. Snapcraft Store
2. How do you monitor the progress of dd?
3. How to Update Ubuntu packages on 18.04 Bionic Beaver Linux
4. Things to do After Installing Ubuntu 18.04 and 18.10
5. Comparison of file systems - ZFS Wiki
Top
containerd and docker TW Notebook
6. Interesting things you can do with ZFS
Top
https://www.youtube.com/watch?v=6Bo4vYgmVhk
Interesting things you didn't know you could do with ZFS
7. OpenZFS channel
8. ZFS Wiki
9. ZFS quick command reference with examples
10. Managing Devices in ZFS Storage Pools
11. Zfs playlist
12. ZFS Datasets dissappear on reboot
I have installed ZFS(0.6.5) in my Centos 7 and I have also created a zpool, everything works fine apart from the fact that my datasets disappear on reboot. I have been trying to debug this issue with the help of various online resources and blogs but couldn't get the desired result. After reboot, when I issue the zfs list command I get "no datasets available" , and zpool list gives "no pools available" After doing a lot of online research, I could make it work by manually importing the cache file using zpool import -c cachefile, but still I had to run zpool set cachefile=/etc/zfs/zpool.cache Pool before the reboot so as to import it later on after reboot. This is what systemctl status zfs-import-cache looks like, zfs-import-cache.service - Import ZFS pools by cache file Loaded: loaded (/usr/lib/systemd/system/zfs-import-cache.service; static) Active: inactive (dead) cat /etc/sysconfig/zfs # ZoL userland configuration. # Run `zfs mount -a` during system start? ZFS_MOUNT='yes' # Run `zfs unmount -a` during system stop? ZFS_UNMOUNT='yes' # Run `zfs share -a` during system start? # nb: The shareiscsi, sharenfs, and sharesmb dataset properties. ZFS_SHARE='yes' # Run `zfs unshare -a` during system stop? ZFS_UNSHARE='yes' # Specify specific path(s) to look for device nodes and/or links for the # pool import(s). See zpool(8) for more information about this variable. # It supersedes the old USE_DISK_BY_ID which indicated that it would only # try '/dev/disk/by-id'. # The old variable will still work in the code, but is deprecated. #ZPOOL_IMPORT_PATH="/dev/disk/by-vdev:/dev/disk/by-id" # Should the datasets be mounted verbosely? # A mount counter will be used when mounting if set to 'yes'. VERBOSE_MOUNT='no' # Should we allow overlay mounts? # This is standard in Linux, but not ZFS which comes from Solaris where this # is not allowed). DO_OVERLAY_MOUNTS='no' # Any additional option to the 'zfs mount' command line? # Include '-o' for each option wanted. MOUNT_EXTRA_OPTIONS="" # Build kernel modules with the --enable-debug switch? # Only applicable for Debian GNU/Linux {dkms,initramfs}. ZFS_DKMS_ENABLE_DEBUG='no' # Build kernel modules with the --enable-debug-dmu-tx switch? # Only applicable for Debian GNU/Linux {dkms,initramfs}. ZFS_DKMS_ENABLE_DEBUG_DMU_TX='no' # Keep debugging symbols in kernel modules? # Only applicable for Debian GNU/Linux {dkms,initramfs}. ZFS_DKMS_DISABLE_STRIP='no' # Wait for this many seconds in the initrd pre_mountroot? # This delays startup and should be '0' on most systems. # Only applicable for Debian GNU/Linux {dkms,initramfs}. ZFS_INITRD_PRE_MOUNTROOT_SLEEP='0' # Wait for this many seconds in the initrd mountroot? # This delays startup and should be '0' on most systems. This might help on # systems which have their ZFS root on a USB disk that takes just a little # longer to be available # Only applicable for Debian GNU/Linux {dkms,initramfs}. ZFS_INITRD_POST_MODPROBE_SLEEP='0' # List of additional datasets to mount after the root dataset is mounted? # # The init script will use the mountpoint specified in the 'mountpoint' # property value in the dataset to determine where it should be mounted. # # This is a space separated list, and will be mounted in the order specified, # so if one filesystem depends on a previous mountpoint, make sure to put # them in the right order. # # It is not necessary to add filesystems below the root fs here. It is # taken care of by the initrd script automatically. These are only for # additional filesystems needed. Such as /opt, /usr/local which is not # located under the root fs. # Example: If root FS is 'rpool/ROOT/rootfs', this would make sense. #ZFS_INITRD_ADDITIONAL_DATASETS="rpool/ROOT/usr rpool/ROOT/var" # List of pools that should NOT be imported at boot? # This is a space separated list. #ZFS_POOL_EXCEPTIONS="test2" # Optional arguments for the ZFS Event Daemon (ZED). # See zed(8) for more information on available options. #ZED_ARGS="-M" I am not sure if this is a known issue,.. if yes, Is there any workaround for this? perhaps an easy way to preserve my datasets after reboot and preferably without the overhead of an cache file. linux zfs centos7 zfsonlinux shareimprove this question edited Oct 28 '15 at 11:09 asked Oct 28 '15 at 10:16 Vincent 143117 what zpool status -v and zpool import says? – ostendali Oct 28 '15 at 10:28 Hi, zpool status -v zpool status -v no pools available And, zpool import gives me this pool: zfsPool id: 10064980395446559551 state: ONLINE action: The pool can be imported using its name or numeric identifier. config: zfsPool ONLINE sda4 ONLINE – Vincent Oct 28 '15 at 10:39 zfs import is how I could make it work, by setting the cachefile initially using the set cachefile command – Vincent Oct 28 '15 at 10:40 you missed /etc/init/zpool-import.conf, can you post the content of that file as well? – ostendali Oct 28 '15 at 11:19 1 Is the ZFS target enabled? systemctl status zfs.target – Michael Hampton♦ Oct 28 '15 at 12:44 show 6 more comments 3 Answers active oldest votes up vote 5 down vote accepted Please make sure the zfs service (target) is enabled. That's what handles pool import/export on boot/shutdown. zfs.target loaded active active ZFS startup target You should never have to struggle with this. If you have a chance, run an update on your zfs distribution, as I know the startups services have improved over the last few releases: [root@zfs2 ~]# rpm -qi zfs Name : zfs Version : 0.6.5.2 Release : 1.el7.centos shareimprove this answer answered Oct 28 '15 at 12:50 ewwhite 170k73356704 Hi, I had tested 0.6.5.3 as well which happens to be the latest release I believe, but still faced this issue, with .6.5.3 I had to even run modprobe zfs everytime I did a reboot to load the modules. Btw, Target is not enabled please check the output in comments above(reply to Michael). May I know how to set one ? thanks. – Vincent Oct 28 '15 at 13:02 All you need to do is probably something like: systemctl enable zfs.target – ewwhite Oct 28 '15 at 13:19 add a comment up vote 3 down vote I also had the problem of the zfs disappearing after a reboot. Running CentOS 7.3 and ZFS 0.6.5.9 Reimporting brought it back (zpool import zfspool) only until the next reboot. Here's the command that worked for me (to make it persist through reboots): systemctl preset zfs-import-cache zfs-import-scan zfs-mount zfs-share zfs-zed zfs.target (Found this at: https://github.com/zfsonlinux/zfs/wiki/RHEL-%26-CentOS ) shareimprove this answer edited Apr 5 '17 at 23:50 chicks 2,93771730 answered Apr 5 '17 at 22:28 Jeff 312 add a comment up vote 1 down vote ok, so the pool is there, which means the problem is with your zfs.cache, it is not persistent and that is why it looses its config when your reboot. what I'd suggest to do is to run: zpool import zfsPool zpool list And check if the if it is available. Reboot the server and see if it comes back, if it doesn't then perform the same steps and run: zpool scrub Just to make sure everything is alright with your pool etc. Pls also post the content of: /etc/default/zfs.conf /etc/init/zpool-import.conf Alternatively, if you are looking for workaround to this issue you can set it of course as follow. Change the value in from 1 to 0: /etc/init/zpool-import.conf and add the following to your /etc/rc.local: zfs mount -a That will do the trick.
13. Why use zfs for virtual machines??
14. SparkleShare - Samba - or Something Else?
15. Pacman/Rosetta - Arch Linux
16. Linux Guide
17. List of Unix commands - ShellScript
18. SSH Forwarding: Local vs Remote with examples
Top
Execute Script or Command
Note that the exec functions are non interactive
so they cannot prompt for a sudo password. A trick
is to use -S which reads the password from stdin:
command <- 'echo "mypassword!" | sudo -s -S apt-get update -y' out <- ssh_exec_wait(session, command)
Be very careful with hardcoding passwords!
ssh -R 8080:localhost:80 user@host
SSH PORT FORWARDING EXAMPLE - Free-tier server from Amazon AWS
19. How To Use SSH Remote Login - ShellScript
20. How To Automate Tasks using Cron
Top
apt-get install gnome-shedule (ubuntu16.04 deb)
https://www.youtube.com/watch?v=bizxL_CA6J8
21. The Linux Foundation
22. Joe Collins channel
23. Install list of packages using apt-get
Top
DistroWatch.com - try ubuntu mini install (good for pendrives and re-installs using pkglist)
The LiveCD List - KnoppixCD
* Generate pkglist for Debian
sudo dpkg --get-selections | sed "s/.*deinstall//" | sed "s/install$//g" > ~/pkglist
* Use pkglist for Debian
sudo apt-get install $(cat pkglist)
Pacman/Rosetta for other distributions - see Arch Linux
24. How to change ubuntu install from legacy to uefi
25. Ubuntu Doc BasicChroot
26. Linux kernel interfaces
27. Comparison of platform virtualization software - oVirt
28. Docker (software)
Top
Docker Hub signin - Docker Alpine Linux with a complete package index and only 5 MB in size! - About Alpine Linux
Get Docker CE for Ubuntu or binaries
29. oVirt Virtualization Management Platform
Top
Features List - oVirt Guest Agent on Ubuntu
Can be installed on Linux or Windows
oVirt 3.6: Features and Deep Dives playlist
30. Proxmox Virtual Environment
31. Sportage 12 channel
32. Xen
Top
XenServer 7.5 Free Edition
Hardware Virtual Machine (HVM) and Paravirtualization (PV) Good Tutorial Page
Xen
Building a Home Lab Virtual Server Quick and Dirty - Hak5 1819
Proxmox VE vs. XenServer Plus OpenXenManager for Linux - Hak5 1820
Building a $600 VM Server - Hak5 1818
33. What is Xvisor (for ARM platforms)
34. Linux From Scratch
35. Embedded Linux Wiki
36. Go to KNOPPIX
Top
Bootstrap for testing PXE boot configs in VirtualBox
VirtualBox: Networking options and how-to manage them
37. Cross compileing
38. Parted Magic (Modifying)
39. Mounting Linux Partitions in Windows with FSproxy
40. How to Add a Hard Drive to a Linux System
41. How to Convert a Physical Server to a Citrix Xen Virtual Server (P2V)
42. LVM HOWTO
43. Remove Disk from LVM Array on Ubuntu
44. Move your Ubuntu system to another computer in 3 simple steps
45. chrysocome.net>>virtualvolumes on Windows
46. Synology 2 bay NAS DiskStation DS218+
Top
with Advanced Btrfs file system and eSata Port - $298.00 - Amazon and has upgradable memory
Also, the DS218+ supports on-the-fly hardware transcoding
47. Welcome to the FreeNAS Documentation Project!
Top
https://www.ixsystems.com/documentation/freenas/11.2-U6/freenas.html
FreeNAS_User_Guide.pdf
FreeNAS® How-To Tutorial Guides
How To Setup Shares, Groups & User Permissions in FreeNAS 11
Virtualization Tutorial: Configuring Citrix XenServer With FreeNAS & ISCSI For Storage
48. QNAP Virtualization Station enables virtualized desktop operations
Top
QNAP TS-251 2-Bay Personal Cloud NAS, Intel 2.41GHz Dual Core CPU with Media Transcoding - $287.00 Amazon
Qnap TS-231P-US Personal Cloud NAS with DLNA - ARM Cortex A15 1.7GHz Dual Core, 1GB RAM - $189.57 Amazon
mobile apps and Airplay support
Also see Linux Station
49. How to convert a VirtualBox virtual machine to QEMUwto image?
50. How do I convert a VirtualBox VDI file to a VMware vdmk?
51. File-based dynamically-allocated hard-disk on Linux
52. How to use loop devices (losetup)
53. How To Host a Web Server with a Raspberry Pi
Top
Raspian - arm - Emulating Raspberry Pi in Windows the easy way with Qemu
Raspberry Pi’s PIXEL Linux desktop now available for x86 PCs or Virtualbox Article
Raspberry Pi Commands: sudo apt-get install apache2 -y hostname -I sudo nano /var/www/index.html sudo apt-get install php5 libapache2-mod-php5 -y sudo nano /var/www/example.php PHP File Code: <?php echo "Today's date is ".date('Y-m-d H:i:s'); ?> sudo apt-get install mysql-server php5-mysql -y cd /var/www sudo chown pi: . rm * wget http://wordpress.org/latest.tar.gz tar xzf latest.tar.gz mv wordpress/* ./ rm -rf wordpress latest.tar.gz sudo chown -R -f www-data:www-data /var/www mysql -uroot -pInsert Password Here create database wordpress;
Manjaro Community Editions - x86 - for Virtualbox
How To Install Manjaro Arm On The Raspberry pi 1 2 3 Or Zero
http://manjaro-arm.org/
https://www.youtube.com/watch?v=nu6j5lfjO_w
Go to Pacman/Rosetta page for Manjaro install.
Basic operations Action Arch Red Hat/Fedora Debian/Ubuntu SLES/openSUSE Gentoo Install a package(s) by name pacman -S dnf install apt install zypper install zypper in emerge [-a] Remove a package(s) by name pacman -Rs dnf remove apt remove zypper remove zypper rm emerge -C
Arch Linux for Raspberry Pi Youtube
INSTALLING ARCH LINUX ON RASPBERRY PI
54. Emulating Raspberry Pi in Windows the easy way
Top
https://sourceforge.net/projects/rpiqemuwindows/
There is a very nice raspberry pi forum posting about "Emulating Raspberry Pi in Windows the easy way". Somebody all ready did all the work to make raspberry pi emulation in Windows as simple as possible. The instructions are download a zip from sourceforge - https://sourceforge.net/projects/rpiqemuwindows/ Unzip the file when it finishes downloading. Inside the folder you should find a run.bat file which will do all the magic for you. The zip file is literally Raspberry Pi in a zip, it contains Qemu along with the Wheezy squeeze, and the batch file that you run to start the emulation contains the exact command to start Qemu as an ARM CPU running Wheezy. This is the epitome of KISS. It should be noted that others have downloaded and checked the files for viruses and that the emulation has been confirmed on several versions of Windows. I can confirm the emulation works in Windows 7 Ultimate.
Installing and running Debian armel on an emulated ARM machine on Windows (QEMU)
55. Make a VPN Server with a Raspberry Pi, OpenVPN and Stunnel
56. Fast, Free, and Easy VPN Build in Minutes - Hak5 2022
Top
Setting up an OpenVPN Server on Debian, Ubuntu and CentOS
Setting up an OpenVPN Server on Raspberry Pi - Kali (goddess) destroyer of evil forces.
Linux Server Build: OpenVPN From Scratch - Hak5 2019
How to Build An OpenVPN Access Point - Hak5 2017
SSH into our VPS and get openvpn-as going wget http://swupdate.openvpn.org/as/openvpn-as-2.1.1-Ubuntu14.amd_64.deb dpkg -i openvpn*.deb /usr/local/openvpn_as/bin/ovpn-init #Choose 0.0.0.0 Log in as Admin Auth General Local User Permissions Create new user LOGIN not Connect Download "Yourself (autologin profile)" Test connection at with a test.php script.
Finalizing the OpenVPN-AS Home Server Build - Hak5 1823
How to Build an OpenVPN Access Point Pt 2 - Hak5 2018
Access Internal Networks with Reverse VPN connections - Hak5 1921
How to Tether Without The Fees - Hak5 2111
Fast and Easy Free VPN from Google - The Open Source OUTLINE - Hak5 2403
57. Hak5.org
58. How-to get MySQL setup properly
59. How to Upgrade or Reload Linux while Keeping Your Data
60. Procedural programming
61. Object-oriented programming
62. List of object-oriented programming languages
63. My 5 Favorite Linux Shell Tricks for SPEED (and efficiency)
64. A Bunch Of Tips And Fun Tricks
Top
Restoring the default settings for Whisker Menu in Ubuntu Studio 16.04
https://www.youtube.com/watch?v=YDhfzXblqU0
65. Linux Tip | System Tools
Top
https://www.youtube.com/watch?v=OCAjv6DCJBQ
Useful Linux Applications | What You'll Need To Get Things Done
USEFUL LINUX APPLICATIONS Browsers: Chromium Firefox Google Chrome E-Mail: Evolution Geary Thunderbird BitTorrent: Transmission Chat: HexChat Pidgin Text Editors: Gedit Kate Nano Pluma Vi Office: AbiWord Gnumeric LibreOffice CD Rippers: Asunder CD/DVD Burners: Brasero K3b Audio/Video/Music: Amarok Banshee Clementine Rhythmbox VLC Audio Editors: Ardour Audacity Ocenaudio Audio/Video Converters: Handbreak SoundConverter Video Editors: Kdenlive Lightworks OpenShot Screen Capture/Webcasting: Cheese GUVCView Kazam OBS RecordMyDesktop SimpleScreenRecorder Vocoscreen Visualization: Gnome Boxes VirtualBox VMware Photo/Graphics: Blender Eye of GNOME/Image Viewer GIMP gThumb Inkscape Shotwell SimpleScan Utilities: Archive Manager BleachBit Disks Document Viewer Grsync
66. The advanced parameters for restoring mode in Clonezilla
Top
CloneZilla Image Creation and Restore Tutorial
The advanced parameters for restoring mode in Clonezilla
Clonezilla Clone Larger Disk to Smaller Disk-Workaround
67. An Introduction To Snap Packages for Linux
Top
https://www.youtube.com/watch?v=j40tNL3t4gw
What is SimpleScreenRecorder
- SNAP COMMANDS:
- sudo snap find : To list the available packages.
- sudo snap install (package name): To install a package.
- sudo snap list: To view all the installed snap packages.
- sudo snap changes: To view a list of logged actions.
- sudo snap refresh (package name): To upgrade a package to its latest available version.
- sudo snap remove: To uninstall a package.
68. chroot - for OpenZim_Servers
69. Linux copy and clone USB stick including partitions command
Top
Linux copy and clone USB stick including partitions command
sudo dd if=/dev/sdi of=/dev/sdh bs=4M status=progress
70. What Has My Compiler Done for Me Lately?
71. You're Wrong About the Linux Code of Conduct
72. Hybris (software)
73. VirMach Hosting - $1.00 monthly
https://billing.virmach.com/cart.php?gid=1
Top
https://billing.virmach.com/cart.php?gid=1
VirMach.pdf
74. A2 Hosting - $3.92 monthly
75. Fast, Easy and Free SSL Certificates with Let's Encrypt - Hak5 2023
Top
https://www.youtube.com/watch?v=KCTKC1iUlC8
Let’s Encrypt
CertBot
Category:Programming Category:Computing