首页 > Linux考试认证

linux认证:linux虚拟机添加硬盘

时间:2009-10-28 18:15:52  作者:  我要投稿
Linux初探欢迎您的投稿,投放方法请点击这里查看,我们会定期赠送精美小礼品给优秀的投稿作者。海纳百川 取则行远!LinuxGoo欢迎您的到来。
一.Linux的硬盘识别2.6 kernel以后,linux会将识别到的硬件设备,在/dev/下建立相应的设备文件.如:sda  表示第1块SCSI硬盘.hda  表示第1块IDE硬盘(即连接在第1个ID......

   一.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 -l

  Disk /dev/hda: 21.4 GB, 21474836480 bytes

  255 heads, 63 sectors/track, 2610 cylinders

  Units = 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 Linux

  Disk /dev/hdb: 10.7 GB, 10737418240 bytes

  255 heads, 63 sectors/track, 1305 cylinders

  Units = cylinders of 16065 * 512 = 8225280 bytes

  Disk /dev/hdb doesn't contain a valid partition table

  [root@g11-64-1 ~]#

  显示hdb没有分区信息,大小为10G.

  使用fdisk命令对hdb进行分区.

  [root@g11-64-1 ~]# fdisk /dev/hdb

  Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

  Building a new DOS disklabel. Changes will remain in memory only,

  until you decide to write them. After that, of course, the previous

  content 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)

如果您需转载 linux认证:linux虚拟机添加硬盘,请注明来自LinuxGoo.com,其版权归原作者所有。请广大网友留言时遵纪守法,使用文明用语。如果您在应用中有什么问题,请在下面留言,我们会尽快解答。
来顶一下
近回首页
返回首页
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表
相关文章
栏目热门