Igris
Mission Specialist
Mission Specialist
  • 525 Views

How do you remember commands ?

So while preparing for RHCSA configuring stratis you need the following in /etc/fsbab

x-systemd.requires=stratisd.service
 
yet if you do a man on stratisd you wont get that option. On the exam you dont have internet accees so if you forget it how would you proceed ? 
 
Just forfeit the task and get 0 points for it ? 
Labels (1)
0 Kudos
4 Replies
Yeni84
Flight Engineer
Flight Engineer
  • 442 Views

Re: How do you remember commands ?

This is how I do it. In general for each command, options or task, I try to find the related manual pages for guidance or HINTS. You may remember the command name but not ALL the options or the syntax order.

For this case you mention, I think like this:

1) The Stratis file system cannot be mounted unless the stratisd daemon is active. So it REQUIRES to set A condition in the fstab for the FS to be mounted only when stratisd is active. What is the syntax of this condition? Then I think at step 2.

2) stratis is managed by systemd daemon (like all services). So it is something related to systemd. And fstab is about mounting. So the man page for this should be related to systemd and mounting. This is # man 5 systemd.mount (attention there is also # man 1 systemd-mount). To receive a hint about the man page name, you can man -k mount . 

3) I open the man 5 systemd.mount and press / for search, type "requires" (from step 1), Enter. I find "x-systemd.requires". Then I ask myself what it requires? We mentioned this at step 1, the stratisd service.

4) If I cannot remember "stratisd.service", I run the command bellow (the string appears two times). This command we still need to run before # stratis create ... as a prerequisite. I have to check if stratisd is active and enabled at boot. Like before you operate on network connections, you need to check if NetworkManager is active.

[root@server-base ~]# systemctl status stratisd
● stratisd.service - Stratis daemon
Loaded: loaded (/usr/lib/systemd/system/stratisd.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2020-12-17 17:44:53 EET; 3s ago
Docs: man:stratisd(8)
Main PID: 953 (stratisd)
Tasks: 1 (limit: 5074)
Memory: 5.6M
CGroup: /system.slice/stratisd.service
└─953 /usr/libexec/stratisd --debug

5) At the end it results: x-systemd.requires=stratisd.service .

I hope it helps.

 

Reply
Loading...
Amel
Mission Specialist
Mission Specialist
  • 418 Views

Re: How do you remember commands ?

Logical

 

0 Kudos
Reply
Loading...
charith1994
Flight Engineer Flight Engineer
Flight Engineer
  • 412 Views

Re: How do you remember commands ?

Well  it's all about continuous practice my friend.Some time you can use configurations file and man pages to help remember the commands.but sometimes it depends on ur practice and memory.

Reply
Loading...
Abhi_Galav
Cadet
Cadet
  • 386 Views

Re: How do you remember commands ?

regarding this perticular mount option, you can check out the man page for "systemd.mount"

It has a "fstab" subsection that mentions "x-systemd.requires=" key which could be a way to remember the option and not make any typo and the value "stratisd.service" is self explanaitory.

only reboot can confirm if what you mentioned was correct or not.

0 Kudos
Reply
Loading...
Join the discussion
You must log in to join this conversation.