Environment: - Virtual machine on VMWare ESX 4.0 - OS: fully up to date RHEL 5.8
After adding a new (virtual) disk I want to create an ext4 partition on LVM on this disk.
Steps taken so far:
$ 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
Creating an ext4 partition fails:
$ sudo /sbin/mke2fs -t ext4 /dev/VGora/oradata
mke2fs 1.39 (29-May-2006)
mke2fs: invalid blocks count - /dev/VGora/oradata
More information on the created partition:
$ 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
I can't find any relevant information on this error and don't know how to resolve this.
- How can I check the block count? and
- How can I correct it to a valid number for ext4?