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

growpartがコケる件

EBSを拡張して反映しようとしたらgrowpartが謎のエラーを吐き、拡張ができませんでした。

$ sudo growpart /dev/xvda 1
/usr/bin/growpart: 175: /usr/bin/growpart: arithmetic expression: expecting primary: "シリンダ*ヘッド*63"
$ sudo resize2fs /dev/xvda1
resize2fs 1.42.9 (4-Feb-2014)
The filesystem is already 2094474 blocks long.  Nothing to do!

どうやらシェルのLANGの問題との事で、

$ locale

LANG=ja_JP.UTF-8
LANGUAGE=
LC_CTYPE="ja_JP.UTF-8"
LC_NUMERIC="ja_JP.UTF-8"
LC_TIME="ja_JP.UTF-8"
LC_COLLATE="ja_JP.UTF-8"
LC_MONETARY="ja_JP.UTF-8"
LC_MESSAGES="ja_JP.UTF-8"
LC_PAPER="ja_JP.UTF-8"
LC_NAME="ja_JP.UTF-8"
LC_ADDRESS="ja_JP.UTF-8"
LC_TELEPHONE="ja_JP.UTF-8"
LC_MEASUREMENT="ja_JP.UTF-8"
LC_IDENTIFICATION="ja_JP.UTF-8"
LC_ALL=ja_JP.UTF-8

となっていたので

$ sudo su - 
# export LC_ALL="en_US.UTF-8"

で変更して、再度

# growpart /dev/xvda 1
CHANGED: partition=1 start=16065 old: size=16755795 end=16771860 new: size=37720620,end=37736685
# resize2fs /dev/xvda1
Filesystem at /dev/xvda1 is mounted on /; on-line resizing required
old_desc_blocks = 1, new_desc_blocks = 2
The filesystem on /dev/xvda1 is now 4715077 blocks long.

でOKでした。

参考サイト

growpartがこけるときの対応

Why do not you register as a user and use Qiita more conveniently?
  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
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