°Ô½Ã¹° 260°Ç
   
[RHEL7.2] LVM º¹±¸ - UUID º¹±¸ÇÒ¶§ [pvs / pvcreate ]
±Û¾´ÀÌ : ´õÄÚ ³¯Â¥ : 2018-11-14 (¼ö) 13:37 Á¶È¸ : 2794


1.  ¹®Á¦ :sda°¡ OS ¿µ¿ªÀ̸ç, vg±×·ìÀ» rhel ·Î ¸¸µé¾î³õÀº »óÅÂÀÓ 
       ±×·±µ¥ sdb ¿¡ rhel ±×·ì¿¡ ¼ÓÇÏ°Ô ¸¸µé¾î ³ù°í, lv_crash ÇüÅ·Π¸¸µé¾ú´Âµ¥ ¹®Á¦°¡ »ý°Ü sdb°¡ unknow À¸·Î ¶ß¸é¼­ ºÎÆÃÀÌ ¿À·ù°¡ ³ª°í Rescue mode ¿¡¼­  chroot °¡ ¾ÈµÊ.


2. ÇØ°á
1) rescue mode ·Î ÁøÀÔ ÇÑ´Ù. 
2) chroot °¡ ¾È µÇ¸é pvs »ó¿¡ unknown À» È­ÀÎ ÇÑ´Ù. 
3) pvcreate ¸¦ ÁøÇà ÇÑ´Ù. ( LVM meta °¡ ³¯¶ó °¬´Ù´Â ÀüÁ¦·Î )

#pvs -v // ÀÌ ¸í·É¾î·Î UUID¸¦ È®ÀÎÇÒ¼öÀÖ´Ù.

# pvcreate --uuid "FmGRh3-zhok-iVI8-7qTD-S5BI-MAEN-NYM5Sk" --restorefile /etc/lvm/backup/rhel   /dev/sdb
[¹é¾÷Á¤º¸°¡ ÀÖ´ÂÆÄÀÏ] [´ë»óDISK]


  Physical volume "/dev/sdh1" successfully created

ÀÌ ÀÌÈÄ·Î chroot°¡ Á¤»óÀûÀ¸·Î ½ÇÇàµÈ´Ù. 

- Ãß°¡·Î ºÎÆÃÀ» Çصµ º¼·ýÀÌ ¿Ã¶ó¿ÀÁö ¾Ê´Â´Ù¸é Æ÷¸ËÀ» ÇؾßÇÑ´Ù.
# mkfs.xfs /dev/rhel/lv_crash
# mount -a 





theko 2018-12-05 (¼ö) 00:51
Ȥ, pvscan À» Çϸé /etc/lvm/backup/vg_os °¡ ¾÷µ¥ÀÌÆ®°¡ µÈ´Ù. Çö½ÃÁ¡À¸·Î

±×·³ ¹é¾÷ ÆÄÀÏ·Î º¹±¸¸¦ ÇÑ´Ù. ´Ü, UUID´Â ÇöÀç ½ÃÁ¡À¸·Î ¸ÂÃçÁÖ°í ÁøÇà.

ex)

# pvs -v
    Wiping internal VG cache
    Wiping cache of LVM-capable devices
  PV         VG               Fmt  Attr PSize    PFree DevSize PV UUID
  /dev/sda2  rhel             lvm2 a--   <99.00g    0  <99.00g DV9yPf-qU2Z-N0Li-L4yX-AZ5N-W13P-fwC2fz
  /dev/sdb   rhel             lvm2 a--  <100.00g    0  100.00g 8uXHki-xhAE-nUtI-3Sf2-MjYi-ejt3-n41jC3
  /dev/sdc   vgshare_cssprddb lvm2 a--     1.46t    0    1.61t JAmuXf-fWLo-paj0-P3Pn-rjAI-MSQu-124WUB
  /dev/sdd   vgshare_cssprddb lvm2 a--     1.95t    0   <2.15t soaP7i-kroU-ap3v-92NI-mVG3-eJIT-X6nMm8
  /dev/sde   vgshare_cssprddb lvm2 a--     1.95t    0   <2.15t 8fKvyA-IwoR-357q-KMgM-fbB1-82Y5-UVk0nA
  /dev/sdf   vgshare_cssprddb lvm2 a--  <100.00g    0  150.00g 63UKg0-Kzhn-1dyL-prA3-W5RW-D7z9-ppWxmX






pv0 {
                        id = "JAmuXf-fWLo-paj0-P3Pn-rjAI-MSQu-124WUB"
                        device = "/dev/sdc"     # Hint only

                        status = ["ALLOCATABLE"]

                }

                pv1 {
                        id = "soaP7i-kroU-ap3v-92NI-mVG3-eJIT-X6nMm8"
                        device = "/dev/sdd"     # Hint only




     
     
theko 2018-12-05 (¼ö) 00:53
vgcfgrestore --file  /etc/lvm/backup/<volume group name> <volume group name>


pvcreate --restorefile /etc/lvm/backup/<volume group name> --uuid <UUID> <device>
À̸§ Æнº¿öµå
ºñ¹Ð±Û (üũÇÏ¸é ±Û¾´À̸¸ ³»¿ëÀ» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.)
¿ÞÂÊÀÇ ±ÛÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä.
   

miwit.com sir.co.kr DNS Powered by DNSEver.com DNS Powered by DNSEver.com