5. will data loss takeplace when we detach and attach the volume? explain

No, data loss will not take place when you detach and attach a persistent block volume ( such as an Amazon EBS OR CLOUD BLOCK STORAGE), provided you follow the correct safe detachment procedures.

4. what is non root volume explain?

A non-root volume is an additional storage disk attached to a server, virtual machine, or container that does not contain the operating system's core boot files.
The term "non-root volume" generally has two distinct meanings depending on whether you are talking about cloud Infrastructure (like AWS) or Contaners/Kubernetes.

3. can we attach the root volume to extend volume when it is created in different AZs? Explain it?

No, you cannot attach an Amazon EBS volume (including a root volume) to an EC2 instance if they are in differe3nt Availability Zones.

2. what is root and non root volume?

A root volume is the primary storage disk that holds a computer or virtual machine's operating system and boot files, while a non-root volume is any additional attached storage dis used for extra data or applications.

1. what is EBS and its purpose?

EBS is a high-performance, persistent block store age service designed for use with Amazon EC2 instances in the cloud. purpose are Virtual Hard Drive, Data Persistence, High Availability, Flexibility.