Find in this Blog

Tuesday, May 4, 2021

LVM EXTEND LINUX

 

1. extend hdd from vmware

 

ON LINUX VM

-------------

2. run echo 1 > /sys/block/sda/device/rescan (this is to rescan devices)

3. fdisk /dev/sda

               type p to list partitions

               it will show the new disk size ( Disk /dev/sda: new*GB )

               type d to delete the current partition which you want to increase

               type n to create new partiton ( create wih same partiton number - very iportant, starting cylinder should be same ( VERY IMPORTANT) as before mostly default value, and last cylinder will be new value usualy deafult.)

               Type N to keep the same partion file system (eg: Linux file system) or Y to select a new file system.

               Type p again to list partitions and check the size change is reflected

               Make sure everything is correct and then type w, it will write changes to disk - No turning back from here,

               (type q to exit from fdisk if not already)

4. partprobe -s ( reprobe all the partitions)

5. pvresize /dev/sda4

6. Now go to vm console or rdp open partitioner

               select the logical volume you want to expand and give the new size and finish

               this can be done from CLI but easier if can access the console :)


Primary partition extend:

Extend the volume disc and run the below command 

 xfs_growfs -d /hana


> rescan-scsi-bus.sh -a



Saturday, February 13, 2021

How do you cancel a running backup in HANA

 

Sunday, 25 August 2019

How do you cancel a running backup in HANA

To cancel a running backup, please use the following 3 SQL statements in HANA studio:

1. Get the backup_id of your running backup:

select BACKUP_ID from "SYS"."M_BACKUP_CATALOG" where entry_type_name = 'complete data backup' and state_name = 'running'  order by sys_start_time desc

2. Cancel the backup

backup cancel <backup_id>

3. Confirm the backup has cancelled

select state_name from "SYS"."M_BACKUP_CATALOG" where backup_id = <backup_id>

4. Check to  make sure there are no running backups still

select * from  "SYS"."M_BACKUP_CATALOG" where STATE_NAME = 'running';

If the backup still exists, you can try to cancel the thread through the commands:
ALTER SYSTEM CANCEL SESSION <Session_ID> ;
ALTER SYSTEM DISCONNECT SESSION <Session_ID> ;


From backend Linux


1. As per the SAP Note 2452735 confirm there are no backup currently running.
select * from "SYS"."M_BACKUP_CATALOG" where STATE_NAME = 'running';

2. Run the ps command to get the listing of zombie hdbbackint processes belonging to the database backup

ps -ef | grep hdbbackint | grep COMPLETE

Sending signal 9 using the "kill" command will destroy the process running on the client. 

kill -9 PID

where PID is the process id of the zombie hdbbackint process. 

You will need to be a root user to execute the kill command

Wednesday, February 10, 2021

FAIL: NIECONN_REFUSED (Connection refused), NiRawConnect failed in plugin_fopen()

 


Environment

SUSE Linux Enterprise Server for SAP Applications
SUSE Linux Enterprise Server 12

Situation

In the logs there are entries like

018-06-28T03:45:42.719624+02:00 unsinkable_02 lrmd[40931]:   notice: rsc_SAPHana_HAL_HDB00_monitor_61000:211324:stderr [ Error: NIECONN_REFUSED (Connection refused), NiRawConnect failed in plugin_fopen() ]

and the SAP Instance cannot be operated by the Cluster for example.

This can affect normal SAP Instances like ASCS/ERS as well as HANA.

Resolution

Most likely reason for this is that the sapstart service is not running, it can be checked via

   unsinkable_02:~ # /bin/systemctl --no-pager --all list-units | grep sapinit

     sapinit.service        loaded    active   running   LSB: Start the sapstartsrv

or


     sapinit.service        loaded    active   exited   LSB: Start the sapstartsrv

and in case this returns something like

   sapinit.service       loaded    inactive dead      LSB: Start the sapstartsrv

   sapinit.service          loaded    failed   failed    LSB: Start the sapstartsrv

this can be fixed with

   unsinkable_02:~ # /bin/systemctl restart sapinit.service

Cause

The process sapstartsrv which is used for operating the SAP Instances was either killed, stopped or otherwise not available

Thursday, January 21, 2021

SSH BANNER + WELCOME MESSAGE

 How to set SSH welcome message and Banner?


To change the message displayed before login, edit /etc/ssh/sshd_config :

$ sudo vi /etc/ssh/sshd_config

and add (or uncomment) the line

Banner /etc/banner

/etc/banner can be whatever file you want. Then edit /etc/banner

$ sudo vi /etc/banner


and put in whatever welcome message you want:

. | . . . .-. | .-..-. .--.--. .-. \ \ / (.-' |( ( )| | |(.-' `' `' `--'` `-'`-' ' ' ` `--'


You’ll probably need to restart sshd before your changes take effect:


$ sudo /etc/init.d/ssh restart

# systemctl restart sshd.service

To change the message displayed after login, edit /etc/motd :

sudo vi /etc/motd

and enter the message you want to display.

:wq