千家信息网

如何在TurboLinux11中添加新硬盘

发表于:2026-11-01 作者:千家信息网编辑
千家信息网最后更新 2026年11月01日,本篇内容主要讲解"如何在TurboLinux11中添加新硬盘",感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习"如何在TurboLinux11中添加新硬盘"吧!
千家信息网最后更新 2026年11月01日如何在TurboLinux11中添加新硬盘

本篇内容主要讲解"如何在TurboLinux11中添加新硬盘",感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习"如何在TurboLinux11中添加新硬盘"吧!

一.Linux的硬盘识别

2.6 kernel以后,linux会将识别到的硬件设备,在/dev/下建立相应的设备文件.如:

sda    表示第1块SCSI硬盘.hda     表示第1块IDE硬盘(即连接在第1个IDE接口的Master口上).scd0    表示第1个USB光驱.

当添加了新硬盘后,在/dev目录下会有相应的设备文件产生.cciss的硬盘是个例外,它的
设备文件在/dev/cciss/目录下.一般使用"fdisk -l"命令可以列出系统中当前连接的硬盘
设备和分区信息.新硬盘没有分区信息,则只显示硬盘大小信息.

二.在linux系统中添加新硬盘

下面说明一下,在GTES 11上,添加一块10G硬盘到第一个IDE口的Slave接口上.

安装好硬盘后,开机进入Turbolinux.以root身份登录.
执行fdisk -l命令显示当前系统的硬盘设备.

[root@g11-64-1 ~]# fdisk -lDisk /dev/hda: 21.4 GB, 21474836480 bytes255 heads, 63 sectors/track, 2610 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes   Device Boot      Start         End      Blocks   Id  System/dev/hda1   *           1          13      104391   83  Linux/dev/hda2              14          89      610470   82  Linux swap / Solaris/dev/hda3              90        2610    20249932+  83  LinuxDisk /dev/hdb: 10.7 GB, 10737418240 bytes255 heads, 63 sectors/track, 1305 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytesDisk /dev/hdb doesn't contain a valid partition table[root@g11-64-1 ~]#

显示hdb没有分区信息,大小为10G.
使用fdisk命令对hdb进行分区.

[root@g11-64-1 ~]# fdisk /dev/hdbDevice contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabelBuilding a new DOS disklabel. Changes will remain in memory only,until you decide to write them. After that, of course, the previouscontent won't be recoverable.The number of cylinders for this disk is set to 1305.There is nothing wrong with that, but this is larger than 1024,and could in certain setups cause problems with:1) software that runs at boot time (e.g., old versions of LILO)2) booting and partitioning software from other OSs   (e.g., DOS FDISK, OS/2 FDISK)Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)输入: n 表示新建分区.Command (m for help): nCommand action   e   extended   p   primary partition (1-4)输入: p 表示建立一个原始分区.pPartition number (1-4): 1输入: 1 表示此分区编号为1.First cylinder (1-1305, default 1):输入: 回车 表示使用默认起始柱面号.Using default value 1Last cylinder or +size or +sizeM or +sizeK (1-1305, default 1305):输入: 回车 表示使用默认结束柱面号.即此分区使用整个硬盘空间.Using default value 1305Command (m for help): w输入: w 存盘,退出fdisk.The partition table has been altered!Calling ioctl() to re-read partition table.Syncing disks.

再使用fdisk -l命令查看分区情况.

[root@g11-64-1 ~]# fdisk -lDisk /dev/hda: 21.4 GB, 21474836480 bytes255 heads, 63 sectors/track, 2610 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes   Device Boot      Start         End      Blocks   Id  System/dev/hda1   *           1          13      104391   83  Linux/dev/hda2              14          89      610470   82  Linux swap / Solaris/dev/hda3              90        2610    20249932+  83  LinuxDisk /dev/hdb: 10.7 GB, 10737418240 bytes255 heads, 63 sectors/track, 1305 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes   Device Boot      Start         End      Blocks   Id  System/dev/hdb1               1        1305    10482381   83  Linux

显示/dev/hdb上有一个hdb1分区,为linux格式.
分区后,需要对这个分区进行格式化.

