今天客戶的数据盘被log日志占满了,没办法推荐了客户去在线升级云盘,结果…升级成功了,尴尬的是宝塔未同步,可是云磁盘已经显示了扩容后的容量,当时尴尬万分,于是抓紧时间找解决方案…站壳网的技术柠檬搜索了好久终于找到方法,亲测可用. 注意:此方法虽然是无损扩容,但是建议操作前还是创建磁盘快照,数据无价!
环境介绍:
服务商:阿里云
系统:CenterOs 7.4 64位
教程开始:
在操作硬盘扩容前,为了安全起见,请通过磁盘快照功能备份服务器系统盘与数据盘;
然后在确保数据安全的情况下操作;
1、首先第一步停止宝塔的所有服务
2、使用SSH远程连接到服务器,或者远程连接.
3、运行 umount [文件系统名称] 命令卸载主分区
注意事项:这里操作的时候如果出现报错,先关闭swap分区跟卸载主机监控以及停止宝塔相关服务
(1)关闭swap分区:
swapoff -a
(2)卸载主机监控(部分主机商有):
/usr/local/cloudmonitor/wrapper/bin/cloudmonitor.sh remove && \ rm -rf /usr/local/cloudmonitor
(3)解除占用(把占用 /dev/vdb1 的进程杀死):
fuser -m -k /dev/vdb1
(4)卸载主分区:
umount /dev/vdb1
使用 df -h 查看是否卸载成功,如果看不到 /dev/vdb1 的信息表示卸载成功。
以下为示例输出结果:
3、使用 fdisk 命令删除原来的分区并创建新分区:
(1)运行命令 fdisk -l 罗列分区信息并记录扩容前数据盘的最终容量、起始扇区(First sector)位置
(2)运行命令 fdisk [数据盘设备名] 进入 fdisk 界面
本示例中,命令为 fdisk /dev/vdb
1.输入 d 并按回车键,删除原来的分区(删除分区不会造成数据盘内数据的丢失)
2.输入 n 并按回车键,开始创建新的分区
3.输入 p 并按回车键,选择创建主分区
4.输入分区编号并按回车键,这里仅创建一个分区,所以输入 1
5.输入最后一个扇区编号:因为这里仅创建一个分区,所以按回车键采用默认值
6.输入 wq 并按回车键,开始保存之前对分区的操作
磁盘分区操作示例图:
4、检查文件系统,并变更文件系统大小
(1)检查文件系统
e2fsck -f /dev/vdb1
(2)变更文件系统大小
resize2fs /dev/vdb1
使用 e2fsck 时,由于系统需要检查并修正文件系统元数据,所以速度较慢、耗时较长,请耐心等待。
正确使用 e2fsck 和 resize2fs 指令,不会造成原有数据的丢失。
5、将扩容完成的文件系统挂载到原来的挂载点(如本示例中的 /www)
mount /dev/vdb1 /www
6、查看磁盘空间和使用情况:运行命令 df -h
如果出现扩容后的文件系统信息,说明挂载成功,就可以使用扩容后的文件系统了。
重新启动服务器让全部环境和进程恢复启动。
2、分享目的仅供大家学习和交流,请不要用于商业用途!
3、本站提供的源码、模板、插件等等其他资源,都不包含技术服务请大家谅解!
4、如有链接无法下载、失效或广告,请联系管理员处理!
5、本站资源售价只是赞助,收取费用仅维持本站的日常运营所需!
6、联系微信:A2022717!
袁博客 » 宝塔面板云磁盘无损扩容教程扩容磁盘宝塔面板未同步如何解决?
常见问题FAQ
- 免费下载或者VIP会员专享资源能否直接商用?
- 本站所有资源版权均属于原作者所有,这里所提供资源均只能用于参考学习用,请勿直接商用。若由于商用引起版权纠纷,一切责任均由使用者承担。更多说明请参考 VIP介绍。
- 提示下载完但解压或打开不了?
- 你们有qq群吗怎么加入?
buy sildenafil pills sildenafil 100mg us order tadalafil 5mg pill
buy prednisone 10mg online cheap prednisone cost amoxil generic
sildenafil 25 mg sildalis without prescription purchase lamotrigine pill
where can i buy an essay stromectol 3mg canada stromectol 3mg online
order trazodone generic order desyrel 100mg generic buy aurogra 50mg online cheap
real casino slots cialis pills 5mg cialis 10mg usa
ceftin 250mg without prescription methocarbamol order buy robaxin 500mg without prescription
female viagra cvs viagra sildenafil buy cialis generic
buy tadalafil 5mg pills sildenafil pills 200mg purchase sildenafil without prescription
order cephalexin 500mg cleocin 150mg sale erythromycin 250mg pill
buy fluconazole 200mg online cheap sildenafil sildenafil 100mg
buy metronidazole 400mg sale flagyl over the counter sulfamethoxazole price
zocor 10mg generic brand zocor 20mg propecia oral
buy cialis canada buy ampicillin generic buy ciprofloxacin 1000mg for sale
tamsulosin 0.2mg for sale aldactone 100mg without prescription spironolactone generic
best online casino online card games real money casino
ranitidine without prescription celebrex 200mg canada generic celebrex 200mg
colchicine 0.5mg canada poker online games best casino slot games
buy sumatriptan generic buy levaquin 250mg pills avodart brand
order baclofen pill baclofen 25mg over the counter toradol price
order generic cozaar 50mg topiramate 200mg price order topamax for sale
domperidone 10mg drug buy cyclobenzaprine for sale flexeril tablet
cost methotrexate 2.5mg cheap reglan 10mg purchase reglan for sale
order allopurinol 100mg generic oral allopurinol 100mg order ezetimibe 10mg
cialis mail order usa inderal brand clopidogrel online buy
buy cialis 5mg pills inderal 10mg canada plavix for sale online
cheap xenical 60mg buy orlistat online cheap buy acyclovir 800mg online
tadalafil 20mg for sale cheap viagra generic sildenafil 50mg brand
generic triamcinolone 10mg clarinex cost order clarinex generic
cialis 5mg oral tadalafil 5mg uk 50mg viagra
clomiphene order online blackjack online us real casino
buying essays college paper help viagra fast shipping
editing essays poker game play blackjack online
metoprolol 100mg price order metoprolol 50mg buy generic levitra
omeprazole 20mg generic real money casino online gambling sites
order clozaril for sale buy clozaril 100mg generic dexamethasone 0,0,5 mg canada
buy norvasc 10mg generic amlodipine 5mg brand how to get cialis
buy olanzapine 10mg online zyprexa 10mg us diovan 80mg usa
purchase glucophage generic order glucophage generic cialis generic name
order itraconazole 100mg generic buy tinidazole 300mg pills buy tinidazole without prescription
buy chloroquine sale cenforce 50mg brand order baricitinib 4mg online
over the counter cialis tadalafil 5mg pills anafranil over the counter
purchase lasix generic lasix buy online plaquenil 400mg pills
tadalafil 10mg generic tadalafil 5mg pill guaranteed viagra overnight delivery usa
nootropil over the counter order nootropil online sildenafil 50mg tablets
isotretinoin price prednisone 10mg over the counter buy deltasone 40mg without prescription
buy luvox 100mg duloxetine 40mg for sale order glipizide sale
order modafinil 200mg sale most reliable canadian online pharmacy stromectol pills
medroxyprogesterone cheap periactin 4mg for sale purchase periactin for sale
avlosulfon 100 mg pill purchase nifedipine pill buy perindopril 4mg online
buy naltrexone 50 mg generic buy generic naltrexone order aripiprazole 30mg sale
cialis pills 10mg order pyridium generic buy amantadine 100 mg pill
order generic tadalafil 40mg Cialis overnight shipping order sildenafil for sale
cheap imuran 100mcg imuran 100 mcg ca viagra 100mg us
sertraline 50mg pill kamagra 200mg over the counter real viagra pharmacy prescription
molnupiravir 200 mg us buy prevacid online buy prevacid 15mg sale
zyban 150 mg cost order zyrtec 5mg for sale seroquel price
imdur 40mg pill azathioprine 25mg usa micardis over the counter
buy tacrolimus online cheap urso uk urso 300mg pill
olmesartan 10mg us cost diamox diamox 250 mg price
alendronate pill order paracetamol 500 mg famotidine usa
hytrin online order hytrin 5mg ca order sulfasalazine without prescription
buspirone 5mg price phenytoin 100mg pill ditropan 5mg canada
clonidine 0.1mg without prescription minocin over the counter order spiriva online
altace pills avapro 150mg tablet order astelin 10ml sale
buy doxycycline generic doxycycline 200mg for sale furosemide 100mg without prescription
buy modafinil pills acetazolamide 250mg without prescription order diamox generic
purchase accutane pill generic zithromax 500mg buy oral ivermectin
anastrozole online Lowest price for viagra brand viagra 100mg
tadalafil 40mg brand cialis black purchase viagra
indomethacin 50mg tablet amoxicillin uk amoxicillin oral
order accutane 10mg sale buy amoxicillin 1000mg pill order zithromax sale
tadalafil 10mg canada tadalafil 10mg cheap order voltaren without prescription
cheap lamotrigine lamotrigine pill tretinoin order online
generic sildenafil viagra sildenafil 50mg estradiol 1mg without prescription
order sildenafil 100mg generic order bimatoprost sale methocarbamol 500mg without prescription
buy generic ampicillin 500mg cephalexin 500mg generic erythromycin 250mg without prescription
buy aldactone without prescription purchase diflucan generic fluconazole 100mg cost
buy avodart pill buy avodart online ondansetron 8mg canada
buy generic levaquin levofloxacin usa