Friday 4 October 2024

EFS LAB

 

1. Create an EFS File System

  • Navigate to the EFS console: In the AWS Management Console, search for "EFS" and select the EFS service.
  • Create a file system: Click on "Create file system".
  • Choose a file system type: Select either "General Purpose" or "Infrequent Access" based on your access patterns.
  • Configure performance: Choose the desired performance mode for your file system.
  • Select a VPC and subnet: Specify the VPC and subnet where you want to create the file system.
  • Create the file system: Click on "Create file system".
  • Image of creating an EFS file system in the AWS Management Console

2. Mount the EFS File System

  • Mount target: In the EFS console, click on the file system you created.
  • Create a mount target: Click on "Create mount target".
  • Choose a subnet: Select the subnet where you want to mount the file system.
  • Create the mount target: Click on "Create mount target".
  • Image of creating a mount target for an EFS file system

  • Mount the file system: Using an SSH client or EC2 instance, mount the EFS file system using the provided mount point and security credentials. For example:
Bash
sudo mount -t nfs -o nfsvers=4.1,addr=<mount_target_dns_name> <mount_point>

Replace <mount_target_dns_name> with the DNS name of your mount target and <mount_point> with the desired mount point on your instance.

3. Access and Use the EFS File System

  • Access files: Once the file system is mounted, you can access and manipulate files using standard file system operations like ls, mkdir, cp, and rm.
  • Create and modify files: Create new files and modify existing files using your preferred text editor or application.
  • Store data: Use the EFS file system to store data for your applications or workloads.

4. Manage the EFS File System

  • Modify performance: Adjust the performance mode of your file system as needed.
  • Create snapshots: Create snapshots of your file system to create backups or restore to a previous state.
  • Manage lifecycle: Manage the lifecycle of your file system by deleting it when it's no longer needed.

No comments:

Post a Comment