欢迎访问2017年洛阳SEO牛广的官方博客,只要标题有亲测有效的都是原创文章。为大家提供最新真实有效的案例,承接网站SEO百度优化业务QQ:939380096

linux服务器硬盘挂载自启动命令方法–亲测有效

Linux niuguang 5145次浏览 94个评论

linux服务器硬盘挂载自启动命令方法–亲测有效

  洛阳SEO牛广 最近打算做几个分类目录的网站,把网站的文件放在系统盘不太好,

 比如系统崩溃掉没有办法进行备份操作,就在腾讯云购买了一块新linux服务器新的10G硬盘。腾讯云硬盘

 这篇文章写给自己做好笔记日后自己在用到了看一下,有需要帮助的朋友。也可以当作参考。

 

 

第一步  连接linux  查询Linux主机有几个硬盘

使用命令  

fdisk -l  注释: fdisk是硬盘 -l 是list缩写

请看下图中  红色框是linux系统的20G系统盘 黄色是洛阳SEO牛广购买后的10G数据盘,

Linux服务器硬盘

声明一下 我这个盘符的名字是 /dev/vdb     请在第二步硬盘分区的时候看清楚 你的硬盘是什么名字

 

第二步  对新挂载硬盘进行分期操作

我的硬盘名字 是/dev/sdb  请根据你自己的硬盘名字进行操作  

使用命令

  fdisk /dev/sdb    注释:fdisk 代表硬盘   /dev/sdb 代表硬盘的路径名称

linux操作硬盘分区

   输入分区后 显示fdisk的菜单界面  我们接着操作 

使用命令

N          注释: N 表示add a new partition  添加一个新的分区

linux服务器硬盘分区

  然后显示一下信息

 

Linux腾讯云服务器

使用命令

P          注释: 上图中 e 代表逻辑分期  p 代表主分区

然后显示一下信息

linux服务器硬盘分区

使用命令

1         注释: 上图中意思问你这个分区是第几分区 我们是新盘 选择 1

然后显示一下信息

linux服务器操作

使用命令

1         注释: 选择该分区的起始磁盘数 默认回车 或者 按1 就好了

  然后显示一下信息

Linux腾讯云服务器

这里是让你选择你自己硬盘分配的大小,默认是全部存储额,你也可以选择自己的大小  列如10G 命令格式是  +10G 回车就行了。

我们这里选择默认全部大小

使用命令

回车       注释:我们这里选择默认全部大小

  然后显示一下信息

Linux腾讯云服务器

使用命令

W       注释:w写入分区

  linux服务器硬盘分区

    分区到此结束 我们进行第三步硬盘格式化

第三步  对新挂载硬盘进行格式化操作

 使用命令  查询刚刚分区硬盘

fdisk -l  注释: fdisk是硬盘 -l 是list缩写

linux服务器硬盘分区

 使用命令   主要看好 你的硬盘是什么名字 在/dev/你的硬盘名字 我的是 vdb1

mkfs -t ext3 -c /dev/vdb1   注释: 进行格式化  

linux服务器操作

第四步  进行挂载

我使用的宝塔linux服务器管理软件 默认网站目录是/www

先创建一个www目录

 使用命令  

mkdir /www  注释:mkdir 创建网站根目录

 Linux腾讯云服务器

进行挂载 我们把我们的硬盘挂载到www目录下 

使用命令  

mount /dev/vdb1 /www  注释:mount 是挂载的意思 选择你要挂载的硬盘

Linux腾讯云服务器

第四步 设置开机自动挂载

使用命令    注意自己的硬盘路径和目录名称 /dev/硬盘名字  /目录名字

echo '/dev/vdb1 /www ext3 defaults 0 0' >> /etc/fstab 注释:重启自启动挂载

linux服务器操作

到这里linux服务器硬盘挂载自启动命令方法 就结束了 我们来测试一下。

使用命令    

df -h   注释:查看Linux服务器启动项目

linux服务器操作

可以看到我们的数据盘已经在启动项目里面了。

下图是洛阳SEO牛广安装宝塔Linux管理面板的图片 , 后台已经看到我们刚刚挂载的盘符了和文件夹了

如果您不知道如何搭建Linux服务器环境的话 请参考

网站Linux服务器LAMP环境配置图形界面方法教程–亲测有效 文章。

宝塔WWW

以上内容是有洛阳SEO牛广提供 http://www.xiaoguangseo.com  真情送上


