Article 5K26B Mount issue with s3 bucket share in aws

Mount issue with s3 bucket share in aws

by
ckadali
from LinuxQuestions.org on (#5K26B)
Hi ,

Need help to monitor my mount points which are mounted s3 buckets on aws ec2 instance.

The total number of mounts are 14 . I want to monitor using a cron job every minute if mounts are stable we see frequently that some mount points are unmounting so wanted to keep monitoring all mounts and in case something goes missing we have to remount it please suggest a bash code better

#!/bin/bash
mnt=`cat /pro/mount | grep s3fs | wc -l`
if [mnt < 14]
then
umount -l /mnt/ufcwv10qa
umount -l /mnt/ufcwv10stg

/usr/bin/s3fs -o iam_role="S3_Admin_Access" -o nonempty -o endpoint=us-east-1 -o allow_other -o umask=0002 -o gid=1003 -o multireq_max=5 -o use_cache=/tmp ufcwv10qas3artifacts /mnt/ufcwv10qalatest?d=yIl2AUoC8zA latest?i=hxLaHeHXbj4:VSKLpt8w0ow:F7zBnMy latest?i=hxLaHeHXbj4:VSKLpt8w0ow:V_sGLiP latest?d=qj6IDK7rITs latest?i=hxLaHeHXbj4:VSKLpt8w0ow:gIN9vFwhxLaHeHXbj4
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments