差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
linux:lvm [2012/03/05 02:04] – [LV(論理ボリューム) の拡張] ともやん | linux:lvm [2019/05/18 02:23] (現在) – 外部編集 非ログインユーザー | ||
---|---|---|---|
行 190: | 行 190: | ||
===== LV(論理ボリューム) の縮小 ===== | ===== LV(論理ボリューム) の縮小 ===== | ||
< | < | ||
- | # lvreduce | + | # umount /home |
- | WARNING: Reducing active | + | # fsck -f / |
+ | fsck from util-linux-ng 2.17.2 | ||
+ | e2fsck 1.41.12 (17-May-2010) | ||
+ | Pass 1: Checking inodes, blocks, and sizes | ||
+ | Pass 2: Checking directory structure | ||
+ | Pass 3: Checking directory connectivity | ||
+ | Pass 4: Checking reference counts | ||
+ | Pass 5: Checking group summary information | ||
+ | /dev/mapper/vg_monster-lv_home: 704340/241876992 files (0.3% non-contiguous), | ||
+ | # resize2fs / | ||
+ | resize2fs 1.41.12 (17-May-2010) | ||
+ | Resizing the filesystem on / | ||
+ | The filesystem on / | ||
+ | # lvreduce -L3710018M / | ||
+ | Rounding up size to full physical extent 3.54 TiB | ||
+ | WARNING: Reducing active logical volume to 3.54 TiB | ||
THIS MAY DESTROY YOUR DATA (filesystem etc.) | THIS MAY DESTROY YOUR DATA (filesystem etc.) | ||
- | Do you really want to reduce | + | Do you really want to reduce |
- | Reducing logical volume | + | Reducing logical volume |
- | Logical volume | + | Logical volume |
+ | </ | ||
+ | |||
+ | ===== 他で使用していたディスクのLVMを認識させる ===== | ||
+ | < | ||
+ | $ sudo lvscan | ||
+ | inactive | ||
+ | inactive | ||
+ | ACTIVE | ||
+ | ACTIVE | ||
+ | ACTIVE | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | $ sudo vgchange -ay vg_hoge | ||
+ | 2 logical volume(s) in volume group " | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | $ sudo vgchange -an vg_hoge | ||
+ | 0 logical volume(s) in volume group " | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | $ sudo lvscan | ||
+ | inactive | ||
+ | inactive | ||
+ | ACTIVE | ||
+ | ACTIVE | ||
+ | ACTIVE | ||
</ | </ |