Bug 700594

Summary: [RFE] RHEL6 EC2 images using the raw device instead of a partition for /
Product: Red Hat Enterprise Linux 6 Reporter: Jay Greguske <jgregusk>
Component: relengAssignee: Jay Greguske <jgregusk>
Status: CLOSED ERRATA QA Contact: wes hayutin <whayutin>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.1CC: dmach, jfenal, jgregusk, jwest, kbidarka, prc, sghai, syeghiay
Target Milestone: rcKeywords: EC2, FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Snapshot 5 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 688643 Environment:
Last Closed: 2011-06-09 15:07:23 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On: 688643    
Bug Blocks:    

Description Jay Greguske 2011-04-28 14:20:45 EDT
+++ This bug was initially created as a clone of Bug #688643 +++

Description of problem:
- Freshly deployed RHEL5.5 instances have one 6GB partition only used for / (instead of 10GB previously).
- It is impossible to resize it without rebooting (/ being mounted, partitions cannot be reloaded by the kernel, and one cannot grow a filesystem beyond the partition limit anymore)

Version-Release number of selected component (if applicable):
RHEL5.5 EC2 images

How reproducible:

Steps to Reproduce:
1. Install the RHEL5.5 AMIs on a 10GB block device
2. Try to repartition using fdisk/parted/sfdisk
3. Optionally try to reload the partition table using partprobe
4. Try to resize2fs
Actual results:
Operations 2-3 fail, operation 4 is therefore impossible.

Expected results:
No need for the steps 2-3

Additional info:

# strace kpartx -a /dev/sda
stat("/dev/sda", {st_mode=S_IFBLK|0640, st_rdev=makedev(8, 0), ...}) = 0
ioctl(3, DM_DEV_STATUS, 0x42bae60)      = -1 ENXIO (No such device or address)

# strace partprobe /dev/sda
ioctl(3, CDROMAUDIOBUFSIZ or SCSI_IOCTL_GET_IDLUN, 0x7fff3ecac5b0) = -1 EINVAL (Invalid argument)
write(2, "Error: ", 7Error: )                  = 7
write(2, "Error initialising SCSI device /"..., 59Error initialising SCSI device /dev/sda - Invalid argument
) = 59

--- Additional comment from whayutin@redhat.com on 2011-03-21 12:24:22 EDT ---

added Jay to the bug
Comment 2 wes hayutin 2011-05-25 15:54:02 EDT
[whayutin@minidoe bin]$ ssh -i ~/cloude-key.pem root@ec2-50-19-153-242.compute-1.amazonaws.com
Last login: Wed May 25 14:55:05 2011 from
[root@domU-12-31-39-09-29-E3 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/xvda             5.7G  1.6G  4.1G  28% /
none                  837M     0  837M   0% /dev/shm
[root@domU-12-31-39-09-29-E3 ~]# resize2fs 
resize2fs 1.41.12 (17-May-2010)
Usage: resize2fs [-d debug_flags] [-f] [-F] [-M] [-P] [-p] device [new_size]

[root@domU-12-31-39-09-29-E3 ~]# resize2fs -p /dev/xda1 10000M
resize2fs 1.41.12 (17-May-2010)
open: No such file or directory while opening /dev/xda1
[root@domU-12-31-39-09-29-E3 ~]# resize2fs -p /dev/xda 10000M
resize2fs 1.41.12 (17-May-2010)
open: No such file or directory while opening /dev/xda
[root@domU-12-31-39-09-29-E3 ~]# resize2fs -p /dev/xvda 10000M
resize2fs 1.41.12 (17-May-2010)
Filesystem at /dev/xvda is mounted on /; on-line resizing required
old desc_blocks = 1, new_desc_blocks = 1
Performing an on-line resize of /dev/xvda to 2560000 (4k) blocks.
The filesystem on /dev/xvda is now 2560000 blocks long.

[root@domU-12-31-39-09-29-E3 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/xvda             9.7G  1.6G  8.1G  16% /
none                  837M     0  837M   0% /dev/shm
[root@domU-12-31-39-09-29-E3 ~]#
Comment 3 errata-xmlrpc 2011-06-09 15:07:23 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.