diff --git a/libcloud/common/linode.py b/libcloud/common/linode.py
index a490af3..8b3c409 100644
--- a/libcloud/common/linode.py
+++ b/libcloud/common/linode.py
@@ -31,19 +31,6 @@ __all__ = [
 API_HOST = 'api.linode.com'
 API_ROOT = '/'
 
-# Constants that map a RAM figure to a PlanID (updated 6/28/10)
-LINODE_PLAN_IDS = {512: '1',
-                   768: '2',
-                  1024: '3',
-                  1536: '4',
-                  2048: '5',
-                  4096: '6',
-                  8192: '7',
-                 12288: '8',
-                 16384: '9',
-                 20480: '10'}
-
-
 class LinodeException(Exception):
     """Error originating from the Linode API
 
diff --git a/libcloud/compute/drivers/linode.py b/libcloud/compute/drivers/linode.py
index 786fde3..400c2c6 100644
--- a/libcloud/compute/drivers/linode.py
+++ b/libcloud/compute/drivers/linode.py
@@ -41,8 +41,7 @@ from copy import copy
 
 from libcloud.utils.py3 import PY3
 
-from libcloud.common.linode import (API_ROOT, LinodeException,
-                                    LinodeConnection, LINODE_PLAN_IDS)
+from libcloud.common.linode import (API_ROOT, LinodeException, LinodeConnection)
 from libcloud.compute.types import Provider, NodeState
 from libcloud.compute.base import NodeDriver, NodeSize, Node, NodeLocation
 from libcloud.compute.base import NodeAuthPassword, NodeAuthSSHKey
@@ -73,7 +72,6 @@ class LinodeNodeDriver(NodeDriver):
     name = "Linode"
     website = 'http://www.linode.com/'
     connectionCls = LinodeConnection
-    _linode_plan_ids = LINODE_PLAN_IDS
 
     def __init__(self, key):
         """Instantiate the driver with the given API key
@@ -84,6 +82,7 @@ class LinodeNodeDriver(NodeDriver):
         @rtype: C{None}
         """
         self.datacenter = None
+        self.plan_ids = None
         NodeDriver.__init__(self, key)
 
     # Converts Linode's state from DB to a NodeState constant.
@@ -471,6 +470,15 @@ class LinodeNodeDriver(NodeDriver):
         self.datacenter = None
         raise LinodeException(0xFD, "Invalid datacenter (use one of %s)" % dcs)
 
+    def _get_plan_id_by_ram(self, ram):
+        if not self.plan_ids:
+            self.plan_ids = self.list_sizes()
+
+        for plan in self.plan_ids:
+            if plan.ram == ram:
+                return plan.id
+        return 0
+
     def _to_nodes(self, objs):
         """Convert returned JSON Linodes into Node instances
 
@@ -488,7 +496,7 @@ class LinodeNodeDriver(NodeDriver):
                                   state=self.LINODE_STATES[o["STATUS"]],
                                   driver=self.connection.driver)
             n.extra = copy(o)
-            n.extra["PLANID"] = self._linode_plan_ids.get(o.get("TOTALRAM"))
+            n.extra["PLANID"] = self._get_plan_id_by_ram(o.get("TOTALRAM"))
             batch.append({"api_action": "linode.ip.list", "LinodeID": lid})
 
         # Avoid batch limitation
