Online Purchases

Saturday, April 24, 2021

How to extend ebs volume in aws

 How to extend ebs volume in aws

I need to add an additional 20GB to /db2inst1. I know this is a EBS volume.

/dev/xvdh       7.8G  7.4G     0 100% /db2inst1

1. Login to AWS --> EBS
2. Identify the volume from EBS page
3. Select and modify
4. Give 20GB
5. Login to server
6. resize2fs /dev/xvdh
7. df -h

Now you can the space got extended

/dev/xvdh        20G  7.4G   12G  40% /db2inst1

Thursday, April 15, 2021

Attaching Block Volume Storage in Oracle Cloud Infrastructure Instance

 Attaching Block Volume Storage in Oracle Cloud Infrastructure Instance

1. Login to your OCI console, search for block volume or from the left hamburger menu, select "Storage" then "Block Volume" then "Create Block Volume"


2. Input your block volume name, compartment, AD, block volume size etc.


3. Once it is created, go to your instance and from left side you can see "Attach Block Volumes"  Then you need to make sure the attach type, compartment.



4. At the right of the side, you can see "iSCSI Commands & Information", click on that, you will see the commands to attach the volume to the instance.


5. Login to the linux instance. Issue the above commands. You can see a successful message.

6. Now to identify attach volume or device use unix command lsblk. This command helps you to identify the device for me its /dev/sbd

7. Format the disk using unix command fdisk and make file system using unix commnd  mkfs as you want in this case i am gong to make it as ext4 command is mkfs.ext4 /dev/sbb.

8. Create a folder directory for the mount mkdir /data

9. For permanent mounting you need to add an entry in /etc/fstab

/dev/sbd1 /data ext4 defaults,noatime,_netdev 0 2

10. Now we are going to mount. mount /dev/sdb1 /data

That's it. You can verify it using the command df -h

Thursday, April 8, 2021

Office365 as SMTP

 How to configure Office365 as SMTP

You need to note that the from address and the authentication user should be same.

Port to be used is 25 (not 587)

sendmail sending email slow

 sendmail sending email slow

I have a linux box, which I configured sendmail and it is working fine. But the sending email is slow.

While checking the /var/log/maillogs I saw the following 

My unqualified host name (hostname) unknown; sleeping for retry

Sendmail is expecting a FQDN to start cleanly.

You need to set the hostname like <your_hostname>.localdomain and update /etc/hosts.

/etc/hosts

127.0.0.1   your_hostname.localdomain your_hostname localhost