Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Ubuntu upstart file at /etc/init/ebs.conf
- description "When /dev/xvdf is attached, ensure that it's formatted as XFS and mount it."
- start on block-device-added xvdf
- console log
- task
- script
- parted -s /dev/xvdf print all > /dev/null || mkfs.xfs /dev/xvdf
- mkdir -m 755 -p /ebs
- initctl emit mounting DEVICE=/dev/xvdf MOUNTPOINT=/ebs TYPE=xfs OPTIONS=noatime
- mount -t xfs -o noatime /dev/xvdf /ebs && \
- initctl emit mounted DEVICE=/dev/xvdf MOUNTPOINT=/ebs TYPE=xfs OPTIONS=noatime
- end script
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement