Deepak_Linux_GCp Azure
Deepak_Linux_GCp Azure
To list out the disk in GCP server gcloud compute disks resize <name_of_the_disk> --size=50GB --zone=<zone>
To see zone, status etc sudo gcloud compute instances list | grep -i vlgdbf79 (in dlm-lts01)
To list all GCP instances sudo gcloud compute instances list
To list specific GCP instances sudo gcloud compute instances list | grep -i <servername>
To list two servers info at one time sudo gcloud compute instances list | egrep -i '<servername1> | <servername2>'
To start a instance sudo gcloud compute instances start <servername>
To stop a instances sudo gcloud compute instances stop <servername>
To list disks sudo gcloud compute disks list | grep -i <servername>
To detach a disk sudo gcloud compute instances detach-disk <servername> --disk= <diskname>
To attach a disk sudo gcloud compute instances attach-disk <servername> --disk= <diskname>
To attach disk as boot disk sudo gcloud compute instances attach-disk <servername> --disk= <diskname> --boot
To know about detailed Information sudo gcloud compute instance describes <servername>
To check machine images sudo gcloud compute machine-images list | grep -i <server_name >
To check snapshot sudo gcloud compute snapshots list | grep -i <disk_name >
For Zone Migration
gcloud beta compute instances detach-disk vlgdbnd3 --disk vlgdbnd3-20220328074715 --
zone=europe-west5-c
To see tags of a server sudo gcloud compute instances list --format="table(name,status,tags.list())" | grep -i
<server_name>
Linux Page 1
Commands
Thursday, July 20, 2023 6:55 PM
To kill Zombie process ps axo stat,ppid,pid,comm | grep -w defunct | awk '{ print $2}' | xargs kill -9
To check the port is open netstat -tulpn | grep LISTEN | grep :80
To check open deleted file lsof -nP | grep '(deleted)' | awk '{print $2}' |wc -l
To delete open deleted file lsof -nP | grep '(deleted)' | awk '{print $2}' | xargs kill -9
To copy the file cp vlgdbc54.tar /tmp/bak_vlgdbc54.tar
To unzip the file tar -xvf vlgdbc54.tar - unzip
To know about pid,ppid ps -eo pmem,comm,pid,ppid |sort -nr |head
To know running services Systemctl
To know about failed services Systemctl | grep failed
To know file size which is consuming high find / -mount -xdev -size +100000000c -exec ls -lh {} \;
To find Application related files are cat /var/log/messages | grep -i 'Delete ABAP session' | wc -l
consuming high
To check process and PID ps -ef | grep -i '/home/nagios/checkscripts/check_sm_filesystems.pl' | grep nagios | wc -l
To kill the process and its related process ps -ef | grep -i '/home/nagios/checkscripts/check_sm_filesystems.pl' | grep nagios | awk '{print $2}' |
xargs kill -9
To list file immutable lsattr <filename>
To make a file immutable chattr +i(small letter) <filename>
Linux Page 2
UNIX/LINUX ADMIN PAGE
Monday, July 10, 2023 10:32 AM
Unix admin
access
Linux Page 3
Mount Old Boot Disk
Tuesday, July 11, 2023 11:20 AM
Reference : 2380090965
Linux Page 4
SAMBA
Tuesday, July 25, 2023 2:35 PM
12.5:
- works with latest version 4.15.13+git.621.c8ae836ff82-3.85.1
--> nsswitch.conf with records for winbind
--> windbind must run
--> increased range for GLOBAL to 1000000 - 2000000
--> files/directories are created with correct owner (UID)
15.4:
- works with latest version 4.15.13+git.636.53d93c5b9d6-150400.3.23.1
--> nsswitch.conf with records for winbind
--> windbind must run
--> files/directories are created with correct owner (UID)
15.2:
- works with latest version 4.11.14+git.386.cc81f3dca2-150200.4.47.1
--> nsswitch.conf with records for winbind
--> windbind must run
--> increased range for GLOBAL to 1000000 - 2000000
--> files/directories are created with correct owner (UID)
Linux Page 5
To Delete Exports in Server
Thursday, July 27, 2023 10:25 AM
Step1: Step2:
Check in /etc/exports. Make a copy of export file in notepad and make sure to
Uncomment it from destination server
Whether the requested mount is present in that.
Step3:
Linux Page 6
Backup Hung Issue
Monday, July 31, 2023 1:09 PM
Hello Colleagues,
Reference: 2380110387
SID : BIQ
Host name : lddbbiq.wdf.sap.corp
BAckup client: vlgdbbiq
----------------------------------------------------------------------------------------------------------------------------- --
CPU: 96
1 day (99% collected) - avg 2% / max 62%
3 days (100% collected) - avg 2% / max 85%
30 days (100% collected) - avg 3% / max 100%
90 days (100% collected) - avg 3% / max 100%
Total RAM: 1411 GB
1 day (95% collected) - avg 73% / max 75%
3 days (98% collected) - avg 73% / max 92%
30 days (100% collected) - avg 91% / max 97%
90 days (100% collected) - avg 88% / max 97%
Total SWAP: 5 GB
1 day (95% collected) - avg 17% / max 18%
3 days (98% collected) - avg 18% / max 54%
30 days (100% collected) - avg 0% / max 54%
90 days (100% collected) - avg 0% / max 0%
----------------------------------------------------------------------------------------------------------------------------- ----
-------------------------------------------------------------------------------------------
vlgdbbiq:~ # uptime
07:19:40 up 16 days 9:53, 1 user, load average: 24.63, 23.82, 23.45
----------------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------------
vlgdbbiq:~
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
6585 biqadm 20 0 1.011t 1.004t 0.017t S 272.9 72.89 17202:06 hdbindexserver
4938 biqadm 20 0 29.961g 0.015t 817088 S 2.970 1.094 117:42.64 hdbnameserver
11843 biqadm 20 0 26.216g 7.950g 262396 S 1.650 0.563 58:31.09 hdbdiserver
--------------------------------------------------------------------------------------------------------
Linux Page 7
Kindly check from your end and clear unwanted process.
If memory is not cleared, server reboot is required, kindly stop all the applications and revert the ticket to us with
approval for reboot
Downtime : 1 hour.
Linux Page 8
User Management
Monday, July 31, 2023 1:11 PM
Step -1:
In that need to compare the present /etc/passwd with backup passwd file which is present in the
Path /sapmnt/dlm/services/gcp/sm_osbackups/servername
Step -2:
Here backup file will be present as tar file and to open this file need to unzip to /tmp directory.
Linux Page 9
SWAP Memory Resize
Wednesday, August 2, 2023 11:43 AM
Mail subject: SWAP extension activity - S4 HANA Cloud systems Wiki: SWAP Extension to 30 GB - DLM Knowledge Management - Wiki@SAP (int.sap)
Mail subject: FW: SWAP Size extension / Reduction Please follow below steps for reducing /increasing swap.
Hi colleagues,
1.) Run vmcontrol on a DLM adminhost (eg. dlm-lts01 or dlm-lts02) and choose Disks ->
EXTEND/UPSIZE and provide the server name.
Linux Page 10
2.) Select the Bootdisk which should be 20 GB
3.) When asked for the new Bootdisk size take the current size 20 GB (15 GB + 5 GB swapfile) and add
25 GB to it resulting in eg. 45 GB Bootdisk size for the server visible on above screenshot.
4.) If finished connect via rcssh to the remote server and have a look via dmesg command if disk size
has changed.
vlgsprob16:~ # dmesg|tail -5
[6772610.107846] RPC: fragment too large: 612067950
[6772615.216840] RPC: fragment too large: 612067950
[7206643.291281] sd 0:0:1:0: [sda] 94371840 512-byte logical blocks: (48.3 GB/45.0 GiB)
[7206643.291283] sd 0:0:1:0: [sda] 4096-byte physical blocks
[7206643.291464] sda: detected capacity change from 21474836480 to 48318382080
5.) Get the disk device of the root filesystem / via command: grep ' / ' /proc/mounts
vlgsprob16:~ # grep ' / ' /proc/mounts
/dev/sda1 / xfs rw,relatime,attr2,inode64,noquota 0 0
6.) Extend the partition on the disk via command growpart -v /dev/<disk> <partition>:
vlgsprob16:~ # growpart -v /dev/sda 1
update-partition set to true
resizing 1 on /dev/sda using resize_sfdisk_dos
94371840 sectors of 512. total size=48318382080 bytes
## sfdisk --unit=S --dump /dev/sda
label: dos
Linux Page 11
label: dos
label-id: 0x3b4ca871
device: /dev/sda
unit: sectors
8.) Disable and delete the 5 GB swapfile and create the new 30 GB swapfile:
swapoff /root/swapfile
rm -f /root/swapfile
dd if=/dev/zero of=/root/swapfile bs=1024 count=31457280
mkswap /root/swapfile
chmod 600 /root/swapfile
swapon /root/swapfile
9.) Check if the new swapfile is working fine via command swapon -s:
vlgsprob16:~ # swapon -s
Filename Type Size Used Priority
/root/swapfile file 31457276 0 -1
Linux Page 12
Networker Installation
Thursday, August 24, 2023 11:24 AM
Hello Colleagues,
When checked the servers vlgcifdz and vlgdbfdz is a DMZ servers. Also in DMZ server nfs and automounts are not accessible
Linux Page 13
Accessing Physical server
Thursday, August 24, 2023 12:22 PM
*************************************************************************
This is a private system.
Do not attempt to login unless you are an authorized user.
Any authorized or unauthorized access or use may be monitored and can
result in criminal or civil prosecution under applicable law.
*************************************************************************
MP login: root
MP password: ********
Revision F.02.17
*************************************************************************
Your Certificate is expired.
Use the SO command to generate a new certificate.
*************************************************************************
MP MAIN MENU:
CO: Console
VFP: Virtual Front Panel
CM: Command Menu
SMCLP: Server Management Command Line Protocol
CL: Console Log
SL: Show Event Logs
HE: Main Help Menu
X: Exit Connection
[hs0004cons] MP> CM
Linux Page 14
(Use Ctrl-B to return to MP main menu.)
[hs0004cons] MP:CM> PC
PC
You must shut down the OS manually before this command is executed.
Failure to do this can cause problems when the OS is restarted.
Confirm? (Y/[N]): Y
Y
-> Please wait 30 seconds for power supplies to power down completely.
System Power will be turned on in 30 seconds.
Linux Page 15
Filesystem Check
Thursday, August 24, 2023 12:40 PM
Linux Page 16
Mount sharing between 2 servers
Thursday, August 24, 2023 12:44 PM
Linux Page 17
Extension for Migration - COE
Thursday, August 24, 2023 12:47 PM
vlgciecf:/sapmnt/dlm/services/gcp/migration_new/gen_storage #
Reference:
https://support.wdf.sap.corp/sap/support/message/2380087183
Linux Page 18
BB and MacAfee Installation
Thursday, August 24, 2023 12:48 PM
REF : https://support.wdf.sap.corp/sap/support/message/2270037733
1. #ls
Steps:
1. Login to server
2. cd /sapmnt/av/mcafee/ENS
3. Run this Script: ./mcafee_ENS_installer.sh
4.
Linux Page 19
Mail Subjects
Tuesday, August 29, 2023 11:04 AM
Linux Page 20
Nagios Self-Healing
Tuesday, August 29, 2023 11:40 AM
Linux Page 21
BDE
Tuesday, August 29, 2023 12:24 PM
Chroot:
First attach boot disk to other server (same zone, different SID - to avoid UUID issue)
Mount the disk on mnt like as below /dev/sdX varies check & run --
Note : we have umount in reverse order check last step
Linux Page 22
To detach a boot disk
Step-1:
List out the names and number of disk present by using gcloud command
Step-2:
Login to the server and check current version of the server and cross check with SISM.
Step-3:
To detach, first check in fstab entries whether it is mounted on /mnt, use df command to check which it is mounted.
Check it once again whether any action is performed on boot disk which is yet to removed.
To detach, ask for downtime and remove the unused disk and reboot the server.
Linux Page 23
Tech Team Handled tickets
Tuesday, September 5, 2023 4:27 PM
Below requests are handled by Tech ODC. If you received these requests please route the ticket’s to
Tech ODC.
Linux Page 24
rcscp command usage
Wednesday, September 6, 2023 3:22 PM
Dear Colleagues,
As we aware auto mounts(Eg : autodelete30days etc.) will not accessible from EOL Servers (vlv***) , GCP
DMZ servers
To copy files from auto mounts to server (or) vice-versa rcscp command will help us.
Linux Page 25
Vmcreate
Wednesday, September 6, 2023 3:35 PM
c5367262@dlm-lts01:~> vmcreate
Linux Page 26
9. ubuntu-2004-20230901-2
Enter choice [Default: 3] - 3
Image choice is 3. suse-15-sp4-sap-20230830-1
>> Enter the Billing Label for the host (Eg: io_xxxxxxx, cc_xxxxxx, wbs_xxxxx) - io_7301460
Billing Label validated
> Enter the Mount point for the additional disk added ( Default - /data ) -
Choosing default mount point - data
>> Enter the Server Responsibles: User ID (IXXXXXX) / DL (Starting with DL).
Separate multiple value by comma (Eg:- IXXXXXX,DL_ACI_DLM_SERVICES_SM_ALL) - I353660
The user(s) I353660 will be added as Service Owner in SISM
>> Do you want File System Backup to be set in SISM? (YES/NO; Default - NO) -
FS Backup - Default is taken, No FS Backup will be set in SISM
====================================================================================
The Host Name generated by the random host name generator is vlgsp2b3b0
Press Enter if you wish to continue with the random characters '2b3b0' in the Host Name
OR To change it,
Enter the alphanumeric characters of length 5(ideal) or max. 10 to be appended in the Host Name:
vlgspmvgci
2. Disk creation
Disk vlgspmvgci-data01 of size 40GB created successfully in the zone europe-west3-c!
Linux Page 27
3. Instance creation will happen in the zone europe-west3-c in subnet sap-dev-11
Instance created successfully
---------------------------------------------------------------
Proceeding with ping test for the host vlgspmvgci.devsys.net.sap...
Ping test successful!
Checking if SSH up on host...
SSH test successful!
---------------------------------------------------------------
5. SISM Creation
SISM entry creation successful for the host vlgspmvgci.devsys.net.sap
6. Self-healing Call
Self-Healing call for GCP...
Self-Healing call for OS Configuration...
Self-Healing call for Sec Config...
Self-Healing call for OS Patching...
Self-Healing call for User Control Check...
Self-Healing call for GCP...
Self-healing call for Filesystem Check...
All Self-healing calls are completed!
8. Server Reboot
---------------------------------------------------------------
Proceeding with ping test for the host vlgspmvgci.devsys.net.sap...
Ping test successful!
Linux Page 28
Ping test successful!
Checking if SSH up on host...
SSH test successful!
---------------------------------------------------------------
---------------------------------------------------------------
Proceeding with ping test for the host vlgspmvgci.devsys.net.sap...
Ping test successful!
Checking if SSH up on host...
SSH test successful!
---------------------------------------------------------------
Completed Successfully
Linux Page 29
Network issues
Saturday, September 9, 2023 1:17 PM
Linux Page 30
Compression utilities
Wednesday, September 13, 2023 4:28 PM
Linux Page 31
RAM and CPU resize
Wednesday, September 20, 2023 9:29 PM
Hello Colleagues,
We have selected the correct node at console level and started the server.
Before :
After:
+++++++++++++++++++++++++++++++++++++
vlgcipp3:~ # uptime
02:48:41 up 2:02, 1 user, load average: 0.00, 0.00, 0.00
vlgcipp3:~ # date
Tue May 30 02:48:43 CEST 2023
vlgcipp3:~ #
+++++++++++++++++++++++++++++++++++++
Hello Colleagues,
Linux Page 32
From: A M, Lavanya (external - Service) <[email protected]>
Sent: Tuesday, May 30, 2023 2:49 AM
To: [email protected]; DL ACI_DLM_SERVICES_SM_All (External)
<[email protected]>
Cc: A M, Lavanya (external - Service) <[email protected]>; DL 4R TCS DLM ODC BASIS (External) <DL_
[email protected]>
Subject: RE: DLM Cloud VM Resource Resize Failure - vlgcipp3
Hello Colleagues,
vlgcipp3
MESSAGE: GCP VM Resource Resized But Start Failed! SM team will have this checked!
Regards,
DLM SM TEAM
Linux Page 33
DLM SM TEAM
Thanks
Mohit Chaudhari
External
On behalf of SAP SE
Server Management
DLM Services
Linux Page 34
DLM Services
Email -:[email protected]
Mob: +919769533713
Tata Consultancy Services
Victor Building, ITPL
Whitefield, Bangalore 560066
Hi Bijo,
@ODC colleagues,
https://wiki.one.int.sap/wiki/display/DLM/Cloud+Resource+Resize+Script
sole-tenant resize errors
Regards,
Balaji
Hi Colleagues,
• If no matching node group, change the machine type to a matching node group’s machine type or
select the old machine type to bring up the VM to check with us.
Regards,
Bijo
Hello Colleagues,
We require your assistance for the below issue, As we tried to resize the memory while doing Resize we
face matching node issue.
We try to change the machine type and start the server but no luck.
Server Status ::
Linux Page 35
BCP ::
https://support.wdf.sap.corp/sap/support/message/2270111362
Best Regards,
Arasu Mohideen
External
On behalf of SAP SE
Server Management
DLM Services
T -: +91 80 61390590
+91-81975 24685
Email: [email protected]
Tata Consultancy Services
Victor Building, ITPL
Whitefield, Bangalore 560066
India
Linux Page 36
vlgdbcwj
MESSAGE: GCP VM Resource Resized But Start Failed! SM team will have this checked!
Regards,
DLM SM TEAM
Linux Page 37
Sudo Access users in DMZ zone
Thursday, September 28, 2023 8:08 PM
Add user and set password for the user and give it to them manually
In case of temporary user inform COE to delete the access after specific time by automation jobs.
Linux Page 38
Rhel upgrade
Tuesday, October 3, 2023 6:46 PM
Points to remember:
✓ Ask for downtime and check whether the ticket is change request.
✓ First search for a reference server which contains the required OS version
✓ List out repolist and check difference between current and reference server.
✓ If repos are not matching, take a backup of current repos in main server and copy all the repos
from reference server
Reference : https://support.wdf.sap.corp/sap/support/message/2370107570
Linux Page 39