小广 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明linux服务器硬盘挂载自启动命令方法–亲测有效
喜欢 (1)
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到
(94)个小伙伴在吐槽
  1. 潜心学习,认真拜读!
    三五创业网2017-11-16 21:13 回复
    • 学到了很多~~~~~~~
      匿名2017-12-29 07:01 回复
    • 谢谢分享,mark之。
      匿名2018-02-01 06:30 回复
  2. 冬天虽已来临,祝您四季如春!
    创业网2017-11-22 15:10 回复
  3. 一天不来访,浑身上下痒!
    小吃技术2017-11-27 16:23 回复
  4. 十元钱,只需十元钱: 赚钱点子,小吃技术,种养加工,开店指南,百万信息,在线浏览。 逆向推荐,自动裂变,五五倍增,八级下线,什么不干,坐收十万。 http://www.ak47.356688.com/ 三五创业网
    三五创业网2017-12-03 21:44 回复
  5. 诚信换链,cps广告联盟,www.caotama.com
    匿名2017-12-07 16:58 回复
  6. 一言不发岂能证明我来过了?!
    中医秘方2017-12-11 13:15 回复
  7. 很少能看到这么专注的博客啦!
    约炮把妹2017-12-15 09:20 回复
  8. 这样精彩的博客越来越少咯!
    中青看点2017-12-15 11:19 回复
  9. 这样的博客让人禁不住一天来几次!
    促美优品2017-12-19 08:19 回复
  10. 虽然看不大懂,但还是支持一下吧!
    匿名2017-12-25 00:02 回复
  11. 博客大好,让人忘不了!
  12. 新年好呀,新年好呀,祝福博主新年好!
    八达网2018-01-01 16:51 回复
  13. 八达网: 一元钱,只需一元钱, 百万技术在线看,不用推广年赚二十万 注册网址: http://www.fang2018.dabada.top/ 强烈推荐!
    八达网2018-01-06 10:02 回复
  14. 毫无疑问,这个是要支持的!
    套图网2018-01-07 15:00 回复
  15. 我有强迫症,看到好文就想顶!
    创业网2018-01-13 16:10 回复
  16. 你好
    匿名2018-01-17 10:21 回复
  17. :mrgreen:
    匿名2018-01-17 10:21 回复
  18. 深受启发,无条件支持!
    套图2018-01-18 08:47 回复
  19. 初来乍到,无条件支持!
    致富技术2018-01-20 20:32 回复
  20. 转眼又是新一年,博主万事如意不差钱!
    民间秘术2018-01-21 10:57 回复
  21. 博客还真是个好东西!
    11638488992018-01-27 16:21 回复
  22. 不错!不错!感觉好极了!
    闺房独自乐2018-01-30 20:39 回复
  23. 趣头条,看新闻,赚现金,不花钱,月赚万元。 注册就送最高十元,可直接微信提现,秒到账。 http://reg.cseyzx.com/notem/zczc.html?id=A54688091 !!!
    趣头条2018-02-01 07:27 回复
  24. 看看新闻就有钱赚,完全免费月赚八千! http://reg.cseyzx.com/notem/zczc.html?id=A54688091 趣头条
    趣头条2018-02-01 18:01 回复
  25. 新春佳节到。祝好!祝好!
    屌炸天2018-02-06 16:11 回复
  26. 鸟儿叫,花儿笑,一年一季春来到!
    趣头条2018-02-07 13:48 回复
  27. TadMN2 http://www.LnAJ7K8QSpfMO2wQ8gO.com
    匿名2018-02-17 19:34 回复
  28. f21t26 http://www.LnAJ7K8QSpfMO2wQ8gO.com
    匿名2018-02-19 06:25 回复
  29. 新年虽已过,好运不打折!
    营销软件2018-03-04 13:35 回复
  30. 找了好久才找到这里,来了就不想走!
    三五创业网2018-03-09 10:30 回复
  31. 大气博客,让人留恋不舍!
    补肾壮阳2018-03-14 08:17 回复
  32. good a blog!
    jie.la2018-03-19 14:36 回复
  33. http://google0123.com/
    匿名2018-03-20 17:08 回复
  34. Can I call you back? itraconazole cream But this study only looked at people at one point in time, so it does not indicate that one factor, like exercise, caused another factor, like better motor function, she noted.
    匿名2018-03-23 02:20 回复
  35. What's the last date I can post this to to arrive in time for Christmas? prednisone 4 mg dose pack side effects Meanwhile SEMI, a second trade group that represents makers of production tools and testing equipment used by chipmakers to build their own products, raised its 2015 outlook but trimmed its growth forecast for 2014 and predicted a flat 2016.
    匿名2018-03-23 03:54 回复
  36. Free medical insurance buy generic latisse online canada "Many of you have asked the Lord, 'Why?' And to each of youthe Lord is responding to your hearts from his heart ..
    匿名2018-03-24 03:17 回复
  37. Could you tell me the number for ? antabuse on line srl Frustrated with the loss of Tripoli and lack of an efficientarmy or police, the elected parliament and its allied PrimeMinister Abdullah al-Thinni have gradually built up a militaryalliance with Haftar.
    匿名2018-03-24 04:48 回复
  38. Will I be paid weekly or monthly? germany sex drops in south africa He enclosed a document signed by 48 Sharjah notables testifying to Abdullah's innocence
    匿名2018-03-24 07:51 回复
  39. I love the theatre coumadin clinic greenville sc address Of that number, 66 percent had been diagnosed with HIV but were not getting regular care; 20 percent did not know they were infected, and 10 percent were prescribed anti-HIV medicine known as antiretroviral treatment but were still not able to get the virus under control, and 4 percent of patients were under physician care but were not prescribed antiretroviral medicines.
    匿名2018-03-24 09:21 回复
  40. Where do you live? ryder xl male enhancement The court has already ruled that these 'captive' blocks forindustrial use were handed out illegally
    匿名2018-03-24 10:52 回复
  41. The United States probenecid purchase But without the Arrest Warrant there are 22 EU member states – including France, Germany and Spain – who could refuse to extradite their own nationals to the UK
    匿名2018-03-24 13:57 回复
  42. Stolen credit card leanbean coupon Grimes has touted her disagreements with Obama on his energy policies and some of his gun proposals
    匿名2018-03-24 18:38 回复
  43. What university do you go to? drug dogs and prescription drugs Industry experts say the pilots haven't grasped the threat to the legacy carriers from low-cost rivals and fast-growing Middle Eastern airlines
    匿名2018-03-24 20:11 回复
  44. I'll put her on costco pharmacy winchester virginia "Preparing things well is necessary, but don't fall into the temptation of trying to close or direct the freedom of the Holy Spirit, which is bigger and more generous than any human plan."
    匿名2018-03-24 21:46 回复
  45. Do you have any exams coming up? prednisone eye drops cost You’ve heard the notion that baseball is hopelessly out of step with contemporary urban culture, too slow, too cumbersome, too boring.
    匿名2018-03-25 04:09 回复
  46. Could you ask her to call me? metpure h It appears that several lawsuits may be pending should NYC Mayor Bill de Blasio allow prayer to be incorporated into a publicly funded universal pre-kindergarden program held at private religious schools across the city.
    匿名2018-03-25 09:29 回复
  47. What do you study? where to buy xanax in uk Email has become such an ubiquitous way of casual communication, it’s more like a quick phone chat than a formal written exchange.
    匿名2018-03-25 11:10 回复
  48. I'm afraid that number's ex-directory biopime "Urban lighting also may be a contributing factor as it attracts insects and means more food for spiders in those environments
    匿名2018-03-25 12:51 回复
  49. I'm on holiday modafinil trouble sleeping It suggests that Xi believes he needs to ensure the backing of the wider leadership before moving to decisively neutralize Zhou.
    匿名2018-03-25 16:17 回复
  50. Thanks for calling viagra prijs nederland "My time as leader is nearly over, but for Scotland the campaign continues and the dream shall never die," Salmond said Friday as he announced he would step down as first minister and leader of the Scottish National Party in November.
    匿名2018-03-25 21:23 回复
  51. Where do you live? pura bella skin care So, in the next five years, there will be three fewer senior candidates nominated
    匿名2018-03-25 21:23 回复
  52. What part of do you come from? clinique all about eyes serum de-puffing eye massage .5oz A former Nylon magazine chief financial officer has filed a lawsuit against the New York Post, claiming the downmarket tabloid has ruined her reputation by writing that she once served time in jail — a suit the Post is trying to have tossed.
    匿名2018-03-25 23:06 回复
  53. I'm sorry, he's cla 1000 with coconut oil Researchers digging at the site found its head and neck still together - a rare occurrence due to the small cranium often detaching easily after the creature’s death
    匿名2018-03-26 00:50 回复
  54. A staff restaurant cheapest generic modafinil The resolution says that flags have “a wide range of cultural significance” and “are often associated with government and military due to their history and have a wide variety of interpretation.”
    匿名2018-03-26 04:15 回复
  55. Could you ask him to call me? duricef 500 mg It earns money through "spreads" -the difference between what buyers and sellers are willing topay or accept in a trade.
    匿名2018-03-26 11:16 回复
  56. Very Good Site prednisone treatment for poison oak The factory is believed to have the world's largest production line, making display panels for LCD and OLED TVs.
    匿名2018-03-26 14:58 回复
  57. 受益匪浅,感触良多!
    增大2018-03-26 16:29 回复
  58. Where did you go to university? citrine jewelry for sale Mauricio Pochettino, the Spurs boss, said he would be in attendance this evening to cast his eye over the talent coming through the club's academy and they've certainly proven their credentials in beating Blackburn Rovers, Wolves, Manchester United and Nottingham Forest to reach the last four.
    匿名2018-03-26 18:28 回复
  59. Who's calling? phenergan 25 mg uses Lenovo's IBM deal is the most prominent success story.Eleven years on, Lenovo has grown into the world's biggest PCmaker, confounding the doubters with a fivefold rise in sharesand growing operating income by an average 28 percent a year.
    匿名2018-03-26 20:12 回复
  60. International directory enquiries vaso ultra lounge new orleans It prevents the defense from making substitutions and can tire defensive players out
    匿名2018-03-26 21:54 回复
  61. What are the hours of work? promethazine and codeine high dose However, Peter Walsh, from the charity Action Against Medical Accidents, said that while the changes were an encouraging sign, he was frustrated that they were not as far-reaching as his charity had previously called for.
    匿名2018-03-26 23:37 回复
  62. Very interesting tale lisinopril-h 20-25m They emphasised that early intervention significantly improves the outcome for people with eating disorders
    匿名2018-03-27 02:57 回复
  63. I'd like to send this to buy power enlarge projects "It makes it more difficult for the Fed to argue thatthey should be hiking rates."
    匿名2018-03-27 04:35 回复
  64. How many more years do you have to go? dexamethasone dosage for poison ivy But now, it would be required to report fatality or inpatient hospitalization within 24 hours after the employer is informed about the incident
    匿名2018-03-27 08:10 回复
  65. Looking for a job vaxigrip vaccine price A sign of an impending deal would be the discussions wrapping up with an announcement of more talks next week and the involvement of America's negotiating partners: Britain, China, France, Germany and Russia
    匿名2018-03-27 09:47 回复
  66. Where do you come from? bactrim 800/160 mg posologia Those in self-assessment who fail to meet this face an initial fixed penalty of 100, even if there is no tax to pay, plus interest on any tax not paid by the due date
    匿名2018-03-27 11:25 回复
  67. Very Good Site can you die from an overdose of valium "This grid is likely to evolve away from a centralized system to a hybrid of centralized and more localized controls," said Jeffrey Taft, chief architect for electric grid transformation at the Pacific Northwest National Laboratory.
    匿名2018-03-27 13:05 回复
  68. magic story very thanks ketoconazole soap price in india This stresses the need for regular intervals of low-level movement and to avoid sitting for excessive stretches of time," commented the study's lead author, Dr Thomas Buford, of the University of Florida.
    匿名2018-03-27 14:45 回复
  69. Withdraw cash mario badescu drying lotion review reddit Senate last week that he intended to "fix" the program's rules to ensure that designated entities don't serve as cover for big companies that should not qualify for discounts.
    匿名2018-03-27 19:43 回复
  70. Special Delivery cialis aus deutschland ohne rezept "The analysis in this report supports a move to international best practice in stroke rehabilitation in Ireland, with the potential for better outcomes for patients from better care in the community
    匿名2018-03-27 23:05 回复
  71. Where do you study? capoten tablet sublingual Other than one lapse in the second inning, in which he gave up a single to Mark Teixeira, back-to-back doubles by Martin Prado and Chase Headley and a sac fly to Ichiro Suzuki, Keuchel matched McCarthy zero-for-zero, routine out-for-routine out the whole game, in which only three Yankee outs were hit out of the infield
    匿名2018-03-28 05:55 回复
  72. I enjoy travelling acecare dental winter park However, don’t think that itmakes the title easier in any regard, as the improved AI will keep you on your toes every second
    匿名2018-03-28 10:55 回复
  73. Your cash is being counted buy goji lifestyles He covered the NFL, Olympics and college hoops for seven years at the Star-Ledger
    匿名2018-03-28 12:38 回复
  74. What company are you calling from? precio de cialis en farmacias guadalajara “Also important; read carefully recommendations and other warnings on the label or packaging of the product
    匿名2018-03-28 16:01 回复
  75. I'm doing a masters in law best prices viagra canada The scandals could also dampen the outlook for a bill tolegalise casino resorts, a move that Abe has said would help theeconomy by boosting tourists but which many voters oppose andabout which Abe's coalition partner has doubts
    匿名2018-03-28 17:43 回复
  76. No, I'm not particularly sporty fenburn fat burner Phoenix police Officer Mark Rine had good reason to think his life was in danger in 2014 when he grappled with a suspected drug dealer who wouldn’t take his hand out of his pants, a probe by the Maricopa County attorney’s office concluded.
    匿名2018-03-28 21:08 回复
  77. Could I have , please? promethazine and codeine cough syrup prescription And frankly she was a wildly overrated secretary of state, even as Obama treated her like John Foster Dulles on her way out the door, unless you confuse job performance with the accumulation of an amazing number of frequent flier miles
    匿名2018-03-29 07:38 回复
  78. Will I have to work on Saturdays? antabuse pill tb200 Ms Rousseff is not as charismatic or as popular as her predecessor and mentor, President "Lula", and she might find herself being voted out of power without having done anything particularly wrong.
    匿名2018-03-29 10:59 回复
  79. Who do you work for? buy killer labz exterminators Gailey worked as a Broncos assistant under Reeves from 1985-90 — they are both from Americus, Ga., and have known each other forever — and was John Elway’s QB coach in 1988 and his offensive coordinator the next two years
    匿名2018-03-29 12:41 回复
  80. A jiffy bag generic name of minipress xl The villages of Zor Mughar, Beyadi and Ziyarete — to the west — were the first to fall
    匿名2018-03-29 14:24 回复
  81. How much does the job pay? revia tablets qmobile Mr Miliband will add: "In recent days you have seen the Conservatives throwing spending promises around with no idea of where the money is coming from, promises which are unfunded, unfair and unbelievable."
    匿名2018-03-29 23:00 回复
  82. Have you got a current driving licence? buy isagenix products Authorities hope to launch that process by around May,Privatisations Commissioner Constantinos Herodotou told abusiness conference on March 20.
    匿名2018-03-30 02:26 回复
  83. I sing in a choir colazal dose email comments seemed harmless stating some facts that may or may not be accurate
    匿名2018-03-30 06:11 回复
  84. good material thanks tricor insurance beloit wi Miller, whose name should be written into the Rangers’ opening day lineup now in bold, black ink.
    匿名2018-03-30 18:15 回复
  85. It's serious how much does androgel 1.62 cost in canada Olson and others say it's unlikely Islamic State will ever see a $200 million ransom payment
    匿名2018-03-30 20:01 回复
  86. I'm in my first year at university gemfibrozil davis pdf And just as importantly, the big-company resources of Microsoft will allow us to invest even more in the R Project and the Revolution R products.”
    匿名2018-03-31 04:40 回复
  87. This site is crazy :) honest tea green tea with honey recipe In 1947, copywriter Frances Gerety coined the phrase "A Diamond Is Forever" in an advertising campaign for De Beers
    匿名2018-03-31 08:16 回复
  88. 我踩故我在,下次还会来!
    增大网2018-04-03 16:40 回复
  89. 为啥我又来,因为这里百看不厌!
    百约不得姐2018-04-12 12:25 回复
  90. Elocon Elocon Cream For Sale Harrogate [url=http://buyciali.com]cialis cheapest online prices[/url] Buy Lasix Without Rx Cialis Levitra Comprar Espana Free Viagra At No Cost
    匿名2018-04-16 11:57 (5天前)回复
  91. 3cWip8 https://www.genericpharmacydrug.com
    匿名2018-04-16 23:59 (5天前)回复
  92. iyngeU https://www.genericpharmacydrug.com
    匿名2018-04-18 07:13 (3天前)回复