The db2icrt should automatically add the entries to /etc/services
and you should not need to manually adjust it , for a non-HA instance.
It is wise to let DB2 choose the port number (why would you chose 3701 ?)
The $INSTHOME will be the default place to store databases
until you tell the instance an alternate location by setting the
DFTDBPATH dbm cfg to your preferred default location.
Similarly the active transaction log location will be under $INSTHOME
until you configure a database with a NEWLOGPATH value
for your preferred location.
For the new instance, this entry is not added to /etc/services so added manually.
For db2inst1, similar entry exits at port 3700 hence incremented the value by 1 for new instance after checking that no services running on 3701.
I have not set any other dbm param than svcename. But noticed that for db2inst2, most of the paths are pointing to /home/db2inst1 like JDK_PATH, DIAGPATH and DFTDBPATH. I expected these to be set correctly during instance creation.
Is it advisable to set this manually if not pointing correctly ?
db2icrt will update the local services file (/etc/services) when run as root.
If the instance-2 is referencing paths belonging to instance-1 then you have omitted telling us some facts, it is indeed not a correct configuration.
finger -l db2inst2 --> check Directory:
finger -l db2inst1 --> Check Directory:
Verify that the home directory of db2inst2 is really what you think it is, are the home directories dedicated file-systems, or just directories in a shared-file system /home, or are there symlinks etc?
Next examine again the log files created by db2icrt (they are in /tmp ).