<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: lvreduce in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/lvreduce/m-p/4764021#M549082</link>
    <description>Hi:&lt;BR /&gt;&lt;BR /&gt;In the absence of OnlineJFS you need to backup your filesystem; lvreduce the logical volume's size; 'newfs' the filesystem; and restore the contents of the backup.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
    <pubDate>Fri, 11 Mar 2011 05:45:12 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2011-03-11T05:45:12Z</dc:date>
    <item>
      <title>lvreduce</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lvreduce/m-p/4764020#M549081</link>
      <description>Hi Admins,&lt;BR /&gt;&lt;BR /&gt;B.11.23&lt;BR /&gt;&lt;BR /&gt;What is the exact procedure of reducing LVs.I know we have to shrink FS before reducing the LV.No online JFS is available with me.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance&lt;BR /&gt;himacs</description>
      <pubDate>Fri, 11 Mar 2011 05:31:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lvreduce/m-p/4764020#M549081</guid>
      <dc:creator>himacs</dc:creator>
      <dc:date>2011-03-11T05:31:11Z</dc:date>
    </item>
    <item>
      <title>Re: lvreduce</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lvreduce/m-p/4764021#M549082</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;In the absence of OnlineJFS you need to backup your filesystem; lvreduce the logical volume's size; 'newfs' the filesystem; and restore the contents of the backup.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 11 Mar 2011 05:45:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lvreduce/m-p/4764021#M549082</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2011-03-11T05:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: lvreduce</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lvreduce/m-p/4764022#M549083</link>
      <description>Hi JRF,&lt;BR /&gt;&lt;BR /&gt;Actually i don want to restore any data.M working in a test machine now.&lt;BR /&gt;&lt;BR /&gt;1.Create 320 MB lv&lt;BR /&gt;&lt;BR /&gt;/dev/vg02/test      327680    1812  305508    1% /test&lt;BR /&gt;&lt;BR /&gt;2.umount /test&lt;BR /&gt;&lt;BR /&gt;3.lvreduce -L 160 /dev/vg02/test&lt;BR /&gt;Warning: The Logical Volume has a file system larger than the reduced size.&lt;BR /&gt;Reducing the Logical Volume will cause filesystem corruption.&lt;BR /&gt;When a logical volume is reduced useful data might get lost;&lt;BR /&gt;do you really want the command to proceed (y/n) : y&lt;BR /&gt;Logical volume "/dev/vg02/test" has been successfully reduced.&lt;BR /&gt;Volume Group configuration for /dev/vg02 has been saved in /etc/lvmconf/vg02.conf&lt;BR /&gt;&lt;BR /&gt;4. extendfs -F vxfs /dev/vg02/rtest&lt;BR /&gt;UX:vxfs extendfs: ERROR: V-3-20139: Only expansion allowed.&lt;BR /&gt;&lt;BR /&gt;lvdisplay shows size reduced to 160MB.But not able to mount.&lt;BR /&gt;&lt;BR /&gt;NO data resides in /test.&lt;BR /&gt;&lt;BR /&gt;now i want to mount /test with new size.&lt;BR /&gt;&lt;BR /&gt;Please suggest&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;himacs&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 11 Mar 2011 05:58:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lvreduce/m-p/4764022#M549083</guid>
      <dc:creator>himacs</dc:creator>
      <dc:date>2011-03-11T05:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: lvreduce</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lvreduce/m-p/4764023#M549084</link>
      <description>You cannot shrink the file system, hence a lvreduce destroys the existing filesystem.&lt;BR /&gt;&lt;BR /&gt;A newfs only makes it valid again.</description>
      <pubDate>Fri, 11 Mar 2011 06:01:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lvreduce/m-p/4764023#M549084</guid>
      <dc:creator>Torsten.</dc:creator>
      <dc:date>2011-03-11T06:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: lvreduce</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lvreduce/m-p/4764024#M549085</link>
      <description>Hi Torsten,&lt;BR /&gt;&lt;BR /&gt;But long back i opened a case with HP regarding lvreduce.But their answer was we can reduce.&lt;BR /&gt;&lt;BR /&gt;I am also read in all HP document that lvreduce will cause data loss.But i am very much sure that we can reduce raw file system without data loss.&lt;BR /&gt;&lt;BR /&gt;So  i cant mount /test with new size.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;himacs</description>
      <pubDate>Fri, 11 Mar 2011 06:08:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lvreduce/m-p/4764024#M549085</guid>
      <dc:creator>himacs</dc:creator>
      <dc:date>2011-03-11T06:08:59Z</dc:date>
    </item>
    <item>
      <title>Re: lvreduce</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lvreduce/m-p/4764025#M549086</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;for that you required online JFS installed on your system.&lt;BR /&gt;&lt;BR /&gt;please check with swlist command.</description>
      <pubDate>Fri, 11 Mar 2011 06:18:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lvreduce/m-p/4764025#M549086</guid>
      <dc:creator>sarfaraj ahmad</dc:creator>
      <dc:date>2011-03-11T06:18:47Z</dc:date>
    </item>
    <item>
      <title>Re: lvreduce</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lvreduce/m-p/4764026#M549087</link>
      <description>&amp;gt;&amp;gt; I am also read in all HP document that lvreduce will cause data loss&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;This is what you currently see.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;You need to have online JFS to reduce the file system first. Otherwise you destroy it.</description>
      <pubDate>Fri, 11 Mar 2011 06:24:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lvreduce/m-p/4764026#M549087</guid>
      <dc:creator>Torsten.</dc:creator>
      <dc:date>2011-03-11T06:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: lvreduce</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lvreduce/m-p/4764027#M549088</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;yes, it will decrease the number of the logical extents of a logical volume to the desired value.&lt;BR /&gt;&lt;BR /&gt;But LVM does not store any information about which physical extents within a logical volume contain useful data, therefore, reducing the space allocated to a logical volume without doing a prior backup of the data could lead to the loss of useful data. The lvreduce command on a logical volume containing a file system of greater length than the size being reduced to will cause data corruption.&lt;BR /&gt;&lt;BR /&gt;Hence, it is recommended to decrease/increase filesystem size with online JFS installed.&lt;BR /&gt;&lt;BR /&gt;Rgds...</description>
      <pubDate>Fri, 11 Mar 2011 10:15:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lvreduce/m-p/4764027#M549088</guid>
      <dc:creator>P Arumugavel</dc:creator>
      <dc:date>2011-03-11T10:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: lvreduce</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lvreduce/m-p/4764028#M549089</link>
      <description>Hi himacs,&lt;BR /&gt;&lt;BR /&gt;If you don't decrease the filesystem first, you will end up with a corrupt filesystem after you decrease the logical volume. That's your case now. Thank god this is only a test system.&lt;BR /&gt;&lt;BR /&gt;You can imagine a logical volume as a container to the filesystem. If the container is smaller then the filesystem itself, it will somehow corrupt the filesystem and you'll lose data.</description>
      <pubDate>Fri, 11 Mar 2011 12:21:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lvreduce/m-p/4764028#M549089</guid>
      <dc:creator>Viktor Balogh</dc:creator>
      <dc:date>2011-03-11T12:21:41Z</dc:date>
    </item>
    <item>
      <title>Re: lvreduce</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lvreduce/m-p/4764029#M549090</link>
      <description>I am not sure what you mean about not restoring the data. You said it was a test machine. If you do not care about the data, then the task is quite simple and most of the steps you posted are correct:&lt;BR /&gt; &lt;BR /&gt;&amp;gt; 1.Create 320 MB lv&lt;BR /&gt; &lt;BR /&gt;1a. mount /dev/vg02/test /test&lt;BR /&gt; &lt;BR /&gt;&amp;gt; /dev/vg02/test 327680 1812 305508 1% /test&lt;BR /&gt;&amp;gt; 2.umount /test&lt;BR /&gt;&amp;gt; 3.lvreduce -L 160 /dev/vg02/test&lt;BR /&gt;&amp;gt; Warning: ...&lt;BR /&gt; &lt;BR /&gt;Go ahead and reduce the lvol.&lt;BR /&gt; &lt;BR /&gt;&amp;gt; 4. extendfs -F vxfs /dev/vg02/rtest&lt;BR /&gt; &lt;BR /&gt;Not correct. As the message states, this is used to extend the filesystem, not reduce it.&lt;BR /&gt; &lt;BR /&gt;&amp;gt; lvdisplay shows size reduced to 160MB.But not able to mount. NO data resides in /test.&lt;BR /&gt; &lt;BR /&gt;This is the part where I am confused. Are you saying that you don't want the data in the filesystem? If yes, then step 4 will be:&lt;BR /&gt; &lt;BR /&gt;4. newfs /dev/vg02/rtest&lt;BR /&gt; &lt;BR /&gt;and now you can mount the empty filesystem with the new size.&lt;BR /&gt; &lt;BR /&gt;However, if you have data that you must keep on this filesystem, you MUST backup the data first. Then umount, lvreduce, newfs and mount the empty filesystem. Now restore your data.&lt;BR /&gt; &lt;BR /&gt;Because you do not have Online JFS, reducing a filesystem will ALWAYS destroy (corrupt, scramble, etc) the data. That is why you must purchase the optional product.&lt;BR /&gt;</description>
      <pubDate>Fri, 11 Mar 2011 12:31:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lvreduce/m-p/4764029#M549090</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2011-03-11T12:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: lvreduce</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lvreduce/m-p/4764030#M549091</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Adding to P... the L.V is the "container" of the filesystem and if the container doesn't contain the whole filesystem in the course of event that caused you to reduce it, it leads to loss of data. The document you have read is probably for online JFS which is shipped with some environments. However without online JFS....&lt;BR /&gt;&lt;BR /&gt;tar -c /exampleitrc&lt;BR /&gt;umount /exampeitrc&lt;BR /&gt;newfs -F vxfs -s {size in blocks} /dev/vg01/rexampleitrc&lt;BR /&gt;tar -x /exampleitrc&lt;BR /&gt;bdf /exampleitrc.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Ismail Azad</description>
      <pubDate>Fri, 11 Mar 2011 12:31:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lvreduce/m-p/4764030#M549091</guid>
      <dc:creator>Ismail Azad</dc:creator>
      <dc:date>2011-03-11T12:31:59Z</dc:date>
    </item>
  </channel>
</rss>

