Bug 734794 - RHEL6.1 i386 ami does not have swap partitions
RHEL6.1 i386 ami does not have swap partitions
Status: CLOSED DUPLICATE of bug 729586
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: releng (Show other bugs)
6.2
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Jay Greguske
wes hayutin
: EC2
Depends On:
Blocks: 756082
  Show dependency treegraph
 
Reported: 2011-08-31 09:41 EDT by wes hayutin
Modified: 2011-12-23 12:22 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-12-13 10:36:50 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description wes hayutin 2011-08-31 09:41:57 EDT
Description of problem:

[root@ip-10-242-203-226 ~]# wget -q -O - http://169.254.169.254/latest/dynamic/instance-identity/document
{
  "version" : "2010-08-31",
  "kernelId" : "aki-36ed075f",
  "ramdiskId" : null,
  "instanceId" : "i-c833d4a8",
  "instanceType" : "m1.small",
  "architecture" : "i386",
  "billingProducts" : [ "bp-6fa54006" ],
  "availabilityZone" : "us-east-1b",
  "accountId" : "673500695950",
  "pendingTime" : "2011-08-31T12:05:36Z",
  "devpayProductCodes" : null,
  "imageId" : "ami-0cbb4265",
  "privateIp" : "10.242.203.226",
  "region" : "us-east-1"
}[root@ip-10-242-203-226 ~]# cat /etc/fstab 
LABEL=_/   /         ext4    defaults        1 1
/dev/xvda2 /mnt      ext3    defaults,context=system_u:object_r:usr_t:s0  0 0
/dev/xvda3 swap      swap    defaults        0 0
none       /proc     proc    defaults        0 0
none       /sys      sysfs   defaults        0 0
none       /dev/pts  devpts  gid=5,mode=620  0 0
none       /dev/shm  tmpfs   defaults        0 0
[root@ip-10-242-203-226 ~]# swapon -a
swapon: /dev/xvda3: stat failed: No such file or directory
[root@ip-10-242-203-226 ~]# 



I will try to get info on the other hwp for i386, however I'm assuming small and medium have the same issue
Comment 2 Jay Greguske 2011-08-31 10:14:18 EDT
It'd be helpful to see if this a problem on RHEL 5.

RHEL 6 has a bug where xen devices start from 'e' rather than 'a'.

https://bugzilla.redhat.com/show_bug.cgi?id=729586

So /dev/xvda3 is actually being exposed as /dev/xvde3. In my trial if you change that swap fstab entry to match this behavior, swapon -a works.

RHEL 5 doesn't have this bug, so it should just work.
Comment 3 Jay Greguske 2011-08-31 10:15:48 EDT
Additionally when filing an ec2-related bug, please be sure to use the EC2 keyword.
Comment 4 Andrew Jones 2011-10-05 10:49:12 EDT
Why do AMI fstab files use devices instead of labels or uuids? I think a bug to the instance generator should be written to correct that. These types of assumptions about device naming are dangerous and unnecessary.
Comment 5 Paolo Bonzini 2011-10-06 07:20:31 EDT
In addition, /dev/xvda is _not_ being exposed as /dev/xvde, /dev/sda is.

The problem really is that we are using /dev/sda.  Is that mandated by Amazon's infrastructure or can we control this?
Comment 6 Jay Greguske 2011-10-06 09:00:46 EDT
/dev/sda is what Amazon's docs recommend. Other Linux distributions as far as I know use this convention.

http://docs.amazonwebservices.com/AWSEC2/latest/UserGuide/InstanceStorage.html
Comment 11 Jay Greguske 2011-12-13 10:36:50 EST
Closing as a dupe since this is really a symptom of bug 729586.

*** This bug has been marked as a duplicate of bug 729586 ***

Note You need to log in before you can comment on or make changes to this bug.