Advertisement
Guest User

Untitled

a guest
Oct 9th, 2013
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. # Ubuntu upstart file at /etc/init/ebs.conf
  2.  
  3. description "When /dev/xvdf is attached, ensure that it's formatted as XFS and mount it."
  4.  
  5. start on block-device-added xvdf
  6.  
  7. console log
  8.  
  9. task
  10. script
  11. parted -s /dev/xvdf print all > /dev/null || mkfs.xfs /dev/xvdf
  12. mkdir -m 755 -p /ebs
  13. initctl emit mounting DEVICE=/dev/xvdf MOUNTPOINT=/ebs TYPE=xfs OPTIONS=noatime
  14. mount -t xfs -o noatime /dev/xvdf /ebs && \
  15. initctl emit mounted DEVICE=/dev/xvdf MOUNTPOINT=/ebs TYPE=xfs OPTIONS=noatime
  16. end script
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement