fdisk

分区工具,输出与/proc/partitions类似
显示硬盘的磁头,磁柱名义都是逻辑上的,称LBA地址,是由CHS转换过来的.

选项:
  -l [device]     显示设备的分区信息
  [device]        进行分区操作
root@zhentao-desktop:~# fdisk /dev/sda

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
         switch off the mode (command 'c') and change display units to
         sectors (command 'u').

Command (m for help): m
Command action
   a   toggle a bootable flag
   b   edit bsd disklabel
   c   toggle the dos compatibility flag
   d   delete a partition
   l   list known partition types
   m   print this menu
   n   add a new partition
   o   create a new empty DOS partition table
   p   print the partition table
   q   quit without saving changes
   s   create a new empty Sun disklabel
   t   change a partition's system id
   u   change display/entry units
   v   verify the partition table
   w   write table to disk and exit
   x   extra functionality (experts only)
root@zhentao-desktop:~# fdisk -l

Disk /dev/sda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 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: 0x00037c48

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13       96256   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2              13        1306    10386433    5  Extended
/dev/sda5              13         137      999424   82  Linux swap / Solaris
/dev/sda6             137         259      975872   83  Linux
/dev/sda7             259        1306     8409088   83  Linux
root@zhentao-desktop:~# cat /proc/partitions 
major minor  #blocks  name

   8        0   10485760 sda
   8        1      96256 sda1
   8        2          1 sda2
   8        5     999424 sda5
   8        6     975872 sda6
   8        7    8409088 sda7
   
root@zhentao-desktop:~# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda7              8276936   2674300   5182184  35% /
none                    248640       232    248408   1% /dev
none                    254236       240    253996   1% /dev/shm
none                    254236       104    254132   1% /var/run
none                    254236         0    254236   0% /var/lock
/dev/sda1                93207     42836     45559  49% /boot
/dev/sda6               960504    613192    298520  68% /home
sz                    35840980  18749180  17091800  53% /media/sf_sz  

附:硬盘相关概念

相关概念:磁头<heads>,磁柱<cylinder>,扇区<sector>,磁道<track>

1.硬盘有单碟,多碟之分;这里的碟指的是磁片

磁头    每张磁片正反面都有一个磁头
磁道    磁片中半径相同的磁轨
磁柱    所有磁片相同的磁道构成磁柱
           分区的最小单位
           分区记录的是起始磁柱和结束磁柱
扇区    从圆心向外划直线,即将磁道细分为一个又一个的扇区
块       分区时指定的逻辑区块大小,为扇区大小倍数;改善每次读写一个扇区效率过低


2.主要启动扇区MBR
  master boot recorder
  位于硬盘的0磁柱

3.磁盘容量=磁头数*磁柱数*扇区数*512

参考: http://www.c-jump.com/CIS24/Slides/DiskDrives/DiskDrives.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值