Created
          December 5, 2012 18:17 
        
      - 
      
 - 
        
Save srs81/4218104 to your computer and use it in GitHub Desktop.  
    Attach, format and mount a new EBS volume on an EC2 instance
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # Variables | |
| VOLUME=/dev/sdf | |
| DIRECTORY=/var/www/html/ | |
| USER=apache | |
| GROUP=apache | |
| # Commands | |
| mkfs -t ext4 $VOLUME | |
| mount $VOLUME $DIRECTORY | |
| echo "$VOLUME $DIRECTORY ext4 noatime 0 0" | sudo tee -a /etc/fstab | |
| sudo chown -R $USER:$GROUP $DIRECTORY | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment