好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

阿里云服务器linux系统硬盘挂载的教程 - linux教程

阿里云服务器linux系统硬盘挂载的教程

硬盘挂载方法我介绍过不少,但现在使用阿里云服务器的朋友相对比较多了,下面我来以阿里云服务器为例子给各位介绍一个硬盘挂载教程吧。

最近有个客户需要用阿里云,有幸用了以下,感觉还不错,以下内容对于不同的linux 显示的提示信息可能有所不同,但是都会好用.

硬盘分区及挂载操作步骤:

1.查看未挂载的硬盘,名称为/dev/xvdb.

  • # fdisk -l 
  •  
  • Disk /dev/xvdb doesn’t contain a valid partition table  

    2.创建分区

  • # fdisk /dev/xvdb 
  •  
  • … 

    输入n:Command (m for help):n

    输入p:

  • Command  action  
  • e extended 
  • primary  partition (1-4) 
  • 回车:

  • First  cylinder (1-2610,  default  1): 
  • Using default  value 1 

    回车:

  • Last  cylinder, +cylinders  or  + size {K,M,G} (1-2610,  default  2610): 
  • Using default  value 2610 

    输入w:

  • Command (m  for  help): w 
  • The partition table  has been altered! 

    4.建立挂载目录:# mkdir /data

    5.挂载分区:# mount /dev/xvdb1 /data

    6.设置开机自动挂载:vi /etc/fstab

    7.确认是否挂载成功.

    重启服务器:# reboot

    查看硬盘分区:

  • # df 
  •  
  • /dev/xvdb1 20635700 176196 19411268 1% /data 
  • --phpfensi.com  
  • All   is  ok

    查看更多关于阿里云服务器linux系统硬盘挂载的教程 - linux教程的详细内容...

  •   阅读:89次