9
7

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.

Hyper-VのUbuntu18.04で容量可変にしたけれど

Last updated at Posted at 2019-03-12

Hyper-VでHDDを容量可変にしたのはいいけれど

Hyper-Vで容量を可変にしたHDDをマウントしたUbuntu18.04でDockerやらKubernetesでいろいろやっていたわけですが、KubernetesのKubeletが返してくる状態がおかしいわけです。ディスク容量不足でpodがデプロイできないとおっしゃっている。
いやいやそんなわけないでしょう、と

$ df -h

してみると/が100%使用済みとかなっていたわけです。
ウソでしょ・・・?というかアレですか、可変って言っても自動で増やしてくれるわけじゃなくて自分でパーティションとか拡張しなきゃダメなん??というわけで調べてみました。

以下のコマンド

いきなり全部はアレなので空き容量の10%を新規に追加

$ sudo lvextend -l +10%FREE /dev/ubuntu-vg/ubuntu-lv
$ sudo resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv

可変のボリュームはLVMでマウントされているんですね~
そこまでディスク使ったことがなかったので困ったことはありませんでしたが、使ってみるもんだね!

9
7
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
9
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?