Linux VPS挂载硬盘教程

今天就把Linux VPS挂载ext的方法补上。操作起来挂载为ext更加简单方便。

1.查看磁盘分区状况,

fdisk -l
Linux VPS挂载硬盘教程

2.对未使用的磁盘空间进行分区。

fdisk /dev/xvdb

3.输入命令后,屏幕会提示输入指令:

Command (m for help): n  /*建立新分区*/Command action   e   extended   p   primary partition (1-4)p  /*选择类型为主分区*/Partition number (1-4): 1   /*分区号,此处/dev/xvdb尚未分区,可以选择1*/First cylinder (1-6527, default 1): /*默认回车*/Using default value 1Last cylinder or +size or +sizeM or +sizeK (1-6527,default 6527): /*默认回车*/Using default value 6527 Command (m for help): t  /*指定分区格式*/Selected partition 1Hex code (type L to list codes): 83  /*83为ext格式*/Changed system type of partition 1 to 8e (Linux LVM) Command (m for help): w  /*保存更改*/The partition table has been altered!
Linux VPS挂载硬盘教程

4.更改完成,输入reboot重启。

reboot
Linux VPS挂载硬盘教程

5.重启后格式化/dev/xvdb1

mkfs.ext3 /dev/xvdb1
Linux VPS挂载硬盘教程

6.挂载到指定目录,一般是挂在到/home下,如果安装wdcp的话,可能需要挂载到/www下

mount /dev/xvdb1 /www
Linux VPS挂载硬盘教程

7.用df -hal查看是否正确挂载

Linux VPS挂载硬盘教程

8.写入/etc/fstab

echo “/dev/xvdb1 /home ext3 defaults 1 3” >> /etc/fstab
Linux VPS挂载硬盘教程

挂载完毕,如果有必要检查,可以使用vi /etc/fstab查看是否有第八步操作的内容,另外,可以重启VPS,再用df -hal查看是否有正常的挂载分区。

此文章来自固定链接:http://www.rakbuluo.com/p82/

原文链接:,转发请注明来源!

发表评论

要发表评论,您必须先登录

  • 29 Responses to “Linux VPS挂载硬盘教程”
    • EdwardPhymn

      prescription drugs without a doctor <a href=" https://genericwdp.com/# ">best online international pharmacies india</a>
      medications without a doctor's prescription

    • Fjjuprest

      generic viagra cost <a href="http://viagraonlinejc.com/ ">http://viagraonlinejc.com/ </a> taking viagra without ed

    • Nbnhprest

      cheap viagra online <a href="https://vigedon.com/ ">http://vigedon.com/ </a> can you order viagra online in canada

    • AhbzAniny

      payday loan hoffman estates <a href="http://daymoneygo.com/ ">payday loan oceanside</a> i need a payday advance

    • Kvaxboop

      12 month payday loans no fees <a href="http://rirocash.com/ ">quickbooks payroll cash advance</a> payday loan arizona

    • best weed strains for watching the walking dead

      Mend the pen only after the sheep are all gone.

    • CharlesHob

      how to use tinder , tinder login
      <a href=http://tinderdatingsiteus.com/?>tinder app </a>

    • KbbfIdovE

      free viagra trials <a href="http://kloviagrli.com/ ">http://kloviagrli.com/ </a> viagra vs cialis side effects

    • JbbnAniny

      buy cialis 36 hour <a href="http://ljcialishe.com/ ">can you use cialis when trying to conceive</a> indicaciones para tomar cialis

    • Abcfbopinnots

      canada pharmacy viagra generic <a href="https://viagriyvik.com/ ">generic viagra usa canada </a> buy viagra us

    • Fbsgprest

      cialis buy on line <a href="http://llecialisjaw.com/ ">super cialis best price </a> cialis tadalafil online paypal

    • Jbnvblafe

      payday loan gulfport mississippi <a href="http://samcash21.com/ ">low interest payday loans canada</a> texas car title and payday loans converse tx

    • LabxAniny

      differences entre viagra and cialis <a href="https://jecialisbn.com/ ">unde gasesc cialis</a> vendita cialis generico on line

    • FqbbAniny

      payday loan california maximum <a href="http://ascashapply.com/ ">how to get loan from money shop</a> how to avoid paying payday loans

    • Nncsprest

      overnight cheap viagra <a href="http://lightvigra.com/ ">buy viagra online</a> viagra gold bestellen

    • AhkdAniny

      mexican pharmacy online medications <a href="http://storerxpharmcanada.com/ ">eye drop</a> online prescription drugs

    • Kbcxboop

      antibiotics <a href="http://xuypharmacyonline.com/">international pharmacies that ship to the usa</a> general health

    • KuikIdovE

      generic viagra using master card <a href="http://viagerkr.com/ ">365 pills mobi catalog viagra</a> buy viagra on line?

    • JbbvAniny

      canada prescription plus pharmacy <a href="http://canadianpharmnorx.com/ ">no prior prescription required pharmacy</a> canada drug prices

    • Aqcfbopinnots

      cialis grapefruit interaction <a href="http://cialisvja.com/ ">original cialis online</a> cheap cialis by post

    • Jbnbblafe

      canadian drugstore reviews <a href="http://online21rxon.com/ ">canada pharmacy online orders</a> rx price comparison

    • Fvfcprest

      generic viagra 100mg <a href="http://hopeviagrin.com/ ">viagra online pay with paypal</a> getting viagra in new york

    • LbsxAniny

      online medicine to buy <a href="https://ssviagriia.com/ ">viagra tijuana mx</a> drugs from canada with prescription

    • FqhhAniny

      online pharmacies uk <a href="http://happyrxpharmacy21.com/ ">canada drugs online pharmacy</a> medical pharmacies

    • CharlesHob

      tinder website , tinder dating app
      <a href=http://tinderdatingsiteus.com/?>how to use tinder </a>

    • LbgAniny

      buy viagra japan <a href="http://genqpviag.com/#">tesco online viagra</a> viagra online http://genqpviag.com/ - indo viagral ’

    • Tinder dating site

      tinder app , what is tinder
      <a href=http://tinderdatingsiteus.com/?>tinder date </a>

    • JdbxAniny

      cheap generic viagra 50mg <a href="http://llviabest.com/#">viagra overnight no prescription</a> cialis viagra levitra young yahoo http://llviabest.com/ - buy viagra with discover card ’

    • Stephenpeaky

      otc viagra <a href=" http://sild100fast.com/# ">viagra for sale</a> viagra professional