0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

[AWS EC] Linux にEBSを追加

Posted at

ただのメモです

AWSコンソール

  • EBSを作ってインスタンスへアタッチ
  • デバイス名は控えておいたほうがいい

Terminal

  • SSHで繋ぐか、System ManagerでStart Session
# ディスクの空き領域を表示
df -h

# パーティションの作成
## /dev/xvdbはEBSをアタッチしたときに指定したもの 
## /dev/sdf -> /dev/xvdf の場合があるので、fdisk -l で確認
sudo su -
fdisk -l
mkfs -t ext4 /dev/xvdb

# マウント (と権限)
mkdir /data2
mount /dev/xvdb /data2
cd /data2
chmod 777 .

# ディスクの空き領域を表示
df -h

# 起動時に自動でマウントされるようにfstabに追加
echo /dev/xvdb /data2 ext4 defaults 1 1 >> /etc/fstab

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?