<?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: lvrduce syntax !! help !! in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/lvrduce-syntax-help/m-p/3030476#M633342</link>
    <description>This is assuming you do not have OnlineJFS and the capacity of the FS which /dev/vg01/lvol1 is mounted on is less than 80% (to ensure a succesful lvreduce operation).&lt;BR /&gt;# bdf -l|grep -e "/dev/vg01/lvol1"&lt;BR /&gt;==&amp;gt; Check if /dev/vg01/lvol1 is mounted or not. If it is you need to umount the FS first (assuming the mount point is /data).&lt;BR /&gt;# umount /data&lt;BR /&gt;==&amp;gt; If you can't umount it, it means some process is holding it. You then need to either terminate these processes or do this in single-user-mode.&lt;BR /&gt;# mkdir /temp&lt;BR /&gt;# mount /dev/vg01/lvol1 /temp&lt;BR /&gt;==&amp;gt; Next perform a full backup on /temp to tape or you can make a copy of your data to another FS (provided space is not a problem).&lt;BR /&gt;# umount /temp ; rmdir /temp&lt;BR /&gt;# vgdisplay -v vg01&lt;BR /&gt;==&amp;gt; Take note of Total PE available for c4t13d0 (if your intention is to ONLY use this disk for lvol1).&lt;BR /&gt;# lvreduce -l &lt;TOTAL-PE&gt; /dev/vg01/lvol1&lt;BR /&gt;# newfs -F vxfs /dev/vg01/rlvol1&lt;BR /&gt;# mount /dev/vg01/lvol1 /data&lt;BR /&gt;Next restore you data back to /data. I would go with Patrick's suggestion of recreating lvol1 which is much "cleaner".&lt;/TOTAL-PE&gt;</description>
    <pubDate>Tue, 22 Jul 2003 21:10:31 GMT</pubDate>
    <dc:creator>S.K. Chan</dc:creator>
    <dc:date>2003-07-22T21:10:31Z</dc:date>
    <item>
      <title>lvrduce syntax !! help !!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lvrduce-syntax-help/m-p/3030472#M633338</link>
      <description>Hello ,&lt;BR /&gt;I have 1 lv with 2 disks :&lt;BR /&gt;/dev/vg01/lvol1 with c4t13d0 (36G) and c4t1d0 (9G) . The lvol is 44G , i wan to stay just with the 36G .&lt;BR /&gt;Pls give me the full commands .&lt;BR /&gt;&lt;BR /&gt;Eran</description>
      <pubDate>Tue, 22 Jul 2003 20:36:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lvrduce-syntax-help/m-p/3030472#M633338</guid>
      <dc:creator>Chapaya</dc:creator>
      <dc:date>2003-07-22T20:36:47Z</dc:date>
    </item>
    <item>
      <title>Re: lvrduce syntax !! help !!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lvrduce-syntax-help/m-p/3030473#M633339</link>
      <description>Are there any other lvols in this VG?  If not, the easiest way is to blow it away with a vgexport.  Deactivate it first with vgchange, the use vgexport, then re-create.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 22 Jul 2003 20:41:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lvrduce-syntax-help/m-p/3030473#M633339</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2003-07-22T20:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: lvrduce syntax !! help !!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lvrduce-syntax-help/m-p/3030474#M633340</link>
      <description>I personally wouldn't lvreduce.  I would backup my data, blow away the 44 GB lvol, create a 36GB lvol and restore the data.&lt;BR /&gt;&lt;BR /&gt;So:&lt;BR /&gt;&lt;BR /&gt;1) somehow backup your data (fbackup or something)&lt;BR /&gt;&lt;BR /&gt;2) umount the dir that is mounted against vg01/lvol1&lt;BR /&gt;&lt;BR /&gt;3) lvremove /dev/vg01/lvol1&lt;BR /&gt;&lt;BR /&gt;4) lvcreate -L 34000 /dev/vg01&lt;BR /&gt;(Don't try to create a 36GB LV and expect it to stay all on the 36GB disk.  You do not have the full 36GB available on that disk)&lt;BR /&gt;&lt;BR /&gt;5) newfs -F vxfs /dev/vg01/rlvol1&lt;BR /&gt;&lt;BR /&gt;6) remount the dir to the new lvol1&lt;BR /&gt;&lt;BR /&gt;7) restore your data</description>
      <pubDate>Tue, 22 Jul 2003 20:42:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lvrduce-syntax-help/m-p/3030474#M633340</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2003-07-22T20:42:24Z</dc:date>
    </item>
    <item>
      <title>Re: lvrduce syntax !! help !!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lvrduce-syntax-help/m-p/3030475#M633341</link>
      <description>You need to cover yourself before you start.&lt;BR /&gt;&lt;BR /&gt;make_tape_recovery&lt;BR /&gt;&lt;BR /&gt;Back up your system.&lt;BR /&gt;&lt;BR /&gt;fbackup the entire system, with databases shut.  &lt;BR /&gt;&lt;BR /&gt;Now you need to get the lay of the land.&lt;BR /&gt;&lt;BR /&gt;pvdisplay -v /dev/rdsk/c4t13d0&lt;BR /&gt;&lt;BR /&gt;pvdisplay -v /dev/rdsk/c4t1d0&lt;BR /&gt;&lt;BR /&gt;Identify which logical volume needs to be removed or reduced.&lt;BR /&gt;&lt;BR /&gt;You may need to use lvremove to remove a logical volume.&lt;BR /&gt;&lt;BR /&gt;lvremove /dev/vg00/lvolname&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;now lvreduce&lt;BR /&gt;&lt;BR /&gt;lvreduce -l &lt;SIZE in="" blocks=""&gt; /dev/vg00/lvolname&lt;BR /&gt;&lt;BR /&gt;SEP&lt;BR /&gt;&lt;/SIZE&gt;</description>
      <pubDate>Tue, 22 Jul 2003 20:45:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lvrduce-syntax-help/m-p/3030475#M633341</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2003-07-22T20:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: lvrduce syntax !! help !!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lvrduce-syntax-help/m-p/3030476#M633342</link>
      <description>This is assuming you do not have OnlineJFS and the capacity of the FS which /dev/vg01/lvol1 is mounted on is less than 80% (to ensure a succesful lvreduce operation).&lt;BR /&gt;# bdf -l|grep -e "/dev/vg01/lvol1"&lt;BR /&gt;==&amp;gt; Check if /dev/vg01/lvol1 is mounted or not. If it is you need to umount the FS first (assuming the mount point is /data).&lt;BR /&gt;# umount /data&lt;BR /&gt;==&amp;gt; If you can't umount it, it means some process is holding it. You then need to either terminate these processes or do this in single-user-mode.&lt;BR /&gt;# mkdir /temp&lt;BR /&gt;# mount /dev/vg01/lvol1 /temp&lt;BR /&gt;==&amp;gt; Next perform a full backup on /temp to tape or you can make a copy of your data to another FS (provided space is not a problem).&lt;BR /&gt;# umount /temp ; rmdir /temp&lt;BR /&gt;# vgdisplay -v vg01&lt;BR /&gt;==&amp;gt; Take note of Total PE available for c4t13d0 (if your intention is to ONLY use this disk for lvol1).&lt;BR /&gt;# lvreduce -l &lt;TOTAL-PE&gt; /dev/vg01/lvol1&lt;BR /&gt;# newfs -F vxfs /dev/vg01/rlvol1&lt;BR /&gt;# mount /dev/vg01/lvol1 /data&lt;BR /&gt;Next restore you data back to /data. I would go with Patrick's suggestion of recreating lvol1 which is much "cleaner".&lt;/TOTAL-PE&gt;</description>
      <pubDate>Tue, 22 Jul 2003 21:10:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lvrduce-syntax-help/m-p/3030476#M633342</guid>
      <dc:creator>S.K. Chan</dc:creator>
      <dc:date>2003-07-22T21:10:31Z</dc:date>
    </item>
    <item>
      <title>Re: lvrduce syntax !! help !!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lvrduce-syntax-help/m-p/3030477#M633343</link>
      <description>Hi Eran&lt;BR /&gt;&lt;BR /&gt;In addition to the other replies I'd offer a slightly different approach, assuming as SK has said you do not have OnlineJFS.  I'd go with what everyone says and recreate the lvol, rather than lvreduce.&lt;BR /&gt;&lt;BR /&gt;As others have said backup the filesystem on /dev/vg01/lvol1 ( preferably twice to be sure!) and then remove it.&lt;BR /&gt;&lt;BR /&gt;1. Then create a new logical volume with 0MB of space:&lt;BR /&gt;# lvcreate /dev/vg01&lt;BR /&gt;&lt;BR /&gt;2. Check how many physical extents (PE) are available on disk /dev/dsk/c4t13d0: &lt;BR /&gt;# pvdisplay /dev/dsk/c4t13d0 &lt;BR /&gt;(Look for Total PE value - its probably around 9200 if you're using default 4 MB extent size.)&lt;BR /&gt;&lt;BR /&gt;3. Extend the logical volume you created, using all the space on /dev/dsk/c4t13d0:&lt;BR /&gt;# lvextend -l &lt;TOTAL pe=""&gt; /dev/vg01/lvol1 /dev/dsk/c4t13d0&lt;BR /&gt;(The "Total PE" is the value you got from pvdisplay in step 2.)&lt;BR /&gt;&lt;BR /&gt;4.  Create filesystem &amp;amp; mount as detailed by others.&lt;BR /&gt;&lt;BR /&gt;5.  Restore your data back to /dev/vg01/lvol1&lt;BR /&gt;&lt;BR /&gt;This will have created a new lvol1 using only the space on /dev/dsk/c4t13d0, leaving /dev/dsk/c4t1d0 free to be removed from VG or used as space for another lvol in vg01.&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;Con&lt;BR /&gt;&lt;BR /&gt;&lt;/TOTAL&gt;</description>
      <pubDate>Tue, 22 Jul 2003 23:16:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lvrduce-syntax-help/m-p/3030477#M633343</guid>
      <dc:creator>Con O'Kelly</dc:creator>
      <dc:date>2003-07-22T23:16:08Z</dc:date>
    </item>
    <item>
      <title>Re: lvrduce syntax !! help !!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lvrduce-syntax-help/m-p/3030478#M633344</link>
      <description>Its more compicate .&lt;BR /&gt;&lt;BR /&gt;The data is written on both disks ,&lt;BR /&gt;i want to seperate them .&lt;BR /&gt;&lt;BR /&gt;Eran</description>
      <pubDate>Wed, 23 Jul 2003 16:34:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lvrduce-syntax-help/m-p/3030478#M633344</guid>
      <dc:creator>Chapaya</dc:creator>
      <dc:date>2003-07-23T16:34:15Z</dc:date>
    </item>
    <item>
      <title>Re: lvrduce syntax !! help !!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lvrduce-syntax-help/m-p/3030479#M633345</link>
      <description>Eran,&lt;BR /&gt;&lt;BR /&gt;That doesn't really complicate anything.  The steps are still the same:  backup the data; blow away the lvol, re-create the lvol, restore the data.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Jul 2003 16:37:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lvrduce-syntax-help/m-p/3030479#M633345</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2003-07-23T16:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: lvrduce syntax !! help !!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lvrduce-syntax-help/m-p/3030480#M633346</link>
      <description>Eran,&lt;BR /&gt;&lt;BR /&gt;Oh, wait a minute - I see what you're saying.  You want to not use the 9GB disk (c4t1d0).  That does make it a little more complicated.  Run a pvdisplay command against that disk "pvdisplay /dev/dsk/c4t1d0".  This will tell you what logical volumes reside there.  You will need to back up, remove, re-create and restore each of them in order to free up the 9GB disk.&lt;BR /&gt;&lt;BR /&gt;Post the output of the pvdisplay command and we'll take a look.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Jul 2003 16:40:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lvrduce-syntax-help/m-p/3030480#M633346</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2003-07-23T16:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: lvrduce syntax !! help !!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lvrduce-syntax-help/m-p/3030481#M633347</link>
      <description>Eran,&lt;BR /&gt;&lt;BR /&gt;Oh, wait a minute - I see what you're saying.  You want to not use the 9GB disk (c4t1d0).  That does make it a little more complicated.  Run a pvdisplay command against that disk "pvdisplay -v /dev/dsk/c4t1d0".  This will tell you what logical volumes reside there.  You will need to back up, remove, re-create and restore each of them in order to free up the 9GB disk.&lt;BR /&gt;&lt;BR /&gt;Post the output of the pvdisplay command and we'll take a look.  Pipe it to more and just post the first part - that's all we need to see.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Jul 2003 16:42:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lvrduce-syntax-help/m-p/3030481#M633347</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2003-07-23T16:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: lvrduce syntax !! help !!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lvrduce-syntax-help/m-p/3030482#M633348</link>
      <description>Sorry about the duplication - ignore the middle post.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Jul 2003 16:43:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lvrduce-syntax-help/m-p/3030482#M633348</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2003-07-23T16:43:56Z</dc:date>
    </item>
    <item>
      <title>Re: lvrduce syntax !! help !!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lvrduce-syntax-help/m-p/3030483#M633349</link>
      <description>Eran,&lt;BR /&gt;&lt;BR /&gt;One more thought - this will add one step:&lt;BR /&gt;&lt;BR /&gt;1) backup the data&lt;BR /&gt;&lt;BR /&gt;2) lvremove the lvol&lt;BR /&gt;&lt;BR /&gt;3) vgreduce the 9GB disk out of the vg&lt;BR /&gt;&lt;BR /&gt;4) recreate the lvol&lt;BR /&gt;&lt;BR /&gt;5) restore the data&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Jul 2003 16:47:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lvrduce-syntax-help/m-p/3030483#M633349</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2003-07-23T16:47:00Z</dc:date>
    </item>
    <item>
      <title>Re: lvrduce syntax !! help !!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lvrduce-syntax-help/m-p/3030484#M633350</link>
      <description>lvreduce is not recommended to use as it may lead to file system inconsisteny and data loss.&lt;BR /&gt;lvreduce -L &lt;SPECIFY 36gb=""&gt; /dev/vg01/lvol1&lt;BR /&gt;but before doing this take backup of all the data in that lvol1.after lvreduce run fsck on the lvol1.Create a new filesystem on the remaining 9GB ,fsck and mount it.&lt;/SPECIFY&gt;</description>
      <pubDate>Sat, 26 Jul 2003 09:32:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lvrduce-syntax-help/m-p/3030484#M633350</guid>
      <dc:creator>Nagaraju Gudala</dc:creator>
      <dc:date>2003-07-26T09:32:44Z</dc:date>
    </item>
    <item>
      <title>Re: lvrduce syntax !! help !!</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/lvrduce-syntax-help/m-p/3030485#M633351</link>
      <description>Hi Eran&lt;BR /&gt;&lt;BR /&gt;Shutdown any applications that use lvol1 on vg01 and kill any processes left on the filesystem.  You can use fuser to check what processes are still using the filesystem.&lt;BR /&gt;&lt;BR /&gt;# fuser -cu /&lt;MT point=""&gt; and then use kill &lt;PID&gt; or&lt;BR /&gt;# fuser -ku /&lt;MT point=""&gt; to do it in one hit&lt;BR /&gt;&lt;BR /&gt;Now backup the data on lvol1 on vg01 using whatever backup utility you want.&lt;BR /&gt;&lt;BR /&gt;Unmount the filesystem, deactivate the volume group and vgexport it to blow it away so you can recreate the volume group, logical volume and filesystem.&lt;BR /&gt;&lt;BR /&gt;# umount &lt;MT point=""&gt;&lt;BR /&gt;# vgchange -a n /dev/vg01&lt;BR /&gt;# vgexport /dev/vg01&lt;BR /&gt;# mkdir /dev/vg01&lt;BR /&gt;# mknod /dev/vg01/group c 64 0x010000&lt;BR /&gt;# pvcreate -f /dev/rdsk/c4t13d0&lt;BR /&gt;# vgcreate /dev/vg01 /dev/dsk/c4t13d0&lt;BR /&gt;&lt;BR /&gt;Check how many free physical extents are available on the physical volume&lt;BR /&gt;&lt;BR /&gt;# pvdisplay /dev/dsk/c4t13d0&lt;BR /&gt;&lt;BR /&gt;Note the number of Free PEs&lt;BR /&gt;&lt;BR /&gt;# lvcreate -l &lt;NO of="" free="" pes=""&gt; /dev/vg01&lt;BR /&gt;# newfs -F vxfs /dev/vg01/rlvol1&lt;BR /&gt;# mount /dev/vg01/lvol1 /&lt;MT point=""&gt;&lt;BR /&gt;&lt;BR /&gt;Now restore your data.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Cheers!!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/MT&gt;&lt;/NO&gt;&lt;/MT&gt;&lt;/MT&gt;&lt;/PID&gt;&lt;/MT&gt;</description>
      <pubDate>Sat, 26 Jul 2003 10:23:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/lvrduce-syntax-help/m-p/3030485#M633351</guid>
      <dc:creator>Tim Adamson_1</dc:creator>
      <dc:date>2003-07-26T10:23:54Z</dc:date>
    </item>
  </channel>
</rss>

