flagflag  
4: 2020-10-20 (Tue) 10:35:09 iseki source Cur: 2023-06-08 (Thu) 17:26:05 iseki source
Line 1: Line 1:
 +** LVMの作成 [#o9f7e233]
 +*** ディスクの確認とパーティションの作成 [#n3d58f1f]
 +- fdisk -l
 +- fdisk /dev/sdb
 +-- パーティションタイプ(t): LVM (8e)
 +
 +
 +
 +#br
 +*** RAID1のディスクでLVMを作る [#c40c9a82]
 + RAID1を構成する(/dev/md1, /dev/md2, /dev/md3)
 + pvcreate /dev/md1
 + pvcreate /dev/md2
 + pvcreate /dev/md3
 + vgcreate vg-home /dev/md1 /dev/md2 /dev/md3
 + vgdisplay
 + lvcreate -n lv-home -l 100%FREE vg-home
 +
 + mkfs.ext4 /dev/vg-home/lv-home
 + mkdir /mnt/home
 + mount /dev/vg-home/lv-home /mnt/home/  (テスト)
 + vi /etc/fstab
 + reboot
 +
 +
 + lvdisplay
 + lvremove /dev/vg-home/lv-home
 + lvdisplay
 + vgdisplay
 + vgremove vg-home
 + pvremove /dev/md1
 + pvremove /dev/md2
 + pvremove /dev/md3
 +
 +** Case [#wcba4b3c]
*** LVMボリュームのマウント [#nf0eeb59] *** LVMボリュームのマウント [#nf0eeb59]
- ディスクとパーティションの確認 - ディスクとパーティションの確認
Line 32: Line 67:
--- 例:xfs_growfs /dev/mapper/cl-root --- 例:xfs_growfs /dev/mapper/cl-root
--- 例(ext4の場合):resize2fs /dev/mapper/cl-root --- 例(ext4の場合):resize2fs /dev/mapper/cl-root
 +#br
 +*** BL460c G9 を色々弄っていたら,sdb が sda になって,/dev/mapper/rl-home を見失った. [#k68cf663]
 +**** 現象 [#lc040f72]
 +- 当然 /home をマウントできない.
 +- pvs コマンド等が実行できない.
 + # pvs
 + LVM Devices file sys_wwid naa.600508b1001c1c0bea082186fde1e754 PVID qKicIf4JPZY7Try74aSeseG3shUYbM7y last seen on /dev/sdb3 not found.
 +
 +#br
 +
 +**** 解決方法 [#f4ae00c4]
 +- /dev/disk/by-id/ に使用している diskの名前がファイル名になっているので,ls で確認.
 + lrwxrwxrwx 1 root root  9 May 12 01:09 wwn-0x600508b1001cde14c8adbde6630cfe1d -> ../../sda
 + lrwxrwxrwx 1 root root 10 May 12 01:09 wwn-0x600508b1001cde14c8adbde6630cfe1d-p​art1 -> ../../sda1
 + lrwxrwxrwx 1 root root 10 May 12 01:09 wwn-0x600508b1001cde14c8adbde6630cfe1d-p​art2 -> ../../sda2
 + lrwxrwxrwx 1 root root 10 May 12 01:09 wwn-0x600508b1001cde14c8adbde6630cfe1d-p​art3 -> ../../sda3
 +- wwn-0x600508b1001cde14c8adbde6630cfe1d (SSD) の 0x 以降をコピー.
 +- /etc/lvm/devices/system.devices を開いて,naa. 以降に先ほどコピーしたものをペースト.ついでに sdb を sda に変更.
 +-- IDTYPE=sys_wwid IDNAME=naa.600508b1001cde14c8adbde6630cf​e1d DEVNAME=/dev/sda3 PVID=qKicIf4JPZY7Try74aSeseG3shUYbM7y PART=3
 +
 +- pvscan が実行できるか?
 +-- 実行出来たら,reboot
#br #br


Front page   New List of Pages Search Recent changes   Help   RSS of recent changes (RSS 1.0) RSS of recent changes (RSS 2.0) RSS of recent changes (RSS Atom)

Site Search

Login

Username:

Password:


Lost Password?
Register now!!

Sub Menu

mini Calendar

Last MonthMay 2024Next Month
Su Mo Tu We Th Fr Sa
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Today

Who's Online

98 user(s) are online (36 user(s) are browsing xpwiki)

Members: 0
Guests: 98

more...

Access Counter

Today : 2402240224022402
Yesterday : 1361113611136111361113611
Total : 2364080923640809236408092364080923640809236408092364080923640809
Powered by XOOPS Cube 2.1© 2001-2006 XOOPS Cube Project
Design by XoopsDesign.com