Anchor | ||||
---|---|---|---|---|
|
Expand title Prerequisite OS - Linux
Tip title Find all the steps for EBS volume poc for Neo4j Expand title
To use AWS storage volume for neo4j graph database Step 1:
Create an EBC Volume: (Type GP2)
EBS volume should be in exact same region and sub region as the instance you wish to mount.
Step 2:
Attach EBS Volume to Instance:
From volumes section - attach the volume to the instance
Reference Link :http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html
Step 3:
Now we need to mount the drive on that instance:
Panel borderColor green bgColor white titleColor green borderWidth 2 borderStyle solid title Login to your ec2 instance and list the available disks using the following command - Lsblk
Check if the volume has any data using the following command.
sudo file -s /dev/xvdf
If the above command output shows “/dev/xvdf: data”, it means your volume is empty.
Format the volume to ext4 filesystem using the following command
sudo mkfs -t ext4 /dev/xvdf
Create a directory of your choice to mount our new ext4 volume. I am using the name “newvolume”
sudo mkdir /newvolume
Mount the volume to “newvolume” directory using the following command.
sudo mount /dev/xvdf /newvolume/
cd into newvolume directory and check the disk space for confirming the volume mount.
cd /newvolume
df -h .
Step 4:
- Now we need to change the neo4j.conf file to point to new mounted space
- Stop neo4j
- Uncomment line “dbms.directories.data=data”
- Change to “dbms.directories.data=/newvolume/data”
Step 5:
- Now verify neo4j
- Start neo4j
- Create nodes and verify data
Step 6:
- Unmount
- umount /dev/xvdf
Step 7:
- Detach EBS volume
- Go to EC2 Volume section
- Select the volume
- Under Action select detach, if that does not works go for Force detach
Step 8:
- Now increase the size
- Go to EC2 Volume section
- Resize the volume by modifying the volume to desired levels
Step 9:
- Attach the volume to the new fresh instance
- From volumes section - attach the volume to the instance.
- Reference Link : http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-attaching-volume.html
Step 10:
- Mount the volume to newly attached instance
- Follow step 3 above
Step 11:
- Neo4j conf updates and data verification
- Follow steps 5 and 6
Expand
title Extend AWS storage volume for neo4j graph database Step 1:
- To make the extend size of EBS volume to be useful we need to resize it with formatting
- sudo resize2fs /dev/xvdf
Step
- To make the extend size of EBS volume to be useful we need to resize it with formatting
2:
- EBS Automount On Reboot
- Back up the /etc/fstab file.
- sudo cp /etc/fstab /etc/fstab.bak
- Open /etc/fstab file and make an entry in the following format.
- device_name mount_point file_system_type fs_mntops fs_freq fs_passno
- EBS Automount On Reboot
title | Resources used to complete the POC which are still active for now: |
---|
34.229.39.112 and 54.211.161.112 as EC2 Instances
EBS Volume : InsightsStorage : vol-022ad0b5e3f799d87
Useful link :
https://devopscube.com/mount-ebs-volume-ec2-instance/Top Section