"잘못된 블록 수"로 인해 ext4 파티션 생성이 실패함

"잘못된 블록 수"로 인해 ext4 파티션 생성이 실패함

환경: - VMWare ESX 4.0의 가상 머신 - OS: 최신 RHEL 5.8

새(가상) 디스크를 추가한 후 이 디스크의 LVM에 ext4 파티션을 생성하고 싶습니다.

지금까지 취한 조치:

$ sudo /sbin/fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.


The number of cylinders for this disk is set to 10443.
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: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n
p
Partition number (1-4): 1
First cylinder (1-10443, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-10443, default 10443):
Using default value 10443

Command (m for help): t
Selected partition 1
Hex code (type L to list codes): 8e
Changed system type of partition 1 to 8e (Linux LVM)

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
$ sudo /usr/sbin/pvcreate /dev/sdb1
  Writing physical volume data to disk "/dev/sdb1"
  Physical volume "/dev/sdb1" successfully created
$ sudo /usr/sbin/vgcreate VGora /dev/sdb1
  /dev/hdc: open failed: No medium found
  Volume group "VGora" successfully created
$ sudo /usr/sbin/lvcreate -l "100%FREE" -n oradata VGora
  Logical volume "oradata" created

ext4 파티션을 생성하지 못했습니다:

$ sudo /sbin/mke2fs -t ext4 /dev/VGora/oradata
mke2fs 1.39 (29-May-2006)
mke2fs: invalid blocks count - /dev/VGora/oradata

생성된 파티션에 대한 추가 정보:

$ sudo /usr/sbin/vgdisplay VGora
  --- Volume group ---
  VG Name               VGora
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  2
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               80.00 GB
  PE Size               4.00 MB
  Total PE              20479
  Alloc PE / Size       20479 / 80.00 GB
  Free  PE / Size       0 / 0
  VG UUID               ggjERV-sGbG-1nCv-HW61-LJk4-I7cX-Z3Infh

$ sudo /usr/sbin/lvdisplay VGora
  --- Logical volume ---
  LV Name                /dev/VGora/oradata
  VG Name                VGora
  LV UUID                nia1PK-7JJ2-jg5T-uN4X-ggYH-R0mS-oqCooY
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                80.00 GB
  Current LE             20479
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:4

$ sudo /sbin/fdisk -l /dev/sdb

Disk /dev/sdb: 85.8 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       10443    83883366   8e  Linux LVM

이 오류에 대한 관련 정보를 찾을 수 없으며 해결 방법도 모르겠습니다.

  • 블록 수는 어떻게 확인하나요?
  • ext4에 유효한 숫자로 어떻게 수정합니까?

답변1

매개변수 구문 분석에서 오류를 확인하면 메시지가 발생한다고 생각합니다. RHEL 5의 mke2fs 버전은 이 -t type매개변수를 지원하지 않으므로 어떻게든 /dev/VGora/oradata마지막(선택적) 블록 수 매개변수에 대한 경로를 확인합니다.

어쨌든, 이를 수행하려는 방법은 설치되었는지 확인한 e4fsprogs다음 mkfs.ext4 /dev/VGora/oradata또는 를 사용하는 것입니다 mke4fs.

답변2

mkfs.ext3 -f /dev/sdb5
mkfs.ext3: invalid fragment size - /dev/sdb5

-f이 기능 없이 작업하려고 하면 RHEL5에서는 작동하지 않습니다.

mkfs.ex3 /dev/sdb5 

mkfs.ext3 /dev/sdb5
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
78856192 inodes, 157694024 blocks
7884701 blocks (5.00%) reserved for the super user

관련 정보