Hi @Chaitanya Kiran ,
You can add a new data file to AG by running below T-SQL on primary replica. For example,
USE [master]
GO
ALTER DATABASE [TSQL test]
ADD FILE (NAME = N'TSQLtest_2',
FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL14.SQL20171\MSSQL\DATA\TSQLtest.ndf' ,
SIZE = 4096KB, FILEGROWTH = 1024KB) TO FILEGROUP [PRIMARY]
GO
If you are adding a database file – data or log to the Primary Replica, the add file command will also be executed on the secondary replicas.
Please note: If you have not placed your database files for your Primary and Secondary replica database on an identical path, then SQL Server will not be able to create that file on the Secondary Replica server. In the result of this, the add file command will fail on the Secondary replica, and it will force the replica to go into the suspended state.
Please refer to below blogs to get more information.
SQL SERVER – Adding File to Database in AlwaysOn Availability Group
Adding File to Database in AlwaysOn Availability Group
Best regards,
Cathy
===============================================
If the response helped, do "Accept Answer" and upvote it.