您好,欢迎来到思海网络,我们将竭诚为您提供优质的服务! 诚征网络推广 | 网站备案 | 帮助中心 | 软件下载 | 购买流程 | 付款方式 | 联系我们 [ 会员登录/注册 ]
促销推广
客服中心
业务咨询
有事点击这里…  531199185
有事点击这里…  61352289
点击这里给我发消息  81721488
有事点击这里…  376585780
有事点击这里…  872642803
有事点击这里…  459248018
有事点击这里…  61352288
有事点击这里…  380791050
技术支持
有事点击这里…  714236853
有事点击这里…  719304487
有事点击这里…  1208894568
有事点击这里…  61352289
在线客服
有事点击这里…  531199185
有事点击这里…  61352288
有事点击这里…  983054746
有事点击这里…  893984210
当前位置:首页 >> 技术文章 >> 文章浏览
技术文章

CentOS6.5开机自动挂载硬盘

添加时间:2016-7-15 3:44:07  添加: 思海网络 
  CentOS是社区企业操作系统,是Linux发行版之一,它是来自于Red Hat Enterprise Linux依照开放源代码规定释出的源代码所编译而成。由于出自同样的源代码,因此有些要求高度稳定性的服务器以CentOS替代商业版的Red Hat Enterprise Linux使用。两者的不同,在于CentOS并不包含封闭源代码软件。

  企业级应用系统的建设,通常将系统和数据分别存储,并建立raid。新装的CentOS6.5,需要挂载数据盘,并且能够系统启动自动挂载该数据盘。

  1、手动挂载磁盘

  查看磁盘分区信息,执行fdisk命令

  [root@tsp-rls-webservice tsp]# fdisk -l

  Disk /dev/sdb: 1476.5 GB, 1476529225728 bytes

  255 heads, 63 sectors/track, 179511 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: 0x0008a3a1

  Device Boot Start End Blocks Id System

  /dev/sdb1 1 179512 1441922048 83 Linux

  Disk /dev/sda: 322.1 GB, 322122547200 bytes

  255 heads, 63 sectors/track, 39162 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: 0x6a5b51c5

  Device Boot Start End Blocks Id System

  /dev/sda1 * 1 64 512000 83 Linux

  Partition 1 does not end on cylinder boundary.

  /dev/sda2 64 39163 314059776 8e Linux LVM

  Disk /dev/mapper/vg_tsprlswebserv-lv_root: 53.7 GB, 53687091200 bytes

  255 heads, 63 sectors/track, 6527 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_tsprlswebserv-lv_swap: 16.8 GB, 16814964736 bytes

  255 heads, 63 sectors/track, 2044 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_tsprlswebserv-lv_home: 251.1 GB, 251092008960 bytes

  255 heads, 63 sectors/track, 30526 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

  查看到/dev/sdb1没有挂载,接下来建立挂载点(创建挂载目录),执行mount命令,挂载数据盘。

  [root@tsp-rls-webservice tsp]# mkdir /tsp

  [root@tsp-rls-webservice tsp]# mount /dev/sdb1 /tsp

  2、系统启动,自动挂载数据盘

  查看磁盘UUID信息

  [root@tsp-rls-webservice tsp]# blkid

  /dev/mapper/vg_tsprlswebserv-lv_root: UUID="3dedb8a7-69c5-44d7-b590-e70a0b1b3c9a" TYPE="ext4"

  /dev/sdb1: UUID="e85dd659-bb20-4d12-a8bc-16130efc04ea" TYPE="ext4"

  /dev/sda1: UUID="97f12da1-c972-4508-9028-9b98cde34a34" TYPE="ext4"

  /dev/sda2: UUID="cKJ1xc-8mci-0d89-DNaR-5IAG-2JOv-V1G1q9" TYPE="LVM2_member"

  /dev/mapper/vg_tsprlswebserv-lv_swap: UUID="aa4589df-1d47-4060-a419-9c4432c3bb9a" TYPE="swap"

  /dev/mapper/vg_tsprlswebserv-lv_home: UUID="17a62039-4676-45ce-8eb9-1914e2d4820c" TYPE="ext4"

  编辑系统分区表

  [root@tsp-rls-webservice tsp]# vi /etc/fstab

  添加如下信息:

  UUID=e85dd659-bb20-4d12-a8bc-16130efc04ea /tsp ext4 defaults 1 2

  编辑后的信息如下:

  #

  # /etc/fstab

  # Created by anaconda on Thu Aug 21 17:17:19 2014

  #

  # Accessible filesystems, by reference, are maintained under '/dev/disk'

  # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info

  #

  /dev/mapper/vg_tsprlswebserv-lv_root / ext4 defaults 1 1

  UUID=97f12da1-c972-4508-9028-9b98cde34a34 /boot ext4 defaults 1 2

  UUID=e85dd659-bb20-4d12-a8bc-16130efc04ea /tsp ext4 defaults 1 2

  /dev/mapper/vg_tsprlswebserv-lv_home /home ext4 defaults 1 2

  /dev/mapper/vg_tsprlswebserv-lv_swap swap swap defaults 0 0

  tmpfs /dev/shm tmpfs defaults 0 0

  devpts /dev/pts devpts gid=5,mode=620 0 0

  sysfs /sys sysfs defaults 0 0

  proc /proc proc defaults 0 0

  保存退出;重启系统,确认自动挂载成功。

  以上就是 CentOS6.5开机自动挂载硬盘 的执行命令


关键字:CentOS、挂载硬盘、操作系统
分享到:

顶部 】 【 关闭
版权所有:佛山思海电脑网络有限公司 ©1998-2024 All Rights Reserved.
联系电话:(0757)22630313、22633833
中华人民共和国增值电信业务经营许可证: 粤B1.B2-20030321 备案号:粤B2-20030321-1
网站公安备案编号:44060602000007 交互式栏目专项备案编号:200303DD003  
察察 工商 网安 举报有奖  警警  手机打开网站