mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-14 04:48:22 +00:00
Update cheatsheets
This commit is contained in:
37
tldr/linux/lvmpersist
Normal file
37
tldr/linux/lvmpersist
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# lvmpersist
|
||||
|
||||
> Manage persistent reservations (PR) on block devices or all PVs in a volume group.
|
||||
> More information: <https://manned.org/lvmpersist>.
|
||||
|
||||
- Start PR on all PVs in a VG with a local key (exclusive access by default):
|
||||
|
||||
`lvmpersist start --ourkey {{0x1234abcd}} --vg {{vg_name}}`
|
||||
|
||||
- Start PR for a shared VG (allow multiple hosts):
|
||||
|
||||
`lvmpersist start --ourkey {{0x1234abcd}} --access {{sh}} --vg {{vg_name}}`
|
||||
|
||||
- Stop PR on a VG and unregister the local key:
|
||||
|
||||
`lvmpersist stop --ourkey {{0x1234abcd}} --vg {{vg_name}}`
|
||||
|
||||
- Take over a local VG by preempting another host while starting PR:
|
||||
|
||||
`lvmpersist start --ourkey {{0xmy_key}} --removekey {{0xother_key}} --vg {{vg_name}}`
|
||||
|
||||
- Remove another host's key from a shared VG:
|
||||
|
||||
`lvmpersist remove --ourkey {{0xmy_key}} --removekey {{0xother_key}} --vg {{vg_name}}`
|
||||
|
||||
- Show registered keys and reservations for a VG:
|
||||
|
||||
`lvmpersist read --vg {{vg_name}}`
|
||||
|
||||
- Operate on specific devices instead of a VG:
|
||||
|
||||
`lvmpersist start --ourkey {{0x1234abcd}} --device {{/dev/sdX}} --device {{/dev/mapper/mpathY}}`
|
||||
21
tldr/linux/systemctl-try-reload-or-restart
Normal file
21
tldr/linux/systemctl-try-reload-or-restart
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# systemctl try-reload-or-restart
|
||||
|
||||
> Reload one or more units if they support it; otherwise restart them.
|
||||
> More information: <https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#try-reload-or-restart%20PATTERN%E2%80%A6>.
|
||||
|
||||
- Reload or restart a specific unit:
|
||||
|
||||
`systemctl try-reload-or-restart {{unit}}`
|
||||
|
||||
- Reload or restart multiple units:
|
||||
|
||||
`systemctl try-reload-or-restart {{unit1 unit2 ...}}`
|
||||
|
||||
- Reload or restart all units matching a pattern:
|
||||
|
||||
`systemctl try-reload-or-restart '{{pattern}}'`
|
||||
21
tldr/linux/systemctl-try-restart
Normal file
21
tldr/linux/systemctl-try-restart
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# systemctl try-restart
|
||||
|
||||
> Restart one or more units only if they are currently running.
|
||||
> More information: <https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#try-restart%20PATTERN%E2%80%A6>.
|
||||
|
||||
- Restart a specific unit if it is running:
|
||||
|
||||
`systemctl try-restart {{unit}}`
|
||||
|
||||
- Restart multiple units if they are running:
|
||||
|
||||
`systemctl try-restart {{unit1 unit2 ...}}`
|
||||
|
||||
- Restart all units matching a pattern if they are running:
|
||||
|
||||
`systemctl try-restart '{{pattern}}'`
|
||||
Reference in New Issue
Block a user