Terribly sorry for this basic question, I'm a newbie to the linux world.
Currently I have a RHEL 7.5 machine which should normally have the following stuff under /var directory: adm, cache, crash, db, empty, games, gopher, kerberos, lib, local, lock, log, mail, nis, opt, preserve, run, spool, tmp, yp
and now the directories: "kerberos", "local", "mail", "nis", "opt", "preserve", "yp" were missed.
This RHEL 7.5 machine is used to run Cassandra.
After some googling and thinking, I collected 2 critical options to restore these missing directories:
- restore from other RHEL's backup(there's more than one such RHEL 7.5 machines running Cassandra and they all have almost the same config., system, directories, accounts and files.)
- using the RHEL installation ISO(rescue mode).
I examined other RHEL machines (which are 99% identical to the one that missed directories) to see the importance of the missing directories and found that the "kerberos", "local", "nis", "opt","preserve","yp" are empty and the size are 4.0K respectively. Only the "mail" directory do have some user accounts' data in sub-directories.
So I assumed that recreating the "mail" directory might be the most important task despite I'm not sure about how to rebuild the "mail".(seemed that other directories can be created manually and I know it's easy.)
Can anyone give me some hints about how to restore directories with minimum impact to the current system? I hope I don't need to reinstall the whole system...
Thanks in advance!
*Added:
Currently, I got some output listed below,
df -h
Filesystem Size Used Avail Use% Mounted on /dev/mapper/rhel-root 87G 4.3G 78G 6% / devtmpfs 16G 0 16G 0% /dev tmpfs 16G 0 16G 0% /dev/shm tmpfs 16G 33M 16G 1% /run tmpfs 16G 0 16G 0% /sys/fs/cgroup /dev/sda2 976M 112M 798M 13% /boot /dev/mapper/rhel-home 2.0T 763G 1.1T 41% /home tmpfs 3.2G 0 3.2G 0% /run/user/0 df /var
Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/rhel-root 90695520 4479244 81586160 6% / - the result of
journalctl -b |grep /varincluding the following messages:(some of them are repeating)
rsyslogd[1337]: $WorkDirectory: /var/lib/rsyslog can not be accessed, probably does not exist - directive ignored [v8.24.0 try http://www.rsyslog.com/e/2181 ] postfix/sendmail[1387]: fatal: chdir /var/spool/postfix: No such file or directory - the output of
journalctl |grep /var/logonly showed 4 messages:
auditd[792]: Could not open dir /var/log/audit (No such file or directory) systemd[1]: Starting Dump dmesg to /var/log/dmesg... systemd[1]: Started Dump dmesg to /var/log/dmesg. sa1[807]: Cannot open /var/log/sa/sa27: No such file or directory It seemed that the situation is still confusing due to insufficient clues from logs... but again, I still appreciate everyone's assistance.
journalctl -b(all syslog messages for the current boot). What doesdf /varoutput?