linux raid5 大于2t,rhel5.4下用fdisk无法生成超过2T的分区

1、查询sdb相关信息(注:sdb是由7块sisc450G做raid5,共有2.2T,其中1T挂载在/opt目录下。现在想

将剩下空间分配到sdb2;sda是一块SISC,450G的硬盘,主要用于安装操作系统。)

[root@csc-document dev]# fdisk -l /dev/sdb

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

GPT. Use GNU Parted.

WARNING: The size of this disk is 2.2 TB (2247475855360 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/sdb: 2247.4 GB, 2247475855360 bytes

255 heads, 63 sectors/track, 273240 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System

/dev/sdb1               1      267350  2147483647+  ee  EFI GPT

2、fdisk /dev/sdb(新建分区sdb2)

[root@csc-document dev]# fdisk /dev/sdb

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

GPT. Use GNU Parted.

The number of cylinders for this disk is set to 273240.

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)

WARNING: The size of this disk is 2.2 TB (2247475855360 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).

Command (m for help): n

Command action

e   extended

p   primary partition (1-4)

p

Partition number (1-4): 2

First cylinder (1-273240, default 1):

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-267349, default 267349):

Using default value 267349

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.

The kernel still uses the old table.

The new table will be used at the next reboot.

Syncing disks.

[root@csc-document dev]#

3、查询/dev下无法找到sdb2

[root@csc-document dev]# ls -l /dev|grep sdb

brw-r-----  1 root disk   8,    16 Oct 10 15:23 sdb

brw-r-----  1 root disk   8,    17 Oct  9 16:17 sdb1

不知问题出在哪里?

解决方法:

最后用prated,主要是超过2T的硬盘不可以用fdisk来进行分区,必须得用parted.

[root@csc-document dev]# parted /dev/sdb

GNU Parted 1.8.1

Using /dev/sdb

Welcome to GNU Parted! Type 'help' to view a list of commands.

(parted) mkpart

Partition name?  []? ora

File system type?  [ext2]? ext3

Start? 1050G

End? 2247G

(parted) q

Information: Don't forget to update /etc/fstab, if necessary.

(parted) print

Model: DELL PERC 6/i (scsi)

Disk /dev/sdb: 2247GB

Sector size (logical/physical): 512B/512B

Partition Table: gpt

Number  Start   End     Size    File system  Name  Flags

1      17.4kB  1049GB  1049GB  ext3

2      1050GB  2247GB  1197GB  ext3         ora

接着对其进行格式化:

[root@csc-document dev]# mkfs -t ext3 /dev/sdb2

创建目录:

[root@csc-document /]# mkdir ora

挂载到ora目录下:

[root@csc-document /]# mount -t ext3 /dev/sdb2 /ora

[root@csc-document /]# vi /etc/fstab

LABEL=/                 /                       ext3    defaults        1 1

LABEL=/opt1             /opt                    ext3    defaults        1 2

LABEL=/boot             /boot                   ext3    defaults        1 2

tmpfs                   /dev/shm                tmpfs   defaults        0 0

devpts                  /dev/pts                devpts  gid=5,mode=620  0 0

sysfs                   /sys                    sysfs   defaults        0 0

proc                    /proc                   proc    defaults        0 0

LABEL=SWAP-sda3         swap                    swap    defaults        0 0

/dev/sdb2               /ora                    ext3    defaults        0 0

OK!至此完成!

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值