diff --git a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/bootstrap/MetadataBootstrap.java b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/bootstrap/MetadataBootstrap.java
index c180be4..757694d 100644
--- a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/bootstrap/MetadataBootstrap.java
+++ b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/bootstrap/MetadataBootstrap.java
@@ -77,6 +77,7 @@
 import org.apache.hyracks.api.dataflow.value.ITypeTraits;
 import org.apache.hyracks.api.io.FileReference;
 import org.apache.hyracks.api.io.IIOManager;
+import org.apache.hyracks.storage.am.common.frames.LIFOMetaDataFrame;
 import org.apache.hyracks.storage.am.lsm.btree.impls.LSMBTree;
 import org.apache.hyracks.storage.am.lsm.btree.util.LSMBTreeUtils;
 import org.apache.hyracks.storage.am.lsm.common.api.ILSMMergePolicyFactory;
@@ -373,7 +374,7 @@
                     localResourceMetadata, LocalResource.LSMBTreeResource);
             ILocalResourceFactory localResourceFactory = localResourceFactoryProvider.getLocalResourceFactory();
             localResourceRepository.insert(localResourceFactory.createLocalResource(resourceID, resourceName,
-                    metadataPartition.getPartitionId(), absolutePath));
+                    metadataPartition.getPartitionId(), LIFOMetaDataFrame.VERSION, absolutePath));
             dataLifecycleManager.register(absolutePath, lsmBtree);
         } else {
             final LocalResource resource = localResourceRepository.getResourceByPath(absolutePath);
diff --git a/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/resource/PersistentLocalResourceFactory.java b/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/resource/PersistentLocalResourceFactory.java
index 15224e2..33e5bf2 100644
--- a/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/resource/PersistentLocalResourceFactory.java
+++ b/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/resource/PersistentLocalResourceFactory.java
@@ -33,7 +33,9 @@
     }
 
     @Override
-    public LocalResource createLocalResource(long resourceId, String resourceName, int partition, String resourcePath) {
-        return new LocalResource(resourceId, resourceName, partition, resourcePath, resourceType, localResourceMetadata);
+    public LocalResource createLocalResource(long resourceId, String resourceName, int partition, int storageVersion,
+            String resourcePath) {
+        return new LocalResource(resourceId, resourceName, partition, resourcePath, resourceType, storageVersion,
+                localResourceMetadata);
     }
 }
diff --git a/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/resource/PersistentLocalResourceRepository.java b/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/resource/PersistentLocalResourceRepository.java
index fc79ae0..420e479 100644
--- a/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/resource/PersistentLocalResourceRepository.java
+++ b/asterixdb/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/resource/PersistentLocalResourceRepository.java
@@ -40,6 +40,7 @@
 
 import org.apache.asterix.common.cluster.ClusterPartition;
 import org.apache.asterix.common.config.AsterixMetadataProperties;
+import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.common.replication.AsterixReplicationJob;
 import org.apache.asterix.common.replication.IReplicationManager;
 import org.apache.asterix.common.utils.StoragePathUtil;
@@ -49,6 +50,7 @@
 import org.apache.hyracks.api.replication.IReplicationJob.ReplicationExecutionType;
 import org.apache.hyracks.api.replication.IReplicationJob.ReplicationJobType;
 import org.apache.hyracks.api.replication.IReplicationJob.ReplicationOperation;
+import org.apache.hyracks.storage.am.common.frames.LIFOMetaDataFrame;
 import org.apache.hyracks.storage.common.file.ILocalResourceRepository;
 import org.apache.hyracks.storage.common.file.LocalResource;
 
@@ -63,6 +65,7 @@
     private static final String STORAGE_METADATA_FILE_NAME_PREFIX = ".asterix_root_metadata";
     private static final long STORAGE_LOCAL_RESOURCE_ID = -4321;
     public static final String METADATA_FILE_NAME = ".metadata";
+    public static final int STORAGE_VERSION = LIFOMetaDataFrame.VERSION;
     private final Cache<String, LocalResource> resourceCache;
     private final String nodeId;
     private static final int MAX_CACHED_RESOURCES = 1000;
