4,348
edits
→LVM: extending a volume |
|||
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
= System = | = System = | ||
Line 73: | Line 72: | ||
* xargs - to be processed - [http://offbytwo.com/2011/06/26/things-you-didnt-know-about-xargs.html Things you (probably) didn’t know about xargs] | * xargs - to be processed - [http://offbytwo.com/2011/06/26/things-you-didnt-know-about-xargs.html Things you (probably) didn’t know about xargs] | ||
Ignore "Permission denied" errors | |||
<syntaxhighlight lang="bash"> | |||
$ find . 2>&1 | grep -si "sfrrgam" | |||
</syntaxhighlight> | |||
== LVM == | == LVM == | ||
Line 150: | Line 155: | ||
These commands remove volumes named ''laravelhome'' and ''laravelhtml'', and then increase ''lv_var'' volume with the remaining space. | These commands remove volumes named ''laravelhome'' and ''laravelhtml'', and then increase ''lv_var'' volume with the remaining space. | ||
< | <syntaxhighlight lang="console"> | ||
[root@it153coai01lnx ~]# lsblk | [root@it153coai01lnx ~]# lsblk | ||
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT | NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT | ||
Line 256: | Line 261: | ||
/dev/mapper/vg00-lv_varlog 3.8G 103M 3.7G 3% /var/log | /dev/mapper/vg00-lv_varlog 3.8G 103M 3.7G 3% /var/log | ||
tmpfs 182M 0 182M 0% /run/user/4323 | tmpfs 182M 0 182M 0% /run/user/4323 | ||
</ | </syntaxhighlight> | ||
Line 263: | Line 268: | ||
{{testedon|2020-07-06|CentOS 8.1.1911}} | {{testedon|2020-07-06|CentOS 8.1.1911}} | ||
< | <syntaxhighlight lang="console"> | ||
[root@chara mhan]# lsblk | [root@chara mhan]# lsblk | ||
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT | NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT | ||
Line 365: | Line 370: | ||
tmpfs 1.6G 4.0K 1.6G 1% /run/user/1000 | tmpfs 1.6G 4.0K 1.6G 1% /run/user/1000 | ||
[root@chara mhan]# | [root@chara mhan]# | ||
</ | </syntaxhighlight> | ||
=== Separating out /srv to a dedicated LVM === | |||
{{testedon|2023-10-09|RHEL 8.8}}. LoboCloud VM w/ 250 addl. | |||
<syntaxhighlight lang="bash"> | |||
# pvcreate /dev/sdb | |||
# vgcreate vgapps /dev/sdb | |||
# lvcreate -n lv_www -L 100G vgapps | |||
# mkfs.xfs /dev/mapper/vgapps-lv_www | |||
# mount /dev/mapper/vgapps-lv_www /mnt | |||
# mv -a /srv/* /mnt/ | |||
# vi /etc/fstab | |||
/dev/mapper/vgapps-lv_www /srv xfs defaults 0 0 | |||
# umount /mnt | |||
# mount /dev/mapper/vgapps-lv_www /srv | |||
</syntaxhighlight> | |||
To access the old /srv folder | |||
<syntaxhighlight lang="bash"> | |||
# mount -o bind / /mnt | |||
</syntaxhighlight> | |||
=== Links === | === Links === | ||
Line 433: | Line 462: | ||
List all audio cards you have: | List all audio cards you have: | ||
< | <syntaxhighlight lang="bash"> | ||
$ cat /proc/asound/cards | $ cat /proc/asound/cards | ||
0 [PCH ]: HDA-Intel - HDA Intel PCH | 0 [PCH ]: HDA-Intel - HDA Intel PCH | ||
Line 441: | Line 470: | ||
2 [SoundBar ]: USB-Audio - Dell AC511 USB SoundBar | 2 [SoundBar ]: USB-Audio - Dell AC511 USB SoundBar | ||
Dell Dell AC511 USB SoundBar at usb-0000:00:14.0-4, full speed | Dell Dell AC511 USB SoundBar at usb-0000:00:14.0-4, full speed | ||
</ | </syntaxhighlight> | ||
Get ALSA identifiers of those: | Get ALSA identifiers of those: | ||
< | <syntaxhighlight lang="bash"> | ||
$ aplay -l | awk -F \: '/,/{print $2}' | awk '{print $1}' | uniq | $ aplay -l | awk -F \: '/,/{print $2}' | awk '{print $1}' | uniq | ||
PCH | PCH | ||
NVidia | NVidia | ||
SoundBar | SoundBar | ||
</ | </syntaxhighlight> | ||
Update /etc/asound.conf: | Update /etc/asound.conf: | ||
< | <syntaxhighlight lang="ini"> | ||
pcm.!default { | pcm.!default { | ||
type hw | type hw | ||
Line 464: | Line 493: | ||
card SoundBar | card SoundBar | ||
} | } | ||
</ | </syntaxhighlight> | ||
I found that the numeric identifier for these cards and change on reboot. That may be related to how the hardware detection works on Linux, and the order changes time to time. So I've used the string identifier instead -- seems to stick better than a numeric value. | I found that the numeric identifier for these cards and change on reboot. That may be related to how the hardware detection works on Linux, and the order changes time to time. So I've used the string identifier instead -- seems to stick better than a numeric value. | ||
Line 473: | Line 502: | ||
Restart pulseaudio. Do not sudo for this. | Restart pulseaudio. Do not sudo for this. | ||
< | <syntaxhighlight lang="console"> | ||
$ pulseaudio -k && pulseaudio -D | $ pulseaudio -k && pulseaudio -D | ||
</ | </syntaxhighlight> | ||
List sinks. | List sinks. | ||
< | <syntaxhighlight lang="console"> | ||
$ pacmd list-sinks | $ pacmd list-sinks | ||
1 sink(s) available. | 1 sink(s) available. | ||
Line 546: | Line 575: | ||
active port: <analog-output> | active port: <analog-output> | ||
</ | </syntaxhighlight> | ||
Line 560: | Line 589: | ||
| Scan a network for connected computers | | Scan a network for connected computers | ||
| class="cli" | $ sudo nmap -sP 129.24.22.0/24 | | class="cli" | $ sudo nmap -sP 129.24.22.0/24 | ||
| | |||
|- | |||
| Check for an open port | |||
| class="cli" | $ nc -zv 192.168.86.108 1523<br/>$ cat < /dev/tcp/host.server.com/22 | |||
| | | | ||
|} | |} | ||
Line 586: | Line 619: | ||
| {{testedon|2020-04-21|CentOS 7.7.1908}} | | {{testedon|2020-04-21|CentOS 7.7.1908}} | ||
|} | |} | ||
= Package management = | |||
== Transaction check errors == | |||
{{testedon|2020-10-21|RHEL 7.8}} | |||
<syntaxhighlight lang="console"> | |||
# running a yum update yields the following | |||
file /etc/os-release from install of redhat-release-server-7.9-3.el7.x86_64 conflicts with file from package oraclelinux-release-7:7.8-1.0.7.el7.x86_64 | |||
file /etc/redhat-release from install of redhat-release-server-7.9-3.el7.x86_64 conflicts with file from package oraclelinux-release-7:7.8-1.0.7.el7.x86_64 | |||
file /etc/rpm/macros.dist from install of redhat-release-server-7.9-3.el7.x86_64 conflicts with file from package oraclelinux-release-7:7.8-1.0.7.el7.x86_64 | |||
file /etc/system-release from install of redhat-release-server-7.9-3.el7.x86_64 conflicts with file from package oraclelinux-release-7:7.8-1.0.7.el7.x86_64 | |||
file /etc/system-release-cpe from install of redhat-release-server-7.9-3.el7.x86_64 conflicts with file from package oraclelinux-release-7:7.8-1.0.7.el7.x86_64 | |||
$ sudo yum install --downloadonly redhat-release-server | |||
$ sudo find /var/cache/yum -type f -name "redhat-release-server*" -exec rpm -Uvh --force {} \; | |||
$ sudo yum --disablerepo="*" --enablerepo="rhel*" --disablerepo="oraclelinux*" --disablerepo="rhel-source*" --disablerepo="rhel-beta*" update -y && sudo yum -y upgrade && sudo yum -y autoremove | |||
</syntaxhighlight> | |||
= Security = | = Security = | ||
Line 591: | Line 644: | ||
* [[GnuPG]] - GNU's implementation of PGP, aka GPG | * [[GnuPG]] - GNU's implementation of PGP, aka GPG | ||
* [[EncFS]] - encrypt files and folders | * [[EncFS]] - encrypt files and folders | ||
= Links = | = Links = | ||
Line 603: | Line 655: | ||
* [[i3wm]] - i3 window manager | * [[i3wm]] - i3 window manager | ||
* [[Running Steam on CentOS 7 with NVIDIA driver]] | * [[Running Steam on CentOS 7 with NVIDIA driver]] | ||
*History | |||
**[https://upload.wikimedia.org/wikipedia/commons/c/cd/Unix_timeline.en.svg UNIX timeline] | |||
**[https://upload.wikimedia.org/wikipedia/commons/8/8c/Linux_Distribution_Timeline_Dec._2020.svg Linux distributions timeline] |