免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12
最近访问板块 发新帖
楼主: ldren
打印 上一主题 下一主题

RHEL4U7下的9TB mkfs.ext3分区问题 [复制链接]

论坛徽章:
1
数据库技术版块每日发帖之星
日期:2016-03-10 06:20:00
11 [报告]
发表于 2009-06-03 13:27 |只看该作者
原帖由 ldren 于 2009-6-1 18:14 发表
目前情况如下:能否看出可以做出7.5TB?
[root@localhost ~]# cd /dev/mapper/
[root@localhost mapper]# ls
control  mpath0  mpath0p1  VolGroup00-LogVol00  VolGroup00-LogVol01
[root@localhost mapper ...



我看到dm2的大小约是8.4T,dm3的大小大约1.18T(按1 block=1kb估算),刚好你mount上的/dev/mapper/mpath0p1是约1.2TB,所以我再一次猜测是你分区时只分出了1.2TB,另8.4TB你并没有用fdisk分出来,导致生成的文件只有mpath0p1一个分区,也就是1.2TB的分区,所以你mount上后,df -h也就看到1.2TB。

我建议LZ使用multipath –F 命令清除多路径设备缓存后,再用multipath –v3 命令重新加载,然后parted命令mklable gpt,最后再pvcreate /dev/mapper/mpath0标记为物理卷.

然后对磁盘进行分区fdisk /dev/mapper/mpath0,Kpartx - a / dev/mapper/mpath0 ,分区之后会在dev/mapper/目录下创建新的块设备,/dev/mapper/mpath0p1 这个表示mpath0设备下面的分区1。之后使用fdisk –l 命令查看磁盘会看到dm-2 磁盘下面已经有分区的信息了,就像这样子:

Device Boot Start End Blocks Id System
/dev/dm-2p1 1 121577 976567221 83 Linux

最后再格式化:mkfs.ext3 /dev/mapper/mpath0p1

个人意见,仅供参考。

[ 本帖最后由 hbwangting 于 2009-6-3 14:05 编辑 ]

论坛徽章:
0
12 [报告]
发表于 2009-06-03 14:19 |只看该作者
Disk /dev/dm-2: 9001.6 GB, 9001691512832 bytes
255 heads, 63 sectors/track, 1094393 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

     Device Boot      Start         End      Blocks   Id  System
/dev/dm-2p1               1      267350  2147483647+  ee  EFI GPT
区已经出来了。

论坛徽章:
0
13 [报告]
发表于 2009-06-03 14:23 |只看该作者
Device Boot      Start         End      Blocks   Id  System
/dev/cciss/c0d0p1   *           1          13      104391   83  Linux
/dev/cciss/c0d0p2              14       17844   143227507+  8e  Linux LVM

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


Disk /dev/sda: 9001.6 GB, 9001691512832 bytes
255 heads, 63 sectors/track, 1094393 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

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

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


Disk /dev/sdb: 9001.6 GB, 9001691512832 bytes
255 heads, 63 sectors/track, 1094393 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

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

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


Disk /dev/dm-2: 9001.6 GB, 9001691512832 bytes
255 heads, 63 sectors/track, 1094393 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
这个是分区前的情况。

论坛徽章:
1
数据库技术版块每日发帖之星
日期:2016-03-10 06:20:00
14 [报告]
发表于 2009-06-03 14:50 |只看该作者
我想确认下mpath0p1的大小,parted /dev/mapper/mpath0 ,(parted) print

普通的linux的mkfs.ext3只能设置有效的 block size 为1024, 2048 and 4096 bytes ,也就是说ext3的block 4kb大小时,文件系统不能超过8TB,单个文件不能超过2TB,但网上说有些系统可以将block size设为更大,来支持更大的文件系统和单个文件大小,不过更多的人通过放弃ext3格式而选择其它的文件系统,来达到支持超大分区。

[ 本帖最后由 hbwangting 于 2009-6-3 15:35 编辑 ]

论坛徽章:
0
15 [报告]
发表于 2009-06-03 15:01 |只看该作者
原帖由 hbwangting 于 2009-6-3 13:27 发表



我看到dm2的大小约是8.4T,dm3的大小大约1.18T(按1 block=1kb估算),刚好你mount上的/dev/mapper/mpath0p1是约1.2TB,所以我再一次猜测是你分区时只分出了1.2TB,另8.4TB你并没有用fdisk分出来,导致生 ...


这个命令能做超过2TB 容量的分区吗?应该不行吧。前面你使用的是parted这个命令啊。

论坛徽章:
1
数据库技术版块每日发帖之星
日期:2016-03-10 06:20:00
16 [报告]
发表于 2009-06-03 15:40 |只看该作者

回复 #15 ldren 的帖子

我只是觉的分区混乱,特别是想确认/dev/mapper/mpath0p1这个分区的真实大小,所以最好用parted重做一遍

论坛徽章:
0
17 [报告]
发表于 2009-06-03 16:14 |只看该作者
[root@localhost ~]# fdisk -l

Disk /dev/cciss/c0d0: 146.7 GB, 146778685440 bytes
255 heads, 63 sectors/track, 17844 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

           Device Boot      Start         End      Blocks   Id  System
/dev/cciss/c0d0p1   *           1          13      104391   83  Linux
/dev/cciss/c0d0p2              14       17844   143227507+  8e  Linux LVM

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


Disk /dev/sda: 9001.6 GB, 9001691512832 bytes
255 heads, 63 sectors/track, 1094393 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

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

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


Disk /dev/sdb: 9001.6 GB, 9001691512832 bytes
255 heads, 63 sectors/track, 1094393 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

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

WARNING: GPT (GUID Partition Table) detected on '/dev/dm-2'! The util fdisk does n't support GPT. Use GNU Parted.


Disk /dev/dm-2: 9001.6 GB, 9001691512832 bytes
255 heads, 63 sectors/track, 1094393 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

     Device Boot      Start         End      Blocks   Id  System
/dev/dm-2p1               1      267350  2147483647+  ee  EFI GPT

Disk /dev/dm-3: 1267.2 GB, 1267250216448 bytes
255 heads, 63 sectors/track, 154067 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-3 doesn't contain a valid partition table
[root@localhost ~]# cd /dev/mapper/
[root@localhost mapper]# ls
control  mpath0  mpath0p1  VolGroup00-LogVol00  VolGroup00-LogVol01
[root@localhost mapper]# cat /proc/partitions
major minor  #blocks  name

104     0  143338560 cciss/c0d0
104     1     104391 cciss/c0d0p1
104     2  143227507 cciss/c0d0p2
   8     0 8790714368 sda
   8     1 7679999983 sda1
   8    16 8790714368 sdb
   8    17 7679999983 sdb1
253     0  137756672 dm-0
253     1    5406720 dm-1
253     2 8790714368 dm-2
253     3 1237549039 dm-3

这样你可以看清楚分区的情况了。我使用了cat /proc/partitions  sda1和sdb1是两个链路指向
dm-3是我没有做分区那个。我给9TB分了7.5TB这样。余下的大概就是1.2TB啦。我也很奇怪为什么他只分成功1.2TB的。但是1.2TB的我根本就没有分区啊。

论坛徽章:
1
数据库技术版块每日发帖之星
日期:2016-03-10 06:20:00
18 [报告]
发表于 2009-06-03 16:55 |只看该作者
从上面得到的信息可以看到/dev/sda 和/dev/sdb是不同路径的同一设备,/dev/dm2和/dev/mapper/mpath0都是自动生成的多路径设备,大小都是9TB,超过了8TB限制,是不是这个引起的?

论坛徽章:
0
19 [报告]
发表于 2009-11-14 18:39 |只看该作者
mark
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP