linux根分区扩容

今天网站上传图片出问题了,一开始还以为是程序问题,后来发现原来是服务器存储空间不够,明明有200G的磁盘空间,没理由这么快就用完,查了一下分区情况,原来有两块磁盘,根分区只挂载在大少只有10g那块磁盘上面,而且已使用了100%了!接着就要为根分区扩容了:(环境:redhat 5.2 x64)

1:查看分区情况

shell>fdisk -l

Disk /dev/sda doesn’t contain a valid partition table, 这句说明了190g的磁盘没分区

2:磁盘分区

shell>fdisk /dev/sda  (过程略,这里只建了一个分区)

3:再查看一下分区

shell>fdisk -l

可以看出第2步已经建了一个分区/dev/sda1

4:创建pv

shell>pvcreate /dev/sda1

5:查看一下当前卷组情况

shell>vgdisplay

这里Free PE / Size 0/0 表明没有可用的扩展空间

6:扩展卷组VolGroup00

shell>vgextend /dev/VolGroup00 /dev/sda1

7:再查看卷组

shell>vgdispaly

看看Free PE / Size 5692 / 177.88GB 说明扩展成功,有177.88GB可用

8:扩展逻辑卷LogVol00的容量(根目录”/”的挂载点)

shell>lvextend -L +1024M /dev/VolGroup00/LogVol00

shell>/sbin/resize2fs /dev/VolGroup00/LogVol00

9:扩容后的分区情况

根分区多了一个G,成功了!

对于剩下的176G的空间可用于以后的磁盘扩展使用。

转自:http://www.cnblogs.com/nicholas_f/archive/2011/01/22/1942134.html

28 thoughts on “linux根分区扩容

  1. Pingback: linux下 lvm 磁盘扩容 | haohtml's blog

  2. Pingback: Accountant in Jersey City NJ

  3. Pingback: forum

  4. Pingback: blog

  5. Pingback: daftar sbobet888

  6. Pingback: bitcoin qr code generator

  7. Pingback: CBD Oil for Dogs

  8. Pingback: i99 casino

  9. Pingback: 안전놀이터

  10. Pingback: 바카라사이트

  11. Pingback: 안전바카라

  12. Pingback: 조커온라인카지노

  13. Pingback: Situs Judi Online Terpercaya

  14. Pingback: https://zazyle.pl/

  15. Pingback: fake Breitling Watches Cockpit

  16. Pingback: Memes 2020

  17. Pingback: how to fake your id

  18. Pingback: 1 replica rolex

  19. Pingback: Online Shopping

  20. Pingback: situs judi slot

  21. Pingback: http://199.192.25.249/

  22. Pingback: porno izle

  23. Pingback: https://zssokolka.pl/

  24. Pingback: get likes on instagram app

  25. Pingback: press release distribution of press release

  26. Pingback: prediksi togel

  27. Pingback: replica watches

  28. Pingback: medical marijuana for sale

Comments are closed.