⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 合理规划您的硬盘分区 linuxsir_org.htm

📁 linuxSir 网站的精华文章
💻 HTM
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<!-- saved from url=(0039)http://www.linuxsir.org/main/?q=node/80 -->
<HTML lang=zh-hans xml:lang="zh-hans" 
xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>合理规划您的硬盘分区 | LinuxSir.Org</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<STYLE type=text/css media=all>@import url( misc/drupal.css );
</STYLE>


<STYLE type=text/css media=all>@import url( modules/taxonomy_context/taxonomy_context.css );
</STYLE>
<LINK media=screen href="合理规划您的硬盘分区  LinuxSir_Org.files/menuExpandable3.css" 
type=text/css rel=stylesheet>
<SCRIPT src="合理规划您的硬盘分区  LinuxSir_Org.files/menuExpandable3.js" 
type=text/javascript></SCRIPT>
<LINK href="合理规划您的硬盘分区  LinuxSir_Org.files/common.css" type=text/css 
rel=stylesheet>
<STYLE type=text/css media=all>@import url( themes/chameleon/marvin/style.css );
</STYLE>

<META content="MSHTML 6.00.2900.2180" name=GENERATOR></HEAD>
<BODY>
<DIV id=header><A title=Home href="http://www.linuxsir.org/main/"><IMG alt=Home 
src="合理规划您的硬盘分区  LinuxSir_Org.files/logo.jpg"></A></DIV>
<DIV class=navlinks>
<DIV class=primary><A href="http://www.linuxsir.org/main/?q"><FONT 
color=white>首页</FONT></A> | <A 
href="http://www.linuxsir.org/main/?q=taxonomy/term/34"><FONT 
color=white>事件</FONT></A> | <A 
href="http://www.linuxsir.org/main/?q=taxonomy/term/1/25/"><FONT 
color=white>文档</FONT></A> | <A 
href="http://www.linuxsir.org/main/?q=taxonomy/term/35/48/"><FONT 
color=white>资源</FONT></A> | <A 
href="http://www.linuxsir.org/main/?q=search"><FONT color=white>搜索</FONT></A> | 
<A href="http://www.linuxsir.org/bbs"><FONT color=white>论坛</FONT></A> | <A 
href="http://www.linuxsir.org/main/?q=taxonomy/term/38"><FONT 
color=white>贡献者</FONT></A> | <A 
href="http://www.linuxsir.org/main/?q=node/3"><FONT color=white>关于</FONT></A> | 
<A href="http://www.linuxsir.org/main/?q=user"><FONT 
color=white>注册/登录</FONT></A></DIV></DIV>
<TABLE id=content>
  <TBODY>
  <TR>
    <TD id=sidebar-left>
      <DIV class="block block-block" id=block-block-1>
      <H2 class=title>子站索引</H2>
      <DIV class=content>
      <UL>
        <LI><A href="http://fedora.linuxsir.org/" target?_blank?>Fedora中文</A> 
        <LI><A href="http://debian.linuxsir.org/" target?_blank?>Debian中文</A> 
        <LI><A href="http://lfs.linuxsir.org/" target?_blank?>LFS 中文</A> 
        <LI><A href="http://slack.linuxsir.org/">Slackware</A> 
        <LI><A href="http://gentoo.linuxsir.org/">Gentoo中文</A> 
        <LI><A href="http://arch.linuxsir.org/">Arch 中文</A> </LI></UL></DIV></DIV>
      <DIV class="block block-block" id=block-block-3>
      <H2 class=title>重要资讯</H2>
      <DIV class=content>
      <UL>
        <LI><A href="http://www.linuxsir.org/main/?q=taxonomy/term/36">本站公告</A> 
        <LI><A href="http://www.linuxsir.org/main/?q=taxonomy/term/34">新闻事件</A> 
        <LI><A href="http://www.linuxsir.org/bbs" target=_blank>本站论坛</A> 
        <LI><A href="http://www.linuxsir.org/main/?q=taxonomy/term/38">贡 献 者</A> 
        </LI></UL></DIV></DIV>
      <DIV class="block block-block" id=block-block-7>
      <H2 class=title>项目索引</H2>
      <DIV class=content>
      <UL>
        <LI><A href="http://www.fcitx.org/" target=_blank>小企鹅输入法</A> 
        <LI><A href="http://lumaqq.linuxsir.org/" target=_blank>LumaQQ</A> 
        <LI><A href="http://openq.linuxsir.org/" target=_blank>OpenQ</A> 
        <LI><A href="http://www.relaxbsd.org/" target=_blank>RelaxBSD</A> 
      </LI></UL></DIV></DIV>
      <DIV class="block block-user" id=block-user-1>
      <H2 class=title>站点导航</H2>
      <DIV class=content>
      <DIV class=menu>
      <UL>
        <LI class=leaf><A title=注册/登录 
        href="http://www.linuxsir.org/main/?q=user">注册/登录</A> 
        <LI class=collapsed><A 
        href="http://www.linuxsir.org/main/?q=aggregator">新闻聚合</A> 
      </LI></UL></DIV></DIV></DIV>
      <DIV class="block block-aggregator" id=block-aggregator-feed-2>
      <H2 class=title>LinuxSir.Org 论坛</H2>
      <DIV class=content>
      <DIV class=item-list>
      <UL>
        <LI><A 
        href="http://www.linuxsir.org/bbs/showthread.php?t=267213&amp;goto=newpost">告别LINUX</A> 

        <LI><A 
        href="http://www.linuxsir.org/bbs/showthread.php?t=267212&amp;goto=newpost">suse中国社区(论坛)已正式开放</A> 

        <LI><A 
        href="http://www.linuxsir.org/bbs/showthread.php?t=267211&amp;goto=newpost">在文本编辑器中显示乱码</A> 

        <LI><A 
        href="http://www.linuxsir.org/bbs/showthread.php?t=267210&amp;goto=newpost">archlinux用最新的ntfs-3g驱动读写ntfs分区</A> 

        <LI><A 
        href="http://www.linuxsir.org/bbs/showthread.php?t=267209&amp;goto=newpost">实在是不行了~发帖请教一下,关于samba的中文问题~~~</A> 
        </LI></UL></DIV>
      <DIV class=more-link><A title=查看此feed的最新消息 
      href="http://www.linuxsir.org/main/?q=aggregator/sources/2">更多</A></DIV></DIV></DIV>
      <DIV class="block block-user" id=block-user-2>
      <H2 class=title>最新注册</H2>
      <DIV class=content>
      <DIV class=item-list>
      <UL>
        <LI>iobuf
        <LI>snakejohe
        <LI>tunnys
        <LI>layeyeung
        <LI>wuyuworld</LI></UL></DIV></DIV></DIV>
      <DIV class="block block-user" id=block-user-3>
      <H2 class=title>当前在线</H2>
      <DIV class=content>0 users 和 99 游客 在线</DIV></DIV></TD>
    <TD id=main>
      <DIV class=breadcrumb><A href="http://www.linuxsir.org/main/?q=">首页</A> » 
      <A href="http://www.linuxsir.org/main/?q=taxonomy/term/1">Linux</A></DIV>
      <H2>合理规划您的硬盘分区</H2><!-- begin content -->
      <DIV class=node>
      <DIV class=content>
      <P><B>作者:</B>北南南北<BR><B>来自:</B>LinuxSir.Org<BR><B>提要:</B>对于一个硬盘(包括移动存储设备)如何规划分区结构及如何划分才是比较合理的;为了减少由于硬盘划分不合理而造成的风险及不必要的麻烦,有必要重述如何对一个硬盘的分区结构进行规划;</P>
      <P><FONT 
      color=blue><B><BR>+++++++++++++++++++++++++++++++++++++++++++++<BR>正文<BR>+++++++++++++++++++++++++++++++++++++++++++++<BR></B></FONT></P>
      <P><FONT size=4><B><BR>一、关于硬盘种类、物理几何结构及硬盘容量、分区大小计算;<BR></B></FONT></P>
      <P><FONT size=3><B><BR>1、硬盘种类、物理几何结构<BR></B></FONT></P>
      <P>硬盘的种类主要是SCSI 、IDE 
      、以及现在流行的SATA等;任何一种硬盘的生产都要一定的标准;随着相应的标准的升级,硬盘生产技术也在升级;比如 SCSI标准已经经历了SCSI-1 
      、SCSI-2、SCSI-3;其中目前咱们经常在服务器网站看到的 Ultral-160就是基于SCSI-3标准的;IDE 
      遵循的是ATA标准,而目前流行的SATA,是ATA标准的升级版本;IDE是并口设备,而SATA是串口,SATA的发展目的是替换IDE;</P>
      <P>硬盘的物理几何结构是由盘、磁盘表面、柱面、扇区组成,一个张硬盘内部是由几张碟片叠加在一起,这样形成一个柱体面;每个碟片都有上下表面;磁头和磁盘表面接触从而能读取数据;<BR><FONT 
      size=3><B><BR>2、硬盘容量及分区大小的算法;<BR></B></FONT></P>
      <P>我们通过fdsik -l 可以发现如下的信息:<BR>
      <DIV class=codeblock><CODE>Disk /dev/hda: 80.0 GB, 80026361856 
      bytes<BR>255 heads, 63 sectors/track, 9729 cylinders<BR>Units = cylinders 
      of 16065 * 512 = 8225280 bytes<BR>&nbsp;&nbsp;&nbsp;Device Boot Start End 
      Blocks Id System<BR>/dev/hda1 * 1 765 6144831 7 HPFS/NTFS<BR>/dev/hda2 766 
      2805 16386300 c W95 FAT32 (LBA)<BR>/dev/hda3 2806 9729 55617030 5 
      Extended<BR>/dev/hda5 2806 3825 8193118+ 83 Linux<BR>/dev/hda6 3826 5100 
      10241406 83 Linux<BR>/dev/hda7 5101 5198 787153+ 82 Linux swap / 
      Solaris<BR>/dev/hda8 5199 6657 11719386 83 Linux<BR>/dev/hda9 6658 7751 
      8787523+ 83 Linux<BR>/dev/hda10 7752 9729 15888253+ 83 Linux</CODE></DIV>
      <P></P>
      <P>其中 heads 是磁盘面;sectors 是扇区;cylinders 是柱面;每个扇区大小是 512byte,也就是0.5K;</P>
      <P>通过上面的例子,我们发现此硬盘有 
      255个磁盘面,有63个扇区,有9729个柱面;所以整个硬盘体积换算公式应该是:<BR><B><BR>磁面个数 x 扇区个数 x 
      每个扇区的大小512 x 柱面个数 = 硬盘体积 (单位bytes)<BR></B></P>
      <P>所以在本例中磁盘的大小应该计算如下:</P>
      <P>255 x 63 x 512 x 9729 = 80023749120 bytes </P>
      <P><FONT 
      color=blue><B>提示:</B></FONT>由于硬盘生产商和操作系统换算不太一样,硬盘厂家以10进位的办法来换算,而操作系统是以2进位制来换算,所以在换算成M或者G 
      时,不同的算法结果却不一样;所以我们的硬盘有时标出的是80G,在操作系统下看却少几M;</P>
      <P>上面例子中,硬盘厂家算法 和 操作系统算数比较:</P>
      <P><B>硬盘厂家:</B> 80023749120 bytes = 80023749.120 K = 80023.749120 M 
      (向大单位换算,每次除以1000)<BR><B>操作系统:</B> 80023749120 bytes = 78148192.5 K = 
      76316.594238281 M (向大单位换算,每次除以1024)</P>
      <P>我们在查看分区大小的时候,可以用生产厂家提供的算法来简单推算分区的大小;把小数点向前移动六位就是以G表示的大小;比如 hda1 的大小约为 
      6.144831G ;</P>
      <P><FONT size=4><B><BR>二、关于硬盘分区划分标准及合理分区结构;<BR></B></FONT></P>
      <P><FONT size=3><B><BR>1、硬盘分区划分标准<BR></B></FONT></P>
      <P>硬盘的分区由主分区、扩展分区和逻辑分区组成;所以我们在对硬盘分区时要遵循这个标准;主分区(包括扩展分区)的最大个数是四个,主分区(包含扩展分区)的个数硬盘的主引导记录MBR(Master 
      Boot 
      Recorder)决定的,MBR存放启动管理程序(GRUB,LILO,NTLOARDER等)和分区表记录。其中扩展分区也算一个主分区;扩展分区下可以包含更多的逻辑分区;所以主分区(包括扩展分区)范围是从1-4,逻辑分区是从5开始的;比如下面的例子:<BR>
      <DIV class=codeblock><CODE>&nbsp;&nbsp;&nbsp;Device Boot Start End Blocks 
      Id System<BR>/dev/hda1 * 1 765 6144831 7 HPFS/NTFS<BR>/dev/hda2 766 2805 
      16386300 c W95 FAT32 (LBA)<BR>/dev/hda3 2806 9729 55617030 5 
      Extended<BR>/dev/hda5 2806 3825 8193118+ 83 Linux<BR>/dev/hda6 3826 5100 
      10241406 83 Linux<BR>/dev/hda7 5101 5198 787153+ 82 Linux swap / 
      Solaris<BR>/dev/hda8 5199 6657 11719386 83 Linux<BR>/dev/hda9 6658 7751 
      8787523+ 83 Linux<BR>/dev/hda10 7752 9729 15888253+ 83 
      Linux</CODE></DIV><BR>通过这个例子,我们可以看到主分区有3个,从 hda1-hda3 ,扩展分区由 hda5-hda10 
      ;此硬盘没有主分区4,所以也没有显示主分区hda4 ;但逻辑分区不可能从4开始,因为那是主分区的位置,明白了吧;
      <P></P>
      <P><FONT 
      size=3><B><BR>2、硬盘设备(包括移动存储设备)在Linux或者其它类Unix系统的表示;<BR></B></FONT></P>
      <P>IDE 硬盘在Linux或者其它类Unix系统的一般表示为 hd* ,比如hda、hdb ... ... ,我们可以通过 fdisk -l 
      来查看;有时您可能只有一个硬盘,在操作系统中看到的却是 hdb ,这与硬盘的跳线有关;另外hdc 大多表示是光驱设备;如果您有两块硬盘,大多是 
      hda和hdb。在这方面说的太多也无用,还是以fdisk -l 为准为好;</P>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -