<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Digital Journal &#187; reducing lvm fs</title>
	<atom:link href="https://digitaljournal.sg/wp/?feed=rss2&#038;tag=reducing-lvm-fs" rel="self" type="application/rss+xml" />
	<link>https://digitaljournal.sg/wp</link>
	<description>My Digital Journal</description>
	<lastBuildDate>Mon, 20 Oct 2014 00:32:27 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
		<item>
		<title>Resizing LVM Logical Volume</title>
		<link>https://digitaljournal.sg/wp/?p=112</link>
		<comments>https://digitaljournal.sg/wp/?p=112#comments</comments>
		<pubDate>Wed, 17 Oct 2012 09:36:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips&Info]]></category>
		<category><![CDATA[increasing lvm fs]]></category>
		<category><![CDATA[reducing lvm fs]]></category>
		<category><![CDATA[resizing LVM Logical Volume]]></category>

		<guid isPermaLink="false">http://digitaljournal.sg/wp/?p=112</guid>
		<description><![CDATA[&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- Reducing(Offline):: &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- Scenario: -There is existing LVM partition 50GB in total and has been used up 5GB -We will reduce the LVM partition from 50GB to 10GB -We need to unmount the FS before we can proceed -Please do proper backup before proceed as there might be chances that you would lose your data [...]]]></description>
			<content:encoded><![CDATA[<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Reducing(Offline)::<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Scenario:</p>
<p>-There is existing LVM partition 50GB in total and has been used up 5GB<br />
-We will reduce the LVM partition from 50GB to 10GB<br />
-We need to unmount the FS before we can proceed<br />
-<em><strong>Please do proper backup before proceed as there might be chances that you would lose your data</strong></em></p>
<p>&nbsp;</p>
<p>Output from df -h /media/data:</p>
<p>Filesystem                                                     Size  Used Avail Use% Mounted on<br />
/dev/mapper/vgdata-lvdata                       50G  5.0G   42G  11% /media/data</p>
<p>&nbsp;</p>
<p>Example current usage taken from df -h is 5G and wanted to be shrunk to 10G<br />
# umount /dev/vgdata/lvdata<br />
# e2fsck -f /dev/vgdata/lvdata<br />
# resize2fs /dev/vgdata/lvdata 8G<br />
# e2fsck -f /dev/vgdata/lvdata<br />
# lvreduce -L 10G /dev/vgdata/lvdata<br />
# e2fsck -f /dev/vgdata/lvdata<br />
# resize2fs /dev/vgdata/lvdata<br />
# e2fsck -f /dev/vgdata/lvdata<br />
# mount -a</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Increasing(online)::<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Scenario:<br />
-We would like to increase /add in another 5GB to /dev/vgdata/lvdata</p>
<p>lvextend -L +5G /dev/vgdata/lvdata<br />
resize2fs /dev/vgdata/lvdata</p>
]]></content:encoded>
			<wfw:commentRss>https://digitaljournal.sg/wp/?feed=rss2&#038;p=112</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
