For enabling remote root user login need to change below parameter in sshd_config file
PermitRootLogin yes
For enabling remote root user login need to change below parameter in sshd_config file
PermitRootLogin yes
Error - mount: /dev/sdb1 is write-protected, mounting read-only
[root@localhost ~]# fdisk -l
Disk /dev/sda: 32.2 GB, 32212254720 bytes, 62914560 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000d604e
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 2099199 1048576 83 Linux
/dev/sda2 2099200 62914559 30407680 8e Linux LVM
Disk /dev/sdb: 12.9 GB, 12884901888 bytes, 25165824 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/ol-root: 29.0 GB, 28982640640 bytes, 56606720 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mapper/ol-swap: 2147 MB, 2147483648 bytes, 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
[root@localhost ~]# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0xa412a5eb.
Command (m for help): p
Disk /dev/sdb: 12.9 GB, 12884901888 bytes, 25165824 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0xa412a5eb
Device Boot Start End Blocks Id System
Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p): p
Partition number (1-4, default 1):
First sector (2048-25165823, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-25165823, default 25165823):
Using default value 25165823
Partition 1 of type Linux and of size 12 GiB is set
Command (m for help): p
Disk /dev/sdb: 12.9 GB, 12884901888 bytes, 25165824 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0xa412a5eb
Device Boot Start End Blocks Id System
/dev/sdb1 2048 25165823 12581888 83 Linux
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# mount /dev/sdb1 /backup/
mount: /dev/sdb1 is write-protected, mounting read-only
mount: unknown filesystem type '(null)'
[root@localhost ~]#
[root@localhost ~]# mount /dev/sdb1 /backup/
mount: /dev/sdb1 is write-protected, mounting read-only
mount: unknown filesystem type '(null)'
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# mkfs.ext4 /dev/sdb1
mke2fs 1.42.9 (28-Dec-2013)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
786432 inodes, 3145472 blocks
157273 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2151677952
96 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208
Allocating group tables: done
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# mount /dev/sdb1 /backup/
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 823M 0 823M 0% /dev
tmpfs 847M 0 847M 0% /dev/shm
tmpfs 847M 9.3M 838M 2% /run
tmpfs 847M 0 847M 0% /sys/fs/cgroup
/dev/mapper/ol-root 27G 27G 200M 100% /
/dev/sda1 1014M 217M 798M 22% /boot
tmpfs 170M 8.0K 170M 1% /run/user/42
tmpfs 170M 0 170M 0% /run/user/0
/dev/sdb1 12G 41M 12G 1% /backup
[root@localhost ~]#
[root@localhost ~]#
Entry in fstab
[root@localhost ~]# cat /etc/fstab
#
# /etc/fstab
# Created by anaconda on Wed Jul 29 17:46:25 2020
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/ol-root / xfs defaults 0 0
UUID=df8f6e5c-bd9c-4782-8a03-7d4ecc10fdd4 /boot xfs defaults 0 0
/dev/mapper/ol-swap swap swap defaults 0 0
UUID=0d604fb0-3675-4e59-8bcc-2f9d8ca8d86d /backup ext4 defaults 0 0
[root@localhost ~]#
[root@localhost ~]#
How to solve Error " find: paths must precede expression" ?
[oracle@xxxx]$ find /dbbackupdrive/XXXXX/export_bkp/ -name *.dmp -mtime -1 -exec ls -lrt {} \;
find: paths must precede expression: expdp_full_db_bkp_Wed23Dec2020.dmp
Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]
[oracle@xxxx]$
[oracle@xxxx]$
[oracle@xxxx]$
[oracle@xxxx]$ find /dbbackupdrive/XXXXX/export_bkp/ -name '*.dmp' -mtime -1 -exec ls -lrt {} \;
-rw-r-----. 1 oracle oinstall 6074507264 Dec 28 10:50 /dbbackupdrive/XXXXX/export_bkp/dumpfile_full_XXXXX_20201228.dmp
-rw-r-----. 1 oracle oinstall 6074507264 Dec 28 12:41 /dbbackupdrive/XXXXX/export_bkp/bkp/dumpfile_full_XXXXX_20201228.dmp
[oracle@xxxx]$
[oracle@xxxx]$
How to change Time zone
============================
What is Time zone ?
---------------------
Time zone show the geographic region that has the same standard time. Typically the time zone is set during the installation of the operational system, but it can be easily changed after that as well.
Check the Current Time Zone
---------------------------------
#timedatectl
List of available Time zone
-------------------------------
Command : timedatectl list-timezones
# timedatectl list-timezones
Output
......
......
......
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmara
Africa/Bamako
Africa/Bangui
Africa/Banjul
Africa/Bissau
Africa/Blantyre
Africa/Brazzaville
Africa/Bujumbura
Africa/Cairo
Africa/Casablanca
Africa/Ceuta
Africa/Conakry
Africa/Dakar
Africa/Dar_es_Salaam
Africa/Djibouti
Africa/Douala
Africa/El_Aaiun
Africa/Freetown
Africa/Gaborone
Africa/Harare
Africa/Johannesburg
......
......
Asia/Singapore
.......
......
......
Set Time zone
-----------------
command: timedatectl set-timezone <your_time_zone>
#timedatectl set-timezone Asia/Singapore
Verify time zone
----------------------
#timedatectl
Local time: Thu 2020-12-17 23:52:16 +08
Universal time: Thu 2020-12-17 15:52:16 UTC
RTC time: Thu 2020-12-17 15:52:15
Time zone: Asia/Singapore (+08, +0800)
NTP enabled: yes
NTP synchronized: yes
RTC in local TZ: no
DST active: n/a
#date
Thu Dec 17 23:51:50 +08 2020
Note : After Time zone change need to restart crontab service or if possible take system reboot as best practice.