@@ -136,15 +139,15 @@
 
             String storageRootDirPath;
             if (storageRootDirName.startsWith(System.getProperty("file.separator"))) {
-                storageRootDirPath = mountPoints[i] +
-                        storageRootDirName.substring(System.getProperty("file.separator").length());
+                storageRootDirPath = mountPoints[i]
+                        + storageRootDirName.substring(System.getProperty("file.separator").length());
             } else {
                 storageRootDirPath = mountPoints[i] + storageRootDirName;
             }
 
             LocalResource rootLocalResource = new LocalResource(STORAGE_LOCAL_RESOURCE_ID,
                     storageMetadataFile.getAbsolutePath(), 0, storageMetadataFile.getAbsolutePath(), 0,
-                    storageRootDirPath);
+                    LIFOMetaDataFrame.VERSION, storageRootDirPath);
             insert(rootLocalResource);
             LOGGER.log(Level.INFO, "created the root-metadata-file: " + storageMetadataFile.getAbsolutePath());
         }
@@ -309,7 +312,11 @@
         try (FileInputStream fis = new FileInputStream(file);
                 ObjectInputStream oisFromFis = new ObjectInputStream(fis)) {
             LocalResource resource = (LocalResource) oisFromFis.readObject();
-            return resource;
+            if (resource.getVersion() == PersistentLocalResourceRepository.STORAGE_VERSION) {
+                return resource;
+            } else {
+                throw new AsterixException("Storage version mismatch.");
+            }
         } catch (Exception e) {
             throw new HyracksDataException(e);
         }
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/api/ITreeIndexMetaDataFrame.java b/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/api/ITreeIndexMetaDataFrame.java
index bdfa9e1..d4fbaa2 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/api/ITreeIndexMetaDataFrame.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/api/ITreeIndexMetaDataFrame.java
@@ -22,6 +22,11 @@
 import org.apache.hyracks.storage.common.buffercache.ICachedPage;
 
 public interface ITreeIndexMetaDataFrame {
+
+    //Storage version #. Change this if you alter any tree frame formats to stop
+    // possible corruption from old versions reading new formats.
+    public static final int VERSION = 2;
+
     public void initBuffer(byte level);
 
     public void setPage(ICachedPage page);
@@ -63,6 +68,8 @@
 
     public void setLSN(long lsn);
 
+    public int getVersion();
+
     // Special placeholder for LSN information of a marker log. used for rollback information
     public long getLastMarkerLSN();
 
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/dataflow/IndexDataflowHelper.java b/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/dataflow/IndexDataflowHelper.java
index 7110e4b..2e45c7c 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/dataflow/IndexDataflowHelper.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/dataflow/IndexDataflowHelper.java
@@ -27,6 +27,7 @@
 import org.apache.hyracks.storage.am.common.api.IIndex;
 import org.apache.hyracks.storage.am.common.api.IIndexDataflowHelper;
 import org.apache.hyracks.storage.am.common.api.IIndexLifecycleManager;
+import org.apache.hyracks.storage.am.common.frames.LIFOMetaDataFrame;
 import org.apache.hyracks.storage.am.common.util.IndexFileNameUtil;
 import org.apache.hyracks.storage.common.file.ILocalResourceFactory;
 import org.apache.hyracks.storage.common.file.ILocalResourceRepository;
@@ -93,7 +94,7 @@
                 String resourceName = opDesc.getFileSplitProvider().getFileSplits()[partition].getLocalFile().getFile()
                         .getPath();
                 localResourceRepository.insert(localResourceFactory.createLocalResource(resourceID, resourceName,
-                        resourcePartition, resourcePath));
+                        resourcePartition, LIFOMetaDataFrame.VERSION, resourcePath));
             } catch (IOException e) {
                 throw new HyracksDataException(e);
             }
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/frames/LIFOMetaDataFrame.java b/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/frames/LIFOMetaDataFrame.java
index 38b43c5..d4194c2 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/frames/LIFOMetaDataFrame.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/frames/LIFOMetaDataFrame.java
@@ -32,7 +32,8 @@
 public class LIFOMetaDataFrame implements ITreeIndexMetaDataFrame {
 
     // Arbitrarily chosen magic integer.
-    protected static final int MAGIC_VALID_INT = 0x5bd1e995;
+    protected static final int OBSOLETE_MAGIC_VALID_INT = 0x5bd1e995;
+    protected static final int MAGIC_VALID_INT = 0x1B16DA7A;
 
     protected static final int TUPLE_COUNT_OFFSET = 0; //0
     protected static final int FREE_SPACE_OFFSET = TUPLE_COUNT_OFFSET + 4; //4
@@ -41,13 +42,14 @@
     protected static final int NEXT_PAGE_OFFSET = LEVEL_OFFSET + 1; // 21
     protected static final int VALID_OFFSET = NEXT_PAGE_OFFSET + 4; // 25
 
-    // The additionalFilteringPageOff is used only for LSM indexes.
+    // The ADDITIONAL_FILTERING_PAGE_OFF is used only for LSM indexes.
     // We store the page id that will be used to store the information of the the filter that is associated with a disk component.
     // It is only set in the first meta page other meta pages (i.e., with level -2) have junk in the max page field.
     private static final int ADDITIONAL_FILTERING_PAGE_OFFSET = VALID_OFFSET + 4; // 29
     public static final int LSN_OFFSET = ADDITIONAL_FILTERING_PAGE_OFFSET + 4; // 33
     private static final int LAST_MARKER_LSN_OFFSET = LSN_OFFSET + 8; // 41
-    private static final int HEADER_END_OFFSET = LAST_MARKER_LSN_OFFSET + 8;
+    public static final int STORAGE_VERSION_OFFSET = LAST_MARKER_LSN_OFFSET + 4; //45
+    private static final int HEADER_END_OFFSET = LAST_MARKER_LSN_OFFSET + 4; //49
 
     protected ICachedPage page = null;
     protected ByteBuffer buf = null;
@@ -124,6 +126,7 @@
         buf.putInt(NEXT_PAGE_OFFSET, -1);
         buf.putInt(ADDITIONAL_FILTERING_PAGE_OFFSET, -1);
         buf.putLong(LAST_MARKER_LSN_OFFSET, -1L);
+        buf.putInt(STORAGE_VERSION_OFFSET, VERSION);
         setValid(false);
     }
 
