问: CentOS6.5 VPS 上新增了分区,如何给现有的网站目录进行扩容或者迁移? - V2EX
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
viptot
V2EX    Linux

问: CentOS6.5 VPS 上新增了分区,如何给现有的网站目录进行扩容或者迁移?

  •  
  •   viptot Mar 16, 2019 1870 views
    This topic created in 2614 days ago, the information mentioned may be changed or developed.

    今日突然发现 vps 硬盘爆满了,然后才想着要买点容量进行扩容,经检查才发现原来有个分区没用上,坑啊,这服务商,干嘛不全给我加到主盘里面去,非得留一个空的分区给我,然后就想着怎么把它追加到主盘上,查了好久没找到可以实现的方法,大家帮我看看

    [root@MyCloudServer ~]# fdisk -l Disk /dev/xvda: 10.7 GB, 10737418240 bytes 255 heads, 63 sectors/track, 1305 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x000858c5 Device Boot Start End Blocks Id System /dev/xvda1 * 1 64 512000 83 Linux Partition 1 does not end on cylinder boundary. /dev/xvda2 64 1306 9972736 8e Linux LVM Disk /dev/xvdb: 21.5 GB, 21474836480 bytes 255 heads, 63 sectors/track, 2610 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x0006cde7 Device Boot Start End Blocks Id System Disk /dev/mapper/vg_have-lv_root: 9168 MB, 9168748544 bytes 255 heads, 63 sectors/track, 1114 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 Disk /dev/mapper/vg_have-lv_swap: 1040 MB, 1040187392 bytes 255 heads, 63 sectors/track, 126 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000 [root@MyCloudServer ~]# 

    我的环境和网站目录都是在主盘 /dev/xvda 的 /www 里面 我想要实现的是 使用 /dev/xvdb 对 /www 进行扩容,如果不能实现那就想要把 /www 转移到 /dev/xvdb 上面去,但是同时想要保证环境与网站能正常运作

    willis
        1
    willis  
       Mar 16, 2019 via iPhone    /> 1</span> <div class=
    有用 lvm,只有 root 和 swap,扩容直接加到 root 上就行了
    viptot
        2
    viptot  
    OP
       Mar 17, 2019
    @willis 感谢提供思路,参考 https://www.cnblogs.com/jackruicao/p/6258820.html 实现了扩容
    About     Help     Advertise     Blog     API     FAQ     Solana     3524 Online   Highest 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 30ms UTC 11:57 PVG 19:57 LAX 04:57 JFK 07:57
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86