免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1300 | 回复: 0
打印 上一主题 下一主题

在Ubuntu下自动挂载硬盘 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-11-17 12:07 |只看该作者 |倒序浏览
                          在Ubuntu下开机自动挂载硬盘
服务器的硬盘空间越来越小,想办法增加多一个硬盘来解决问题,按以下步骤操作:
1,新建一个挂载点,如: /data
2,fdisk -l 查看硬盘的信息
3,更改/etc/fstab文件
实例:
1,mkdir /data
2,运用fdisk -l命令,第二块硬盘是我们要挂载的硬盘,(红色字体)
root@backup:/home/abc# fdisk -lDisk /dev/sda: 200.0 GB, 200049647616 bytes255 heads, 63 sectors/track, 24321 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDisk identifier: 0x6dab22d0   Device Boot      Start         End      Blocks   Id  System/dev/sda1   *           1        9726    78124063+  83  Linux/dev/sda2            9727       23955   114294442+  83  Linux/dev/sda3           23956       24321     2939895    5  Extended/dev/sda5           23956       24321     2939863+  82  Linux swap / SolarisDisk /dev/sdb: 200.0 GB, 200049647616 bytes255 heads, 63 sectors/track, 24321 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDisk identifier: 0xf7dbf7db   Device Boot      Start         End      Blocks   Id  System/dev/sdb1               1       24321   195358401   83  Linux
3,编辑/etc/fsta文件,实现开机自动挂载.如下增加红色字体
# /etc/fstab: static file system information.##                proc            /proc           proc    defaults        0       0# /dev/sda1UUID=c7ffb453-6da1-46fb-83b7-301cde2f7f32 /               ext3    defaults,errors=remount-ro 0       1# /dev/sda5UUID=f8c79f4c-d077-47a8-b2cb-9952e3ce9276 /home           ext3   usrquota,grpquota,acl 1 2# /dev/sda6UUID=b9c73b07-0d76-432d-8168-3953172e1303 none            swap    sw              0       0/dev/hda        /media/cdrom0   udf,iso9660 user,noauto,exec 0       0/dev/sdb1       /data   ext3    usrquota,grpquota,acl   1 2
4,reboot后可以看到在/data分区
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/43296/showart_424576.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP