Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
25
Help us understand the problem. What is going on with this article?
@tukiyo3

LVMボリュームのマウントの仕方

More than 3 years have passed since last update.
apt install -y lvm2

マウント

ボリュームグループ名(VG)を確認

  • /dev/sdcがどのボリュームグループを持つか確認
$ sudo pvscan
  PV /dev/sde3   VG pve   lvm2 [148.55 GiB / 16.00 GiB free]
  Total: 1 [148.55 GiB] / in use: 1 [148.55 GiB] / in no VG: 0 [0   ]

今回はpveという名前のボリュームグループがあることがわかる。
ボリュームグループは/dev/ボリュームグループ名/ロジカルグループ名となる

ボリュームグループ内のロジカルボリューム名を確認

$ sudo lvscan
  inactive          '/dev/pve/swap' [4.00 GiB] inherit
  inactive          '/dev/pve/root' [37.25 GiB] inherit
  inactive          '/dev/pve/data' [91.30 GiB] inherit

ロジカルボリュームをシステムで利用できるようにする

$ sudo lvchange --available y /dev/pve/root
inactiveからACTIVEになる。
$ sudo lvscan
  inactive          '/dev/pve/swap' [4.00 GiB] inherit
  ACTIVE            '/dev/pve/root' [37.25 GiB] inherit
  inactive          '/dev/pve/data' [91.30 GiB] inherit
$ sudo mount /dev/mapper/pve-root /mnt/

アンマウント

$ sudo umount /mnt/

ロジカルボリュームをシステムから利用できなくする

$ sudo lvchange --available n /dev/pve/root
25
Help us understand the problem. What is going on with this article?
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
tukiyo3

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
25
Help us understand the problem. What is going on with this article?