Red Hat Bugzilla – Bug 734794
RHEL6.1 i386 ami does not have swap partitions
Last modified: 2011-12-23 12:22:07 EST
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
I will try to get info on the other hwp for i386, however I'm assuming small and medium have the same issue
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'.
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.
Additionally when filing an ec2-related bug, please be sure to use the EC2 keyword.
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.
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?
/dev/sda is what Amazon's docs recommend. Other Linux distributions as far as I know use this convention.
Closing as a dupe since this is really a symptom of bug 729586.
*** This bug has been marked as a duplicate of bug 729586 ***