@@ -139,7 +142,7 @@
 
     @Override
     public boolean isValid() {
-        return buf.getInt(VALID_OFFSET) == MAGIC_VALID_INT;
+        return buf.getInt(VALID_OFFSET) == MAGIC_VALID_INT || buf.getInt(VALID_OFFSET) == OBSOLETE_MAGIC_VALID_INT;
     }
 
     @Override
@@ -162,6 +165,15 @@
     }
 
     @Override
+    public int getVersion() {
+        if (buf.getInt(VALID_OFFSET) == OBSOLETE_MAGIC_VALID_INT) {
+            return VERSION * -1;
+        } else {
+            return buf.getInt(STORAGE_VERSION_OFFSET);
+        }
+    }
+
+    @Override
     public long getLastMarkerLSN() {
         return buf.getLong(LAST_MARKER_LSN_OFFSET);
     }
@@ -180,4 +192,4 @@
     public void setLSMComponentFilterPageId(int filterPage) {
         buf.putInt(ADDITIONAL_FILTERING_PAGE_OFFSET, filterPage);
     }
-}
\ No newline at end of file
+}
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/freepage/LinkedMetaDataPageManager.java b/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/freepage/LinkedMetaDataPageManager.java
index 4d56a80..fbb16b2 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/freepage/LinkedMetaDataPageManager.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/freepage/LinkedMetaDataPageManager.java
@@ -473,7 +473,7 @@
     public long getLSNOffset() throws HyracksDataException {
         int metadataPageNum = getFirstMetadataPage();
         if (metadataPageNum != IBufferCache.INVALID_PAGEID) {
-            return (metadataPageNum * (long) bufferCache.getPageSize()) + LIFOMetaDataFrame.LSN_OFFSET;
+            return ((long)metadataPageNum * bufferCache.getPageSize()) + LIFOMetaDataFrame.LSN_OFFSET;
         }
         return IMetaDataPageManager.INVALID_LSN_OFFSET;
     }
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/AbstractLSMIndexFileManager.java b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/AbstractLSMIndexFileManager.java
index c5fccdc..ed9cad0 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/AbstractLSMIndexFileManager.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/AbstractLSMIndexFileManager.java
@@ -50,6 +50,12 @@
     protected static final String BLOOM_FILTER_STRING = "f";
     protected static final String TRANSACTION_PREFIX = ".T";
 