[root@g11-64-1 ~]# mkfs.ext3 /dev/hdb1mke2fs 1.39 (29-May-2006)Filesystem label=OS type: LinuxBlock size=4096 (log=2)Fragment size=4096 (log=2)1310720 inodes, 2620595 blocks131029 blocks (5.00%) reserved for the super userFirst data block=0Maximum filesystem blocks=268435456080 block groups32768 blocks per group, 32768 fragments per group16384 inodes per groupSuperblock backups stored on blocks:        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632Writing inode tables: doneCreating journal (32768 blocks): doneWriting superblocks and filesystem accounting information: doneThis filesystem will be automatically checked every 39 mounts or180 days, whichever comes first.  Use tune2fs -c or -i to override.

将新建分区挂在到/mnt/hdb1上.

[root@g11-64-1 ~]# mkdir /mnt/hdb1[root@g11-64-1 ~]# mount /dev/hdb1 /mnt/hdb1[root@g11-64-1 ~]# df -hFilesystem            Size  Used Avail Use% Mounted on/dev/hda3              19G  8.2G  9.7G  46% //dev/hda1              99M   16M   79M  17% /boottmpfs                 250M     0  250M   0% /dev/shm/dev/hdb1             9.9G  151M  9.2G   2% /mnt/hdb1[root@g11-64-1 ~]#

hdb1已挂载到/mnt/hdb1上,剩余空间为9.2G.
在此分区上创建文件.

[root@g11-64-1 ~]# cd /mnt/hdb1[root@g11-64-1 hdb1]# ls > a[root@g11-64-1 hdb1]# ls -hltotal 20K-rw-r--r-- 1 root root  13 Nov  3 08:45 adrwx------ 2 root root 16K Nov  3 08:44 lost+found[root@g11-64-1 hdb1]#

卸载hdb1分区.

[root@g11-64-1 hdb1]# cd[root@g11-64-1 ~]# umount /mnt/hdb1[root@g11-64-1 ~]# df -hFilesystem            Size  Used Avail Use% Mounted on/dev/hda3              19G  8.2G  9.7G  46% //dev/hda1              99M   16M   79M  17% /boottmpfs                 250M     0  250M   0% /dev/shm[root@g11-64-1 ~]#

三.设置新硬盘开机自动挂载

在/etc/fstab中添加新硬盘的挂载信息.添加下面一行:

/dev/hdb1       /mnt/hdb1               ext3 defaults         1       2

这样,每次开机后,系统会自动将/dev/hdb1挂载到/mnt/hdb1上.

undefined

到此,相信大家对"如何在TurboLinux11中添加新硬盘"有了更深的了解,不妨来实际操作一番吧!这里是网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!

硬盘 设备 输入 信息 命令 文件 系统 内容 大小 接口 格式 目录 空间 学习 原始 实用 更深 一行 个例 光驱 数据库的安全要保护哪些东西 数据库安全各自的含义是什么 生产安全数据库录入 数据库的安全性及管理 数据库安全策略包含哪些 海淀数据库安全审计系统 建立农村房屋安全信息数据库 易用的数据库客户端支持安全管理 连接数据库失败ssl安全错误 数据库的锁怎样保障安全 A股互联网金融科技公司 互联网科技公司税收优惠 工业互联网科技新基建 互联网科技未来 南京欣网互联网科技 互联网 视角下的科技创新 苏州大垚互联网科技 科技互联网创业计划书 重庆科技学院互联网 老年人脱离互联网科技的作文 新华互联网科技2019 中国航天科技大学国际工业互联网 玉溪互联网科技怎么选 互联网科技公司营业执照怎么办理 江苏苏星互联网科技有限公司 卡尔迅互联网科技有限公司 神州科技互联网有限公司 互联网科技接地气 平安好医生打造互联网科技医疗 承德科技产业互联网平台 中资互联网科技 互联网科技公司做什么 太原新华互联网科技学校怎么样 阿里巴巴算科技企业还是互联网 成都铂石互联网科技做什么的 移动互联网年度科技创新 深圳互联网科技的发展 智帮互联网科技公司最近动向 启辰互联网科技 平安好医生打造互联网科技医疗
0