Help us understand the problem. What is going on with this article?

Azure仮想マシンへのディスク追加

More than 5 years have passed since last update.

Azure仮想マシンのディスク容量はデフォルトだと数10Gしかないので、
データが溜まっていくようなケースで使用する場合には、追加ディスクをマウントする必要がある.

ディスクの接続

  1. Azure管理ポータルの仮想マシンのページで該当の仮想マシンを選択
  2. [ディスクの接続]->[空のディスクの接続]
  3. 適当なファイル名とファイルサイズを設定

※ キャッシュ設定は、REDOログファイルの領域にもなるため、[なし]を選択

接続されたディスクの識別子を確認

tail -f /var/log/syslog

おそらくsdcという文字列があるはず

接続したディスクにパーティションを作成

sudo fdisk /dev/sdc
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xf068a662.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n
Partition type:
   p   primary (0 primary, 0 extended, 4 free)
   e   extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-1048575999, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-1048575999, default 1048575999):
Using default value 1048575999

Command (m for help): p

Disk /dev/sdc: 536.9 GB, 536870912000 bytes
255 heads, 63 sectors/track, 65270 cylinders, total 1048576000 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xf068a662

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1            2048  1048575999   524286976   83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

作成したパーティションをフォーマット

sudo mkfs -t ext4 /dev/sdc1

作成したパーティションをマウント

sudo mount /dev/sdc1 /(path_to_mount)

OS再起動時もマウントされるよう設定

/etc/fstabに下記1行を追加

/dev/sdc1  /(path_to_mount)  ext4  defaults  0 0

参考

unosk
東京でスタートアップのエンジニアやってます。
http://neuro-inc.jp
neuro
二次交通に特化したモビリティプラットフォームRYDEの企画運営する東京のスタートアップです。
https://ryde-inc.jp/
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした