Dynamic expansion of LV in Linux system

Source: Internet
Author: User

LV expansion in Linux systems


Server: 192.168.26.209

Expansion Data disk: The original server storage configuration information

Df-h

650) this.width=650; "height=" 248 "src=" http://a1.qpic.cn/psb?/594581eb-e62e-4426-a878-953c87dd5729/dhxpoamm111.* hqssvxxskjavoj*bwml1ztlhrawjfa!/b/dmgaaaaaaaaa&ek=1&kp=1&pt=0&bo=fal5aaaaaaadamo!&su= 0222040449&tm=1481871600&sce=0-12-12&rf=2-9 "width=" 531 "style=" margin:0px;padding:0px;border-width : 0px;border-style:none;vertical-align:top; "alt=" Dmgaaaaaaaaa&ek=1&kp=1&pt=0&bo=fal5aaaaa "/>

Df–h

650) this.width=650; "height=" 335 "src=" http://a3.qpic.cn/psb?/594581eb-e62e-4426-a878-953c87dd5729/ o6s7l6ehncft5bvupbqtgaptsk1i83oubrvf8hx2ifg!/b/dgybaaaaaaaa&ek=1&kp=1&pt=0&bo=kgjqaqaaaaadafw! &su=0252865041&tm=1481871600&sce=0-12-12&rf=2-9 "width=" 553 "style=" margin:0px;padding:0px; border-width:0px;border-style:none;vertical-align:top; "Alt=" dgybaaaaaaaa&ek=1&kp=1&pt=0&bo= Kgjqaqaaa "/>

650) this.width=650; "height=" 268 "src=" http://a3.qpic.cn/psb?/594581eb-e62e-4426-a878-953c87dd5729/ 7pqblomaduevtmyke4j2tlig50wtm9ws85t*c1i5fia!/b/dgybaaaaaaaa&ek=1&kp=1&pt=0&bo=jainaqaaaaadaa8! &su=0228247233&tm=1481871600&sce=0-12-12&rf=2-9 "width=" 547 "style=" margin:0px;padding:0px; border-width:0px;border-style:none;vertical-align:top; "Alt=" dgybaaaaaaaa&ek=1&kp=1&pt=0&bo= Jainaqaaa "/>

Add a hard drive, 20G expansion

650) this.width=650; "height=" 247 "src=" http://a1.qpic.cn/psb?/594581eb-e62e-4426-a878-953c87dd5729/ ubrfpyy2v2zob3rlbpvjv3relyocs1nkcsvco1oh20k!/b/dmgaaaaaaaaa&ek=1&kp=1&pt=0&bo=kgl4aaaaaaadapu! &su=0239829281&tm=1481871600&sce=0-12-12&rf=2-9 "width=" 553 "style=" margin:0px;padding:0px; border-width:0px;border-style:none;vertical-align:top; "Alt=" dmgaaaaaaaaa&ek=1&kp=1&pt=0&bo= Kgl4aaaaa "/>

Start the server and the system has identified the new hard drive device.

650) this.width=650; "height=" 246 "src=" http://a4.qpic.cn/psb?/594581eb-e62e-4426-a878-953c87dd5729/ ud8giebatx02wytpgtwgnbzrkd8hyzloo7huxxakc3k!/b/dgcbaaaaaaaa&ek=1&kp=1&pt=0&bo=4qh3aaaaaaadadi! &su=094738209&tm=1481871600&sce=0-12-12&rf=2-9 "width=" 480 "style=" margin:0px;padding:0px; border-width:0px;border-style:none;vertical-align:top; "Alt=" dgcbaaaaaaaa&ek=1&kp=1&pt=0&bo= 4qh3aaaaa "/>

Create PV:

[Email protected] ~]# PVCREATE/DEV/SDC

[Email protected] ~]# PVs

650) this.width=650; "height=" 178 "src=" http://a4.qpic.cn/psb?/594581eb-e62e-4426-a878-953c87dd5729/ pdbzwns5upzvn993knst4mrwiucte2zwtf5jdkdfudm!/b/dgcbaaaaaaaa&ek=1&kp=1&pt=0&bo=vggzaaaaaaadack! &su=053420353&tm=1481871600&sce=0-12-12&rf=2-9 "width=" 445 "style=" margin:0px;padding:0px; border-width:0px;border-style:none;vertical-align:top; "Alt=" dgcbaaaaaaaa&ek=1&kp=1&pt=0&bo= Vggzaaaaa "/>

Expand VG First:

[Email protected] ~]# vgextend VG_CENTOS/DEV/SDC

[Email protected] ~]# PVs

650) this.width=650; "height=" 121 "src=" http://a3.qpic.cn/psb?/594581eb-e62e-4426-a878-953c87dd5729/* md6gztiut3gjrwykkxck0n1fpaalenaubfxmcg0.om!/b/dgybaaaaaaaa&ek=1&kp=1&pt=0&bo=ewf6aaaaaaadacu! &su=0177641969&tm=1481871600&sce=0-12-12&rf=2-9 "width=" 378 "style=" margin:0px;padding:0px; border-width:0px;border-style:none;vertical-align:top; "Alt=" dgybaaaaaaaa&ek=1&kp=1&pt=0&bo= Ewf6aaaaa "/>

Re-expand LV: (Data directory)

[Email protected] ~]# lvextend-l +19.9g/dev/vg_centos/lv_data

Rounding size to boundary between physical extents:19.90 GiB

Extending logical Volume Lv_data to 39.90 GiB

Logical Volume Lv_data successfully resized

650) this.width=650; "height=" 192 "src=" http://a3.qpic.cn/psb?/594581eb-e62e-4426-a878-953c87dd5729/ sugyvnf8wwwpvf5hy7oqkzqftsjuced7*kavnncvhcc!/b/dgybaaaaaaaa&ek=1&kp=1&pt=0&bo=jalbaaaaaaadami! &su=04282689&tm=1481871600&sce=0-12-12&rf=2-9 "width=" 547 "style=" margin:0px;padding:0px; border-width:0px;border-style:none;vertical-align:top; "Alt=" dgybaaaaaaaa&ek=1&kp=1&pt=0&bo= Jalbaaaaa "/>

At this point we look at the directory capacity, the data directory capacity has not changed

650) this.width=650; "height=" 224 "src=" http://a1.qpic.cn/psb?/594581eb-e62e-4426-a878-953c87dd5729/x1amdytrotk* lnr4fwtnowplh1q4x5.xtizuwmpuxvg!/b/daqbaaaaaaaa&ek=1&kp=1&pt=0&bo=kglhaaaaaaadaow!&su= 0206126929&tm=1481871600&sce=0-12-12&rf=2-9 "width=" 553 "style=" margin:0px;padding:0px;border-width : 0px;border-style:none;vertical-align:top; "alt=" Daqbaaaaaaaa&ek=1&kp=1&pt=0&bo=kglhaaaaa "/>

View data is also in:

650) this.width=650; "height=" 201 "src=" Http://a4.qpic.cn/psb?/594581eb-e62e-4426-a878-953c87dd5729/Unb10rdUpAxwo *nzkc5eiakmytdtfgx4tc3ngfgzzz0!/b/dmcaaaaaaaaa&ek=1&kp=1&pt=0&bo=kglkaaaaaaadamc!&su= 0107138033&tm=1481871600&sce=0-12-12&rf=2-9 "width=" 553 "style=" margin:0px;padding:0px;border-width : 0px;border-style:none;vertical-align:top; "alt=" Dmcaaaaaaaaa&ek=1&kp=1&pt=0&bo=kglkaaaaa "/>

To perform a file system detection command:

Resize2fs/dev/vg_centos/lv_data

650) this.width=650; "height=" 186 "src=" http://a3.qpic.cn/psb?/594581eb-e62e-4426-a878-953c87dd5729/hli8v33s* tqq9jstb8wuwyhzxr8o2p7nk1ys4aw3jaa!/b/dgybaaaaaaaa&ek=1&kp=1&pt=0&bo=kgk7aaaaaaadaly!&su= 02110945&tm=1481871600&sce=0-12-12&rf=2-9 "width=" 553 "style=" margin:0px;padding:0px;border-width:0 px;border-style:none;vertical-align:top; "alt=" Dgybaaaaaaaa&ek=1&kp=1&pt=0&bo=kgk7aaaaa "/>

To view the directory capacity again:

650) this.width=650; "height=" 334 "src=" http://a4.qpic.cn/psb?/594581eb-e62e-4426-a878-953c87dd5729/ 4jrq3kc7mpi1sidbijeikokuc0vhl9ns7*smkbz*0s4!/b/dgcbaaaaaaaa&ek=1&kp=1&pt=0&bo=kgjpaqaaaaadaem! &su=0106335953&tm=1481871600&sce=0-12-12&rf=2-9 "width=" 553 "style=" margin:0px;padding:0px; border-width:0px;border-style:none;vertical-align:top; "Alt=" dgcbaaaaaaaa&ek=1&kp=1&pt=0&bo= Kgjpaqaaa "/>

View data:

650) this.width=650; "height=" 142 "src=" http://a3.qpic.cn/psb?/594581eb-e62e-4426-a878-953c87dd5729/ 61c8ww1b5frttowlremiknfeufroktvpshqgvft3rfo!/b/dgybaaaaaaaa&ek=1&kp=1&pt=0&bo=kgkpaaaaaaadaii! &su=076483137&tm=1481871600&sce=0-12-12&rf=2-9 "width=" 553 "style=" margin:0px;padding:0px; border-width:0px;border-style:none;vertical-align:top; "Alt=" dgybaaaaaaaa&ek=1&kp=1&pt=0&bo= Kgkpaaaaa "/>


This article is from the "on the Road" blog, please be sure to keep this source http://jdonghong.blog.51cto.com/3473478/1883363

Dynamic expansion of LV in Linux system

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.