<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://dikapediav2.com/wiki/index.php?action=history&amp;feed=atom&amp;title=EBS</id>
	<title>EBS - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://dikapediav2.com/wiki/index.php?action=history&amp;feed=atom&amp;title=EBS"/>
	<link rel="alternate" type="text/html" href="https://dikapediav2.com/wiki/index.php?title=EBS&amp;action=history"/>
	<updated>2026-04-17T15:19:54Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://dikapediav2.com/wiki/index.php?title=EBS&amp;diff=63&amp;oldid=prev</id>
		<title>Ardika Sulistija: Created page with &quot;  ====How to list and delete EBS Snapshots in Bulk==== ----  How to list all EBS snapshots: https://aws.amazon.com/premiumsupport/knowledge-center/ebs-volume-snapshot-ec2-instance/  How to delete EBS snapshots in bulk: * This deletes all EBS snapshots created before 2020-07-28:  $ for i in $(aws ec2 describe-snapshots --owner-ids self --query &#039;Snapshots[?StartTime&lt;=`2020-07-28`].SnapshotId&#039; --output text); do aws ec2 delete-snapshot --snapshot-id $i; sleep 5; done;  * An...&quot;</title>
		<link rel="alternate" type="text/html" href="https://dikapediav2.com/wiki/index.php?title=EBS&amp;diff=63&amp;oldid=prev"/>
		<updated>2024-08-27T00:09:32Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;  ====How to list and delete EBS Snapshots in Bulk==== ----  How to list all EBS snapshots: https://aws.amazon.com/premiumsupport/knowledge-center/ebs-volume-snapshot-ec2-instance/  How to delete EBS snapshots in bulk: * This deletes all EBS snapshots created before 2020-07-28:  $ for i in $(aws ec2 describe-snapshots --owner-ids self --query &amp;#039;Snapshots[?StartTime&amp;lt;=`2020-07-28`].SnapshotId&amp;#039; --output text); do aws ec2 delete-snapshot --snapshot-id $i; sleep 5; done;  * An...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
&lt;br /&gt;
====How to list and delete EBS Snapshots in Bulk====&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
How to list all EBS snapshots: https://aws.amazon.com/premiumsupport/knowledge-center/ebs-volume-snapshot-ec2-instance/&lt;br /&gt;
&lt;br /&gt;
How to delete EBS snapshots in bulk:&lt;br /&gt;
* This deletes all EBS snapshots created before 2020-07-28:&lt;br /&gt;
 $ for i in $(aws ec2 describe-snapshots --owner-ids self --query &amp;#039;Snapshots[?StartTime&amp;lt;=`2020-07-28`].SnapshotId&amp;#039; --output text); do aws ec2 delete-snapshot --snapshot-id $i; sleep 5; done;&lt;br /&gt;
&lt;br /&gt;
* Another option: This script does delete the oldest number of snapshots based on the snapshot complete time which is specified in the variable &amp;quot;count&amp;quot;.&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 # this script is to delete snapshots in bulk&lt;br /&gt;
 #retrieving snapshot IDs under an account&lt;br /&gt;
 &lt;br /&gt;
 accountID=331851643035  #your aws account ID&lt;br /&gt;
 count=4 #how many of the oldest snapshots you would like to delete&lt;br /&gt;
 file=snapshotIds.txt  # a file is created under current directory and holds snapshotIds&lt;br /&gt;
 &lt;br /&gt;
 #following filters the oldest snapshot and writes into the $file&lt;br /&gt;
 aws ec2 describe-snapshots --owner-ids $accountID | grep SnapshotId | awk &amp;#039;{print $2}&amp;#039; | sed  &amp;#039;s/&amp;quot;//g&amp;#039; | tail -$count &amp;gt;$file&lt;br /&gt;
 &lt;br /&gt;
 #Following code snippet reads snapshot IDs from the $file and delete one by one, Any error occurs logged in error.log file&lt;br /&gt;
 while IFS=&amp;#039;&amp;#039; read -r line || [[ -n $line ]]; do&lt;br /&gt;
     echo &amp;quot;Deleting snapshot --&amp;gt; $line&amp;quot;&lt;br /&gt;
     aws ec2 delete-snapshot --snapshot-id $line &amp;gt;&amp;gt;error.log 2&amp;gt;&amp;amp;1&lt;br /&gt;
 done &amp;lt; $file&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[1] Instance types - Instances built on the Nitro System &amp;lt;/br&amp;gt;&lt;br /&gt;
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances&lt;br /&gt;
&lt;br /&gt;
[2] Amazon CloudWatch Metrics for Amazon EBS - Graphs in the Amazon EC2 Console &amp;lt;/br&amp;gt;&lt;br /&gt;
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using_cloudwatch_ebs.html#graphs-in-the-aws-management-console-2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== How can I identify if my EBS volume is micro-bursting and how can I prevent this from happening?====&lt;br /&gt;
----&lt;br /&gt;
https://aws.amazon.com/premiumsupport/knowledge-center/ebs-identify-micro-bursting/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== How can I obtain metrics from Amazon CloudWatch that show the EBS throughput of my EC2 instance, and then set up an alarm that notifies me when the EC2 instance reaches the throughput limit? ====&lt;br /&gt;
----&lt;br /&gt;
https://aws.amazon.com/premiumsupport/knowledge-center/ec2-aggregate-ebs-throughput/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====EBS Benchmarking====&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Run Fio and iostat command at the same time!! &lt;br /&gt;
 iostat -xdmzt 1 600&lt;br /&gt;
&lt;br /&gt;
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/benchmark_procedures.html#UnderstandingQueueLength&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Sharing Encrypted Snapshots (KMS permissions)====&lt;br /&gt;
---- &lt;br /&gt;
&lt;br /&gt;
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-modifying-snapshot-permissions.html#share-kms-key&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Extend the partition and file system after resizing an EBS volume====&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
https://docs.aws.amazon.com/ebs/latest/userguide/recognize-expanded-volume-linux.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Other way to grow partition and extend fs====&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
 $ sudo /usr/bin/cloud-init -d single -n growpart&lt;br /&gt;
 $ sudo /usr/bin/cloud-init -d single -n resizefs&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Why df -h seem to show less than the actual size of the volume====&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
the system actually takes up a small amount of disk space. You would see that the storage device showing the 2.8T storage device in &amp;quot;lsblk&amp;quot; is showing as 2.7T under &amp;quot;df -h.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
This is because some of the storage is hidden in the different units of measurement used to report disk capacity. How this space is reported and used varies by filesystem and by tools, as well. I&amp;#039;ve found a great article breaking down essentially what happens to the &amp;quot;missing&amp;quot; storage, and why it is &amp;quot;missing&amp;quot; (This is an article from Red Hat, but is also relevant to most of, if not all Linux operating systems); [1]&lt;br /&gt;
&lt;br /&gt;
	- https://www.redhat.com/sysadmin/disk-space&lt;/div&gt;</summary>
		<author><name>Ardika Sulistija</name></author>
	</entry>
</feed>