4
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.

growpartがコケる件

Last updated at Posted at 2018-10-29

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がこけるときの対応

4
0
1

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
4
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?