Created
November 8, 2014 04:55
-
-
Save jay-lannister/c18d1c8ba5369122866c to your computer and use it in GitHub Desktop.
Linux partition management on AWS
This file contains 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
fdisk -l | |
# CentOS 6 uses ext4 as a default filesystem | |
mkfs.ext4 /dev/xvdj | |
# CentOS 7 uses xfs as a default filesystem | |
mkfs.xfs /dev/xvdj | |
vim /etc/fstab | |
# /dev/xvdj /root/sonatype-work ext4 defaults,acl 0 0 |
This file contains 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
# references | |
# [Resizing Root Partition on Linux in Amazon EC2](https://linuxacademy.com/blog/linux/resizing-root-partition-on-linux-in-amazon-ec2/) | |
# 1. create a snapshot of the old hdd | |
# 2. create a new volume which has a more storage than the old one from the snapshot | |
# 3. check the new partition name you want to expand by running | |
lsblk | |
# 4. expand the hdd on the fly | |
resize2fs /dev/xvde |
This file contains 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
# When you are getting an error message from Nagios Disk Check plugin like: | |
# DISK CRITICAL - /root/sonatype-work is not accessible: Permission denied | |
vim /etc/fstab | |
# check if `acl` option is appended or not just like: | |
# /dev/xvdj /root/sonatype-work ext4 defaults,acl 0 0 | |
# add `acl`and remount the device |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment