免费注册 查看新帖 |

Chinaunix

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

[其他] 菜鸟求教硬盘使用情况 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2012-07-18 13:21 |只看该作者 |倒序浏览
[root@comsenz-db1 ~]# fdisk -l

Disk /dev/cciss/c0d0: 500.0 GB, 500074307584 bytes
255 heads, 32 sectors/track, 119694 cylinders
Units = cylinders of 8160 * 512 = 4177920 bytes

           Device Boot      Start         End      Blocks   Id  System
/dev/cciss/c0d0p1   *           1          64      261104   83  Linux
/dev/cciss/c0d0p2              65        4176    16776960   83  Linux
/dev/cciss/c0d0p3            4177        8288    16776960   82  Linux swap / Solaris
/dev/cciss/c0d0p4            8289      119694   454536480    5  Extended
/dev/cciss/c0d0p5            8289      119694   454536464   83  Linux

WARNING: GPT (GUID Partition Table) detected on '/dev/cciss/c0d1'! The util fdisk doesn't support GPT. Use GNU Parted.


WARNING: The size of this disk is 3.0 TB (3000513552384 bytes).
DOS partition table format can not be used on drives for volumes
larger than 2.2 TB (2199023255040 bytes). Use parted(1) and GUID
partition table format (GPT).


Disk /dev/cciss/c0d1: 3000.5 GB, 3000513552384 bytes
255 heads, 63 sectors/track, 364791 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

           Device Boot      Start         End      Blocks   Id  System
/dev/cciss/c0d1p1               1      267350  2147483647+  ee  EFI GPT

================================================
小弟刚接手工作,有台Linux的服务器,可能是硬盘空间快满了。平时不熟悉Linux系统, 但感觉好像这个系统中只使用了500G左右的空间, 剩下的3T还没有利用是么?

请教教小弟这机器的磁盘情况。告诉我应该怎么办。或者介绍一下相关文章, 我慢慢学也行

论坛徽章:
13
15-16赛季CBA联赛之同曦
日期:2016-01-28 19:52:032015亚冠之北京国安
日期:2015-10-07 14:28:19NBA常规赛纪念章
日期:2015-05-04 22:32:03处女座
日期:2015-01-15 19:45:44卯兔
日期:2014-10-28 16:17:14白羊座
日期:2014-05-24 15:10:46寅虎
日期:2014-05-10 09:50:35白羊座
日期:2014-03-12 20:52:17午马
日期:2014-03-01 08:37:27射手座
日期:2014-02-19 19:26:54子鼠
日期:2013-11-30 09:03:56狮子座
日期:2013-09-08 08:37:52
2 [报告]
发表于 2012-07-18 14:49 |只看该作者
DOS partition table format can not be used on drives for volumes
larger than 2.2 TB (2199023255040 bytes). Use parted(1) and GUID
partition table format (GPT).

使用parted进行管理 ^_^

论坛徽章:
0
3 [报告]
发表于 2012-07-19 09:50 |只看该作者
本帖最后由 biyexp 于 2012-07-19 11:05 编辑

[root@comsenz-att1 ~]# parted -l
Error: Unable to open /dev/md0 - unrecognised disk label.                 


Model: Compaq Smart Array (cpqarray)
Disk /dev/cciss/c0d1: 3001GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start  End  Size  File system  Name  Flags



Model: Compaq Smart Array (cpqarray)
Disk /dev/cciss/c0d0: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type      File system  Flags
1      16.4kB  267MB   267MB   primary   ext3         boot
2      267MB   17.4GB  17.2GB  primary   ext3              
3      17.4GB  34.6GB  17.2GB  primary   linux-swap        
4      34.6GB  500GB   465GB   extended                    
5      34.6GB  500GB   465GB   logical   ext3
======================================


Disk /dev/cciss/c0d1: 3001GB  这个应该还没有被分区呢吧?


论坛徽章:
0
4 [报告]
发表于 2012-07-19 11:02 |只看该作者
本帖最后由 biyexp 于 2012-07-19 11:04 编辑

如果没有被分区, 我就需要手动分区,应该输入 #parted /dev/cciss/c0d1    这样对吗?

论坛徽章:
0
5 [报告]
发表于 2012-07-22 16:39 |只看该作者
#  parted  /dev/sdb
GNU  Parted  1.8.1
Using  /dev/sdb
Welcome  to  GNU  Parted!  Type  'help'  to  view  a  list  of  commands.

(parted) mklabel gpt
将MBR磁盘格式化为GPT

(parted) mkpart primary 0 100
划分一个起始位置为0大小为100M的主分区

(parted) mkpart primary 100 200
划分一个起始位置为100M大小为100M的主分区

(parted)  mkpart  primary  0  -1

划分所有空间到一个分区

(parted)  print
打印当前分区

(parted)  quit

可能还会用到的一些命令

(parted) mklable msdos
如果要反过来.将GPT磁盘转化为MBR磁盘

在这样分完分区后,还要使用mkfs.ext3来进行格式化
#partprobe
#mkfs.ext3 -F /dev/sdb1

记的哦,因为fdisk是不支持GPT磁盘,所以使用fdisk -l来查看磁盘刚才的分区是没有用的.

命令行的模式:

将硬盘转化为GPT磁盘后,执行下列命令

parted /dev/sdx mkpart primary 0 100
##划分一个起始位置为0大小为100M的主分区


mount 命令

/dev/sdb1              /opt                     ext3    defaults        0 1


论坛徽章:
0
6 [报告]
发表于 2012-07-23 15:00 |只看该作者
本帖最后由 biyexp 于 2012-07-23 15:02 编辑

谢谢5楼大侠,小弟按照您的方法,开始做的没问题,但是后来又出现问题了
我分了1个区。
(parted) print                                                           

Model: Compaq Smart Array (cpqarray)
Disk /dev/cciss/c0d1: 3001GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags
1      17.4kB  3001GB  3001GB               primary      

(parted) quit               
-------------------------------------------------------
查看一下:
#parted -l
Error: Unable to open /dev/md0 - unrecognised disk label.                 


Model: Compaq Smart Array (cpqarray)
Disk /dev/cciss/c0d1: 3001GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags
1      17.4kB  3001GB  3001GB               primary   
------------------------------------------------
然后格式化#mkfs.ext3 -F /dev/cciss/c0d1 ,但是格式化到一半自动退出到命令行了,之后就出问题了

#parted -l
Error: Unable to open /dev/md0 - unrecognised disk label.                 

Error: Unable to open /dev/cciss/c0d1 - unrecognised disk label.
         


Model: Compaq Smart Array (cpqarray)
Disk /dev/cciss/c0d0: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type      File system  Flags
1      16.4kB  267MB   267MB   primary   ext3         boot
2      267MB   17.4GB  17.2GB  primary   ext3              
3      17.4GB  34.6GB  17.2GB  primary   linux-swap        
4      34.6GB  500GB   465GB   extended                    
5      34.6GB  500GB   465GB   logical   ext3  

我应该怎么办呢。。。请指教

论坛徽章:
0
7 [报告]
发表于 2012-07-24 12:47 |只看该作者
我先前碰到GPT分区都是在windows下,印象中只有独立的分区才可以有MBR转到GPT的;
但是在linux下没有尝试过,敢问你的硬盘有作什么raid吗?

论坛徽章:
0
8 [报告]
发表于 2012-07-25 14:55 |只看该作者
做raid了, 我又做了一次格式化, 成功了, 但是格式化了2个多小时

论坛徽章:
0
9 [报告]
发表于 2012-07-25 16:26 |只看该作者
第三条中国unix的回复

附件.rar

5.43 KB, 下载次数: 9

论坛徽章:
0
10 [报告]
发表于 2012-08-01 11:01 |只看该作者
/dev/cciss/c0d1p1
这块盘很明显没有被使用,格式化后挂载上去就可以了吧
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP