This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
tech:linux:start [2018/06/05 16:58] admin |
tech:linux:start [2022/11/13 23:20] (current) rk4n3 |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Technical Information: General Linux Topics ====== | ====== Technical Information: General Linux Topics ====== | ||
- | [[http://www.livenix.org|LiveNIX Topics]] | + | * [[http://www.livenix.org|LiveNIX]] |
+ | * [[:tech:linux:alpine:start|Alpine]] | ||
+ | * [[:tech:linux:slackware:start|Slackware]] | ||
+ | * [[:tech:linux:ubuntu:start|Ubuntu]] | ||
+ | * [[:tech:linux:centos:start|CentOS/RHEL]] | ||
- | [[:tech:linux:slackware:start|Slackware Topics]] | + | [[:tech:linux:desktop:start|So, You're Ready for the Linux Desktop ...]] \\ |
- | + | ||
- | [[:tech:linux:ubuntu:start|Ubuntu Topics]] | + | |
- | + | ||
- | [[:tech:linux:centos:start|CentOS/RHEL Topics]] | + | |
- | + | ||
- | [[:tech:linux:desktop:start|So, You're Ready for the Linux Desktop ...]] | + | |
===== Links/Resources ===== | ===== Links/Resources ===== | ||
Line 18: | Line 16: | ||
<code>qemu-img create -f qcow2 sda 18G</code> | <code>qemu-img create -f qcow2 sda 18G</code> | ||
<code>lvcreate -L 100G -n vmnamehome vgvms</code> | <code>lvcreate -L 100G -n vmnamehome vgvms</code> | ||
+ | |||
+ | See [[:tech:virt:start|here]] for further details | ||
+ | |||
===== Misc Tech Trivia ===== | ===== Misc Tech Trivia ===== | ||
+ | |||
+ | ==== X11 Display Auth ==== | ||
+ | * From display owner //(where X is display number)//: ''xauth extract cookiefilename ://**X**//'' | ||
+ | * For remote user, get cookie file and: ''xauth merge cookiefilename'' | ||
+ | |||
+ | ==== Storage Management ==== | ||
+ | * Good article: [[https://www.digitalocean.com/community/tutorials/how-to-create-raid-arrays-with-mdadm-on-ubuntu-18-04]] | ||
+ | * **NOTE:** There seems to be issues with some hardware, where GPT partition tables are manipulated by some UEFI functionality, and so RAID volumes created on raw disk (without partition) are at risk of losing their superblock(s). Because of this, its generally recommended to utilize a partition instead of full-disk devices. | ||
+ | * Set up RAID5 with ''mdadm'':<code>mdadm --create --verbose /dev/md0 --level=5 --raid-devices=3 /dev/sdX1 /dev/sdY1 /dev/sdZ1</code> | ||
+ | * Check status: ''cat /proc/mdstat'' | ||
+ | * Configure for availability after boot: \\ //(**NOTE**: this must be done after recovery status is complete)//<code> | ||
+ | mdadm --detail --scan >> /etc/mdadm/mdadm.conf | ||
+ | update-initramfs -u | ||
+ | </code> | ||
+ | * Scrub to prevent bit-rot: ''echo check > /sys/block/md**X**1/md/sync_action'' \\ (use ''cat /proc/mdstat'' to monitor) | ||
+ | * Tune re-build speed ([[https://www.cyberciti.biz/tips/linux-raid-increase-resync-rebuild-speed.html]]): \\ To show limits: ''sysctl dev.raid.speed_limit_min ; sysctl dev.raid.speed_limit_max'' \\ To increase speed, enter: ''sysctl -w dev.raid.speed_limit_min=value'' \\ In ''/etc/sysctl.conf''<code>dev.raid.speed_limit_min = 50000 | ||
+ | ## good for 4-5 disks based array ## | ||
+ | dev.raid.speed_limit_max = 2000000 | ||
+ | ## good for large 6-12 disks based array ### | ||
+ | dev.raid.speed_limit_max = 5000000</code> | ||
+ | * Sample LVM with ''mdadm'' RAID:<code> | ||
+ | pvcreate -M2 /dev/md0 | ||
+ | vgcreate -s 64 newvg /dev/md0 | ||
+ | lvcreate -L 128G -n newlv newvg | ||
+ | mkfs -t ext4 /dev/newvg/newlv | ||
+ | </code> | ||
+ | |||
==== OverlayFS ==== | ==== OverlayFS ==== | ||
* Ensure ''overlay'' module is loaded //(modprobe overlay)// | * Ensure ''overlay'' module is loaded //(modprobe overlay)// | ||
Line 85: | Line 113: | ||
export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\ $' | export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\ $' | ||
</code> | </code> | ||
+ | |||
+ | |||
+ | === Simple NIC speed test === | ||
+ | On one machine:<code>nc -vvlnp 12345 > /dev/null</code> | ||
+ | On the other:<code>dd if=/dev/zero bs=1M count=1K | nc -vvn x.x.x.x 12345</code> | ||
+ | |||
==== POS Receipt Printing ==== | ==== POS Receipt Printing ==== |