Lock in $30 Savings on PRO—Offer Ends Soon! ⏳

PersistentVolumeの一歩進んだ使い方

 PersistentVolumeの一歩進んだ使い方

CloudNative Days Tokyo2020 での発表資料です。

https://event.cloudnativedays.jp/cndt2020/talks/13

Yukinori Sakashita

September 09, 2020
Tweet

More Decks by Yukinori Sakashita

Other Decks in Technology

Transcript

  1. ࣗݾ঺հ ‣ٕज़ݚڀΤϦΞ  ӡ༻؅ཧٕज़  Ϋϥ΢υ  αʔόετϨʔδ  ࣗಈࣗ཯ίϯϐϡʔςΟϯά

     "*.- // ).. #BZFTJBO/FUXPSL  ‣લ৬  ೔ཱ੡࡞ॴ 㾎தԝݚڀॴԣ඿ݚڀॴ ओ೚ݚڀһ  㾎ւ֎ݚڀॴ!γϦίϯόϨʔ ϥϘ௕   αʔόϕϯμʔ ςΫχΧϧ4& 2 ࡔԼ޾ಙ ത࢜  :VLJOPSJ4BLBTIJUB 1I% ‣ ϠϑʔגࣜձࣾθοτϥϘגࣜձࣾ ‣ 4/*"೔ຊࢧ෦ٕज़ҕһձ෭ҕһ௕ ‣ 4/*"5FDIOJDBM$PVODJM"EWJTPS
  2. ओͳॻ੶8FCهࣄߨԋ ‣ ॻ੶,VCFSOFUFT࣮ફೖ໳ ग़൛  ‣ 8FCهࣄ5IJOL*5  ίϯςφΛಋೖ͠ͳ͍ͱɺͲͷΑ͏ͳະདྷ͕ ଴͍ͬͯͨͷ͔

        ݱ৔Ͱ໾ཱͭ5JQT͕੝Γͩ͘͞Μ ,VCFSOFUFTͷΞϨ΍ίϨ    ‣ ߨԋ  ߴ஌޻Պେֶ৘ใֶ܈ಛผߨٛʮσʔλͷരൃత૿ՃΛ ࢧ͑ΔετϨʔδͷઌ୺ٕज़ͱࠃࡍඪ४Խʯ    ,VCF'FTU5PLZPʮϠϑʔθοτϥϘͷ εςʔτϑϧΞϓϦέʔγϣϯ΁ͷ௅ઓʯ  3
  3. "HFOEB ‣ ,VCFSOFUFTͰΞϓϦέʔγϣϯΛ࣮ߦ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e0-43cf-ada9-7491fd3ae2d4 10Gi $ kubectl patch pvc test-pvc -p "{\"spec\":{\"resources\":{\"requests\":{\"storage\": \"50Gi\"}}}}" $ kubectl get pvc NAME STATUS VOLUME CAPACITY ・・・ test-pvc Bound pvc-5452b84e-56e0-43cf-ada9-7491fd3ae2d4 50Gi มߋ
  7. 4UBUFGVM4FUͰ͸ཁ஫ҙ ‣ 7PMVNF$MBJN5FNQMBUF͔Β࡞੒͞Εͨ17$ͷαΠζ͸มߋՄೳ ‣ ͔͠͠ɺσϓϩΠ͞Εͨ4UBUFGVM4FUͷ7PMVNF$MBJN5FNQMBUFT͸มߋෆՄ ‣ (JU)VCͳͲͰ.BOJGFTUΛ؅ཧ͍ͯ͠Δ৔߹͸ζϨ͕ੜ͡ͳ͍Α͏ʹ஫ҙ 10 BQJ7FSTJPOBQQTW LJOE4UBUFGVM4FU

    ʜ WPMVNF$MBJN5FNQMBUFT NFUBEBUB OBNFCMPDL TQFD BDDFTT.PEFT<3FBE8SJUF0ODF> TUPSBHF$MBTT/BNFTUBOEBSE SFTPVSDFT SFRVFTUT TUPSBHF( มߋ͍ͨ͠ "QQMZ ࢀߟ ,&1IUUQTHJUIVCDPNLVCFSOFUFTFOIBODFNFOUTJTTVFT *TTVFIUUQTHJUIVCDPNLVCFSOFUFTLVCFSOFUFTJTTVFT
  8. 8PSLBSPVOE ‣ 4UBUFGVM4FUΛDBTDBEFΦϓγϣϯͰҰ࣌࡟আ ‣ खॱྫ  LVCFDUMQBUDIίϚϯυͳͲͰطଘͷ17$ͷαΠζΛมߋ  4UBUFGVM4FUͷ.BOJGFTUϑΝΠϧ಺ͷWPMVNF$MBJN5FNQMBUFTͷαΠζΛ खॱͱಉ͡αΠζʹมߋ

     DBTDBEFΦϓγϣϯͰ4UBUFGVM4FUΛҰ࣌࡟আ ࡞੒ࡁΈͷ1PE 17$ 17͸࡟আ͞Εͳ͍   ࠶౓ɺखॱͰมߋͨ͠.BOJGFTUϑΝΠϧΛ"QQMZ 11 $ kubectl delete sts —cascade=false <StatefulSet name>
  9. 17ͷ҆શͳαΠζ ‣ 7PMVNF&YQBOTJPO͸ɺ࠷ऴखஈ͙Β͍ͷҙࣝͰαΠζΛࣄલʹઃܭ ‣ ετϨʔδͰ5IJO1SPWJTJPOJOH͕αϙʔτͷ৔߹ɺαΠζͷେ͖ͳ17 Λ༧Ί࡞੒  5IJO1SPWJTJPOJOH͸࣮ࡍͷॻ͖ࠐ·ΕͨྖҬͷΈ ෺ཧϝσΟΞ 44%ɺ)%%

    Λফඅ ‣ 4UBUFGVM4FUͰͷ7PMVNF&YQBOTJPO͸8PSLBSPVOE͕͓קΊ   8PSLBSPVOEͷ࣮ࢪத͸(JU0QT่͕Εͯ͠·͏͕ɺҎ߱͸(JU0QT͕ܧଓ  8PSLBSPVOE͸4UBUFGVM4FUͰεέʔϧΞ΢τલʹ17$ͷ.BOJGFTUΛ࡞੒ ͢Δඞཁ͋Γ ๨ΕΔͱ17ͷσʔλᷓΕͷࣄނʹͭͳ͕ΔϦεΫ͋Γ 14
  10. 4OBQTIPUͱ͸ ετϨʔδͷ஌ࣝ ‣ 4OBQTIPUΛ࡞੒ͨ࣌͠ࠁͷσʔλΛอଘ͢Δػೳ 16 " 5JNF # # "`

    $ $    "Λ"`ʹ ॻ͖׵͑ 4OBQTIPU 7PMVNF   " " # $   " # $ #`   "` 4OBQTIPU࡞੒ 4PVSDF 4OBQTIPU࡞੒ #Λ#`ʹ ॻ͖׵͑ ࠩ෼σʔλͷ อଘྖҬ $P8 $PQZPO8SJUF ʹ ΑΔࠩ෼όοΫΞοϓ "`
  11. ,VCFSOFUFTͷ7PMVNF4OBQTIPU ‣ 7PMVNF4OBQTIPU͸ͭͷϦιʔεͰදݱ  7PMVNF4OBQTIPU4OBQTIPUͷཁٻ࢓༷  7PMVNF4OBQTIPU$POUFOU4OBQTIPUͷίϯςϯπ ࠩ෼σʔλͷू߹  

    7PMVNF4OBQTIPU$MBTT4OBQTIPU༻ͷ4UPSB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PVSDF LJOE1FSTJTUFOU7PMVNF$MBJN OBNFQWD  .BOJGFTUͷ"QQMZ $MPOJOH࣮ߦ QWD QWD
  15. .Z42-ͷεέʔϧΞ΢τͷྲྀΕ 28 4PVSDF 3FQMJDB 4PVSDF  ৽͍͠.Z42-ͷ1PEΛ࡞੒ /FX 4PVSDF 

    όοΫΞοϓΛऔಘ /FX #BDLVQ -PH1PTJUJPO 4PVSDF  όοΫΞοϓΛΠϯϙʔτ /FX #BDLVQ -PH1PTJUJPO 4PVSDF  3FQMJDBͱͯ͠ىಈ 3FQMJDB ࢀরܥ42- ߋ৽ܥ42- .Z42-$MJFOUT .Z42-Ϛϧνߏ੒ εέʔϧΞ΢τ࣌ͷ3FQMJDB૿ઃεςοϓ 4UPSBHF
  16. 4FSWFS$PQZͰͷεέʔϦϯάྫ ‣ JOJU$POUBJOFSͰεΫϦϓτΛ࣮ߦ͠όοΫΞοϓΛίϐʔ ‣ αΠυΧʔͰεΫϦϓτΛ࣮ߦ͠όοΫΞοϓΛΠϯϙʔτˍ ϩάͷϙδγϣϯΛઃఆͨ͠ޙɺ3FQMJDBͱͯ͠.Z42-Λىಈ ‣ શ.BOJGFTU͸ҎԼΛࢀর IUUQTLVCFSOFUFTJPKBEPDTUBTLTSVOBQQMJDBUJPOSVOSFQMJDBUFETUBUFGVMBQQMJDBUJPO 31

    JOJU$POUBJOFST ʜ DPNNBOE CBTI ʜ # Get data from previous peer. ncat --recv-only mysql-$(($ordinal-1)).mysql 3307 | xbstream -x -C /var/lib/mysql # Prepare the backup. xtrabackup --prepare --target-dir=/var/lib/mysql
  17. 7PMVNF$MPOJOHͷεέʔϦϯάྫ 32 BQJ7FSTJPOW LJOE1FSTJTUFOU7PMVNF$MBJN NFUBEBUB OBNFEBUBNZTRM TQFD ʜ apiVersion: apps/v1

    kind: StatefulSet metadata: name: mysql … volumeClaimTemplates: - metadata: name: data … dataSource: kind: PersistentVolumeClaim name: data-mysql-0 ‣ 4PVSDFͱͳΔ.Z42-ͷ1PE NZTRM ͷ17$͸ࣄલʹ࡞੒  ͜ͷͱ͖ͷ17$໊͸7PMVNF$MBJN5FNQMBUFTͰࣗಈੜ੒͞ΕΔ໊લ ‣ 4UBUFGVM4FUͷ7PMVNF$MBJN5FNQMBUFͰEBUB4PVSDFʹ্ه17$Λࢦఆ ‣ .Z42-ͷίϯςφͰεΫϦϓτΛ࣮ߦ͠ϩάͷϙδγϣϯΛઃఆޙɺ3FQMJDB ͱͯ͠.Z42-Λىಈ
  18. ੑೳଌఆ؀ڥ ‣ ,VCFSOFUFTW XPSLFSY୆   W$16Y .FNPSZ.# ‣ /FU"QQ0/5"1W

    /FU"QQ5SJEFOU ‣ .Z42- SFTPVSDFTSFRVFTUTDQVN NFNPSZ(J  ‣ TZTCFODIʹͯ4PVSDFͷ.Z42-΁ࣄલʹϨίʔυΛొ࿥  .Z42-ͷϨίʔυ਺ ԯϨίʔυɺ໿(#  ‣ 4UBUFGVM4FUͷ3FQMJDBTΛ͔Β΁εέʔϧΞ΢τͤ͞ଌఆ 34 TZTCFODIECESJWFSNZTRMNZTRMIPTUNZTRMNZTRMNZTRMVTFSSPPUa UBCMF@TJ[FPMUQ@SFBE@POMZQSFQBSF LVCFDUMTDBMFSFQMJDBTTUBUFGVMTFUNZTRM
  19. ଌఆ݁Ռ 35 εέʔϧΞ΢τʹཁͨ͠૯࣌ؒ 3FQMJDBTˠ 1PE͋ͨΓͷੜ੒࣌ؒ ฏۉ ˞ TFD1PE TFD1PE 7PMVNF$MPOJOH

    4FSWFS$PQZ 5JNF 4FD      4FSWFS$PQZ 7PMVNF$MPOJOH ˞1PE಺ͷίϯςφ͕શͯىಈ͢Δ·Ͱͷ࣌ؒ  
  20. 7PMVNF$MPOJOHͷ஫ҙ఺ 37 ‣ %#ͷεέʔϧ࣌͸௥Ճɾߋ৽ͷτϥϯβΫγϣϯ͕ೖΒͳ͍Α͏ʹ 8SJUFϩοΫΛ࣮ߦ͕Ұൠత %#ͷ੩ࢭԽ  ‣ 4FSWFS$PQZ͸1PEͰ࣮ߦ͢ΔεΫϦϓτ಺ͰόοΫΞοϓ௚લʹ࣮ࢪՄೳ ‣

    7PMVNF$MPOJOHͰ͸1PEͷੜ੒લʹσʔλͷίϐʔ͕ऴΘ͍ͬͯΔͨΊɺ1PEͰ ࣮ߦ͢ΔεΫϦϓτͰ͸஗͍ ࣄલʹखಈͰ42-࣮ߦPSผ1PE͔Β࣮ߦͳͲ 4PVSDF 3FQMJDB  σʔλͷແ͍ 17$17Λ࡞੒  εΫϦϓτ࣮ߦ  σʔλίϐʔ  .Z42-ىಈ  σʔλίϐʔࡁΈͷ 17$17Λ࡞੒  εΫϦϓτ࣮ߦ  .Z42-ىಈ $MPOJOHJO4UPSBHF 4PVSDF 3FQMJDB 4FSWFS$PQZ 7PMVNF$MPOJOH %#ͷ੩ࢭԽ ΋࣮ࢪ %#ͷ੩ࢭԽ ΋࣮ࢪ
  21. $4*ͷ5PQPMPHZ"XBSF ‣ 4UPSBHF$MBTTʹͯ;POFΛࢦఆ͠17 7PMVNF ͷੜ੒ݩΛࢦఆ 40 "; "; ";༻ ";༻

    40 LJOE4UPSBHF$MBTT ʜ BMMPXFE5PQPMPHJFT NBUDI-BCFM&YQSFTTJPOT LFZGBJMVSFEPNBJOLVCFSOFUFTJP[POF WBMVFT "; LJOE4UPSBHF$MBTT ʜ BMMPXFE5PQPMPHJFT NBUDI-BCFM&YQSFTTJPOT LFZGBJMVSFEPNBJOLVCFSOFUFTJP[POF WBMVFT "; ৄࡉͳಈ࡞ݕূ͸ͪ͜ΒΛࢀর IUUQTRJJUBDPNZTBLBTIJUBJUFNTCBBDBEDF
  22. .VMUJ";3FHJPOো֐ରԠ 42 ‣ ετϨʔδ͸σʔλΛࣦΘͳ͍͜ͱ͕ϛογϣϯͷΠϯϑϥػث ‣ ";3FHJPOো֐΁ͷରࡦํ๏͸උ͍͑ͯΔ͜ͱ͕ଟ͍ %JTBTUFS3FDPWFSZରԠ   ͲͪΒ͕࢖͑Δ͔͸ετϨʔδ੡඼࣍ୈ

    .JSSPS ಉظඇಉظ 4UPSBHF" 4UPSBHF# "; "; # $ " # $ " "; "; %BUB/PEF" #` $` " %BUB/PEF# # $`` "` %BUB/PEF$ #`` $ "`` ϛϥʔʹΑΔো֐ରࡦ σʔλϨϓϦέʔγϣϯʹΑΔ෼ࢄ഑ஔ # $ "
  23. 1SPNFUIFVTͷϝτϦΫε؂ࢹ ‣ ετϨʔδͷ7PMVNF͕ͲͷΑ͏ʹίϯςφʹϚ΢ϯτ͞Ε͍ͯΔͷ͔Λཧղ ‣ 17ͷϝτϦΫε͸/PEFͱ֎෦ετϨʔδͷ྆ํ͔Βͷ؂ࢹ͕ϕλʔ  /PEF ετϨʔδ ωοτϫʔΫͷͲ͜ʹϘτϧωοΫ͕͋Δ͔Λ෼ੳ σΟϨΫτϦ

    σόΠε EFWTEC NOUEBUB WBSMJCLVCFMFUQPET1PEͷNFUBEBUBVJEWPMVNFTLVCFSOFUFTJPdDTJ17ͷNFUBEBUBOBNFNPVOU  EFWTEB /PEFFYQPSUFSͷϞχλϦϯάൣғ LVCFMFUͷϞχλϦϯάൣғ D"EWJTPSͷϞχλϦϯάൣғ ֎෦ετϨʔδ ಺ଂσΟεΫ $POUBJOFS <ࢀߟ৘ใετϨʔδؔ࿈ͷϝτϦΫεҰཡ> IUUQTRJJUBDPNZTBLBTIJUBJUFNTDCBCD
  24. 17$17ࢹ఺ͷੑೳ؂ࢹ ‣ 17$ 17ͷ৘ใ͸LVCFTUBUFNFUSJDTͷϝτϦΫε  ੑೳ৘ใ͸ͳ͠ αΠζɺ਺ͳͲ  ‣ ੑೳ৘ใ͸/PEFFYQPSUFS

    D"EWJTPSͷϝτϦΫε  JPTUBU૬౰ͷ৘ใΛऔಘ 49 &MFNFOU 7BMVF kube_persistentvolumeclaim_info{…,namespace=“default”,persistentvolumeclaim=“block-pv- test-0”,storageclass=“standard”,...,volumename="pvc-9639e9ae-de8b-4f24-86f6-72273a74329b"}  ྫ LVCF@QFSTJTUFOUWPMVNFDMBJN@JOGP &MFNFOU 7BMVF node_disk_written_bytes_total{…,device=“sda”,instance=“demo-test-worker-default-efe1dfcc-bn6q7”…}  ྫ OPEF@EJTL@XSJUUFO@CZUFT@UPUBM
  25. 17$ࢹ఺Ͱͷੑೳ؂ࢹͷམͱ݀͠ ‣ (SBGBOB΍1SPNFUIFVTͰ17$໊17໊Ͱੑೳ؂ࢹΛ͍ͨ͠ ‣ ϝτϦΫε͕୯७ʹ࿈݁Ͱ͖ͳ͍  LVCFTUBUFNFUSJDTͷϝτϦΫεͷWPMVNFOBNF͸17໊ͷΈ  /PEFFYQPSUFS D"EWJTPSͷϝτϦΫεͷσόΠε໊͸04Ͱೝࣝͨ͠΋ͷ

    50 &MFNFOU 7BMVF kube_persistentvolumeclaim_info{…,namespace=“default”,persistentvolumeclaim=“block-pv- test-0”,storageclass=“standard”,...,volumename="pvc-9639e9ae-de8b-4f24-86f6-72273a74329b"}  ྫ LVCF@QFSTJTUFOUWPMVNFDMBJN@JOGP &MFNFOU 7BMVF node_disk_written_bytes_total{…,device=“sda”,instance=“demo-netapptest-worker-default-efe1dfcc-bn6q7”, …}  ྫ OPEF@EJTL@XSJUUFO@CZUFT@UPUBM
  26. ղܾҊ ‣ OPEF@pMFTZTUFN@999ͷϝτϦΫεΛؒʹڬΈղܾ  NPVOUQPJOU͔Β17໊ WPMVNFOBNF Λநग़͠࿈݁ 51 &MFNFOU 7BMVF

    kube_persistentvolumeclaim_info{…,namespace=“default”,persistentvolumeclaim=“block-pv- test-0”,storageclass=“standard”,...,volumename="pvc-9639e9ae-de8b-4f24-86f6-72273a74329b"}  ྫ LVCF@QFSTJTUFOUWPMVNFDMBJN@JOGP &MFNFOU 7BMVF node_disk_written_bytes_total{…,device=“sda”,instance=“demo-test-worker-default-efe1dfcc-bn6q7”…}  ྫ OPEF@EJTL@XSJUUFO@CZUFT@UPUBM &MFNFOU 7BMVF node_filesystem_avail_bytes{…,device=“/dev/sda”,fstype=“ext4”,instance="demo-test-worker-default- efe1dfcc-bn6q7",mountpoint="/var/lib/kubelet/pods/d1267489-a972-414a-9b38-987d3a7ea28c/volumes/ kubernetes.io~csi/pvc-9639e9ae-de8b-4f24-86f6-72273a74329b/mount"...}  ྫ OPEF@pMFTZTUFN@BWBJM@CZUFT
  27. ݁Ռ 52 sum(irate(node_disk_read_bytes_total[5m])) by (device, instance) + on(device, instance) group_left

    (persistentvolume, persistentvolumeclaim, namespace) label_replace(label_replace(node_filesystem_size_bytes{mountpoint=~"/var/lib/kubelet/pods/[^/]*/volumes/ kubernetes.io~csi/[^/]*/mount", fstype=~"ext4|xfs"}, "device", "$1", "device", "/dev/(.*)"), "persistentvolume", "$1", "mountpoint", "/var/lib/kubelet/pods/[^/]*/volumes/kubernetes.io~csi/([^/]*)/mount")*0 * on (persistentvolume) group_left (persistentvolumeclaim, namespace) label_replace(kube_persistentvolumeclaim_info, "persistentvolume", "$1", "volumename", "(.+)") ྫΫΤϦʔ
  28. Ϛϧνύε-7.Ͱͷམͱ݀͠ ‣ Ϛϧνύε΍-7.Ͱ͸σόΠε໊͕ஔ͖׵͑ΒΕΔͨΊ࿈݁Ͱ͖ͳ͍ ઌఔͷྫ͸γϯάϧύεͷΈ༗ޮ 54 &MFNFOU 7BMVF kube_persistentvolumeclaim_info{…,namespace=“default”,persistentvolumeclaim=“block-pv- test-0”,storageclass=“standard”,...,volumename="pvc-fdcf278e-7ba0-44da-831b-2092ffcb2589"} 

    ྫ LVCF@QFSTJTUFOUWPMVNFDMBJN@JOGP &MFNFOU 7BMVF node_disk_written_bytes_total{…,device=“dm-0”,instance=“demo-test-worker-default-efe1dfcc-bn6q7”…}  ྫ OPEF@EJTL@XSJUUFO@CZUFT@UPUBM &MFNFOU 7BMVF node_filesystem_avail_bytes{…,device=“”/dev/mapper/mpatha”,fstype=“ext4”,instance="demo-test-worker- default-efe1dfcc-bn6q7",mountpoint="/var/lib/kubelet/pods/d1267489-a972-414a-9b38-987a407bb12f/ volumes/kubernetes.io~csi/pvc-fdcf278e-7ba0-44da-831b-2092ffcb2589/mount"...}  ྫ OPEF@pMFTZTUFN@BWBJM@CZUFT 54
  29. ղܾҊ ‣ OPEF@FYQPSUFSͷ*TTVFΛௐࠪˠະղܾ  IUUQTHJUIVCDPNQSPNFUIFVTOPEF@FYQPSUFSJTTVFT ‣ /PEFFYQPSUFSͷUFYUpMFDPMMFDUPSΛ։ൃ 55 # HELP

    x_node_mountpoints_info Information about mountpoint in node # TYPE x_node_mountpoints_info gauge x_node_mountpoints_info{mountpoint="/", devname="/dev/vda1", device="vda1", fstype="ext4"} 1 x_node_mountpoints_info{mountpoint="/var/lib/kubelet", devname="/dev/vda1", device="vda1", fstype="ext4"} 1 x_node_mountpoints_info{mountpoint="/var/lib/kubelet/pods/d1267489-a972-414a-9b38-987d3a7ea28c/volumes/ kubernetes.io~csi/pvc-9639e9ae-de8b-4f24-86f6-72273a74329b/mount", devname="/dev/mapper/mpatha", device=“dm-0", fstype="ext4"} 1 ։ൃͨ͠textfile collectorͷग़ྗྫ
  30. ݁Ռ 56 sum(irate(node_disk_written_bytes_total[5m])) by (device, instance) + on (device, instance)

    group_left (volumename, persistentvolumeclaim, namespace) label_replace(node_filesystem_avail_bytes{fstype=~"ext4|xfs"}, "volumename", "$1", "mountpoint", "/var/lib/ kubelet/pods/[^/]*/volumes/kubernetes.io~csi/([^/]*)/mount") * 0 * on(mountpoint, instance) group_left(device, persistentvolumeclaim, namespace) x_node_mountpoints_info{fstype=~"ext4|xfs"} * on (volumename) group_left (persistentvolumeclaim, namespace) kube_persistentvolumeclaim_info ྫΫΤϦʔ
  31. ·ͱΊ ‣ Ϣʔβ޲͚ʹҰาਐΜͩ17ͷ࢖͍ํΛ঺հ  7PMVNF&YQBOTJPO  7PMVNF4OBQTIPU  7PMVNF$MPOJOH ‣

    ؅ཧऀ޲͚ʹҰาਐΜͩ17Λࢧ͑Δ؀ڥߏஙʹ͍ͭͯ঺հ  5PQPMPHZ  .POJUPSJOH 57