+    public enum TreeIndexState {
+        INVALID,
+        VERSION_MISMATCH,
+        VALID
+    }
+
     protected final IFileMapProvider fileMapProvider;
 
     // baseDir should reflect dataset name and partition name.
@@ -62,7 +68,7 @@
     private String prevTimestamp = null;
 
     public AbstractLSMIndexFileManager(IFileMapProvider fileMapProvider, FileReference file,
-            TreeIndexFactory<? extends ITreeIndex> treeFactory) {
+                                       TreeIndexFactory<? extends ITreeIndex> treeFactory) {
         this.baseDir = file.getFile().getPath();
         if (!baseDir.endsWith(System.getProperty("file.separator"))) {
             baseDir += System.getProperty("file.separator");
@@ -78,13 +84,13 @@
         }
     };
 
-    protected boolean isValidTreeIndex(ITreeIndex treeIndex) throws HyracksDataException {
+    protected TreeIndexState isValidTreeIndex(ITreeIndex treeIndex) throws HyracksDataException {
         IBufferCache bufferCache = treeIndex.getBufferCache();
         treeIndex.activate();
         try {
             int metadataPage = treeIndex.getMetaManager().getFirstMetadataPage();
-            if(metadataPage <0 ){
-                return false;
+            if (metadataPage < 0) {
+                return TreeIndexState.INVALID;
             }
             ITreeIndexMetaDataFrame metadataFrame = treeIndex.getMetaManager().getMetaDataFrameFactory()
                     .createFrame();
@@ -93,7 +99,13 @@
             page.acquireReadLatch();
             try {
                 metadataFrame.setPage(page);
-                return metadataFrame.isValid();
+                if (!metadataFrame.isValid()) {
+                    return TreeIndexState.INVALID;
+                } else if (metadataFrame.getVersion() != ITreeIndexMetaDataFrame.VERSION) {
+                    return TreeIndexState.VERSION_MISMATCH;
+                } else {
+                    return TreeIndexState.VALID;
+                }
             } finally {
                 page.releaseReadLatch();
                 bufferCache.unpin(page);
@@ -104,24 +116,31 @@
     }
 
     protected void cleanupAndGetValidFilesInternal(FilenameFilter filter,
-            TreeIndexFactory<? extends ITreeIndex> treeFactory, ArrayList<ComparableFileName> allFiles)
-                    throws HyracksDataException, IndexException {
+                                                   TreeIndexFactory<? extends ITreeIndex> treeFactory,
+                                                   ArrayList<ComparableFileName> allFiles)
+            throws HyracksDataException, IndexException {
         File dir = new File(baseDir);
         String[] files = dir.list(filter);
         for (String fileName : files) {
             File file = new File(dir.getPath() + File.separator + fileName);
             FileReference fileRef = new FileReference(file);
-            if (treeFactory == null || isValidTreeIndex(treeFactory.createIndexInstance(fileRef))) {
+            if (treeFactory == null) {
                 allFiles.add(new ComparableFileName(fileRef));
-            } else {
+                continue;
+            }
+            TreeIndexState idxState = isValidTreeIndex(treeFactory.createIndexInstance(fileRef));
+            if (idxState == TreeIndexState.VALID) {
+                allFiles.add(new ComparableFileName(fileRef));
+            } else if (idxState == TreeIndexState.INVALID) {
                 file.delete();
             }
         }
     }
 
     protected void validateFiles(HashSet<String> groundTruth, ArrayList<ComparableFileName> validFiles,
-            FilenameFilter filter, TreeIndexFactory<? extends ITreeIndex> treeFactory) throws HyracksDataException,
-            IndexException {
+                                 FilenameFilter filter,
+                                 TreeIndexFactory<? extends ITreeIndex> treeFactory
+    ) throws HyracksDataException, IndexException {
         ArrayList<ComparableFileName> tmpAllInvListsFiles = new ArrayList<ComparableFileName>();
         cleanupAndGetValidFilesInternal(filter, treeFactory, tmpAllInvListsFiles);
         for (ComparableFileName cmpFileName : tmpAllInvListsFiles) {
@@ -413,7 +432,7 @@
 
     /**
      * @return The string format of the current timestamp.
-     *         The returned results of this method are guaranteed to not have duplicates.
+     * The returned results of this method are guaranteed to not have duplicates.
      */
     protected String getCurrentTimestamp() {
         Date date = new Date();
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/file/ILocalResourceFactory.java b/hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/file/ILocalResourceFactory.java
index f5e7010..1b8d617 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/file/ILocalResourceFactory.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/file/ILocalResourceFactory.java
@@ -19,5 +19,6 @@
 package org.apache.hyracks.storage.common.file;
 
 public interface ILocalResourceFactory {
-    public LocalResource createLocalResource(long resourceId, String resourceName, int partition, String resourcePath);
+    public LocalResource createLocalResource(long resourceId, String resourceName, int partition, int storageVersion,
+            String resourcePath);
 }
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/file/LocalResource.java b/hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/file/LocalResource.java
index eba0119..ef69664 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/file/LocalResource.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/file/LocalResource.java
@@ -21,13 +21,14 @@
 import java.io.Serializable;
 
 public class LocalResource implements Serializable {
-    private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 2L;
     private final long resourceId;
     private final String resourceName;
     private final int partition;
     private final int resourceType;
     private final Object object;
     private String resourcePath;
+    private int storageVersion;
 
     public static final int TransientResource = 0;
     public static final int LSMBTreeResource = 1;
@@ -38,13 +39,14 @@
     public static final int ExternalBTreeWithBuddyResource = 6;
 
     public LocalResource(long resourceId, String resourceName, int partition, String resourcePath, int resourceType,
-            Object object) {
+            int storageVersion, Object object) {
         this.resourceId = resourceId;
         this.resourceName = resourceName;
         this.partition = partition;
         this.resourcePath = resourcePath;
         this.resourceType = resourceType;
         this.object = object;
+        this.storageVersion = storageVersion;
     }
 
     public long getResourceId() {
@@ -71,6 +73,10 @@
         return resourcePath;
     }
 
+    public int getVersion() {
+        return storageVersion;
+    }
+
     public void setResourcePath(String resourcePath) {
         this.resourcePath = resourcePath;
     }
diff --git a/hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/file/TransientLocalResourceFactory.java b/hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/file/TransientLocalResourceFactory.java
index 527f55e..4ace129 100644
--- a/hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/file/TransientLocalResourceFactory.java
+++ b/hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/file/TransientLocalResourceFactory.java
@@ -21,7 +21,9 @@
 public class TransientLocalResourceFactory implements ILocalResourceFactory {
 
     @Override
-    public LocalResource createLocalResource(long resourceId, String resourceName, int partition, String resourcePath) {
-        return new LocalResource(resourceId, resourceName, partition, resourcePath, LocalResource.TransientResource, null);
+    public LocalResource createLocalResource(long resourceId, String resourceName, int partition, int storageVersion,
+            String resourcePath) {
+        return new LocalResource(resourceId, resourceName, partition, resourcePath, LocalResource.TransientResource,
+                storageVersion, null);
     }
 }
