<?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: Disk copy on smaller target in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/disk-copy-on-smaller-target/m-p/3149364#M157286</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;pvcreate /dev/rdsk/c?t?d? ( new disk)&lt;BR /&gt;vgextend /dev/&lt;VGNAME&gt; /dev/dsk/c?t?d? ( new disk)&lt;BR /&gt;lvcreate -L &lt;SIZE in="" mb=""&gt; /dev/&lt;VGNAME&gt; /dev/dsk/c?t?d?&lt;BR /&gt;newfs /dev/&lt;VGNAME&gt;/&lt;LVOLNAME&gt;&lt;BR /&gt;mkdir /mountpoint&lt;BR /&gt;mount /dev/ &lt;VGNAME&gt;/&lt;LVOLNAME&gt; /mountpoint&lt;BR /&gt;cd /mountpoint &lt;BR /&gt;stop all prosseses active on the old lvol&lt;BR /&gt;cd fromdir ; tar cf - . | ( cd todir ; tar xf - )  &lt;BR /&gt;&lt;BR /&gt;umount /oldmount&lt;BR /&gt;umount /mountp&lt;BR /&gt;mount /dev/&lt;VGNAME&gt;/lvol /oldmount&lt;BR /&gt;lvreduce /oldlvol&lt;BR /&gt;vgreduce /dev/&lt;VGNAME&gt; /dev/dsk/4gbdisk&lt;BR /&gt;&lt;BR /&gt;Now it is free again.&lt;BR /&gt;&lt;BR /&gt;If it is your root disk, you can make an ignite tape and resintall from tape.&lt;BR /&gt;&lt;BR /&gt;Gideon &lt;BR /&gt;&lt;/VGNAME&gt;&lt;/VGNAME&gt;&lt;/LVOLNAME&gt;&lt;/VGNAME&gt;&lt;/LVOLNAME&gt;&lt;/VGNAME&gt;&lt;/VGNAME&gt;&lt;/SIZE&gt;&lt;/VGNAME&gt;</description>
    <pubDate>Fri, 19 Dec 2003 08:32:14 GMT</pubDate>
    <dc:creator>G. Vrijhoeven</dc:creator>
    <dc:date>2003-12-19T08:32:14Z</dc:date>
    <item>
      <title>Disk copy on smaller target</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disk-copy-on-smaller-target/m-p/3149362#M157284</link>
      <description>I want to make a copy from my system (lvm)disk:4.3Gbwith less than 2Gb used the destination will be a smaller disk 2Gb&lt;BR /&gt;&lt;BR /&gt;I cannot use dd&lt;BR /&gt;&lt;BR /&gt;I suppose I must copy directly after mounting the destination disk but I don't know how to create the logical volume, mount, copy...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 19 Dec 2003 08:24:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disk-copy-on-smaller-target/m-p/3149362#M157284</guid>
      <dc:creator>GARREC CLAUDE</dc:creator>
      <dc:date>2003-12-19T08:24:22Z</dc:date>
    </item>
    <item>
      <title>Re: Disk copy on smaller target</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disk-copy-on-smaller-target/m-p/3149363#M157285</link>
      <description>I would suggest a backup/restore approach using tar or find piped to cpio to capture just what you need.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Fri, 19 Dec 2003 08:27:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disk-copy-on-smaller-target/m-p/3149363#M157285</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2003-12-19T08:27:09Z</dc:date>
    </item>
    <item>
      <title>Re: Disk copy on smaller target</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disk-copy-on-smaller-target/m-p/3149364#M157286</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;pvcreate /dev/rdsk/c?t?d? ( new disk)&lt;BR /&gt;vgextend /dev/&lt;VGNAME&gt; /dev/dsk/c?t?d? ( new disk)&lt;BR /&gt;lvcreate -L &lt;SIZE in="" mb=""&gt; /dev/&lt;VGNAME&gt; /dev/dsk/c?t?d?&lt;BR /&gt;newfs /dev/&lt;VGNAME&gt;/&lt;LVOLNAME&gt;&lt;BR /&gt;mkdir /mountpoint&lt;BR /&gt;mount /dev/ &lt;VGNAME&gt;/&lt;LVOLNAME&gt; /mountpoint&lt;BR /&gt;cd /mountpoint &lt;BR /&gt;stop all prosseses active on the old lvol&lt;BR /&gt;cd fromdir ; tar cf - . | ( cd todir ; tar xf - )  &lt;BR /&gt;&lt;BR /&gt;umount /oldmount&lt;BR /&gt;umount /mountp&lt;BR /&gt;mount /dev/&lt;VGNAME&gt;/lvol /oldmount&lt;BR /&gt;lvreduce /oldlvol&lt;BR /&gt;vgreduce /dev/&lt;VGNAME&gt; /dev/dsk/4gbdisk&lt;BR /&gt;&lt;BR /&gt;Now it is free again.&lt;BR /&gt;&lt;BR /&gt;If it is your root disk, you can make an ignite tape and resintall from tape.&lt;BR /&gt;&lt;BR /&gt;Gideon &lt;BR /&gt;&lt;/VGNAME&gt;&lt;/VGNAME&gt;&lt;/LVOLNAME&gt;&lt;/VGNAME&gt;&lt;/LVOLNAME&gt;&lt;/VGNAME&gt;&lt;/VGNAME&gt;&lt;/SIZE&gt;&lt;/VGNAME&gt;</description>
      <pubDate>Fri, 19 Dec 2003 08:32:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disk-copy-on-smaller-target/m-p/3149364#M157286</guid>
      <dc:creator>G. Vrijhoeven</dc:creator>
      <dc:date>2003-12-19T08:32:14Z</dc:date>
    </item>
    <item>
      <title>Re: Disk copy on smaller target</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disk-copy-on-smaller-target/m-p/3149365#M157287</link>
      <description>If CPU cycles are available, you could try to compress the data (compress, bzip2, gzip).&lt;BR /&gt;&lt;BR /&gt;But it depends on what you want with the copy. And what you want to copy. And if you have licenses for, for instance, mirror UX.&lt;BR /&gt;&lt;BR /&gt;Is the data used on the 4.3 Gb less then the total size of the destination disk?&lt;BR /&gt;&lt;BR /&gt;What you could do:&lt;BR /&gt;1) pvcreate &lt;DESTINATION disk=""&gt;&lt;BR /&gt;2) mkdir /dev/vgtmp ; mknod /dev/vgtmp/group c 64 0x990000&lt;BR /&gt;3) vgcreate vgtmp &lt;DESTINATION disk=""&gt;&lt;BR /&gt;4) vgchange -a y vgtmp&lt;BR /&gt;5) lvcreate -l &lt;ALL extends=""&gt; vgtmp &lt;DESTINATION disk=""&gt;&lt;BR /&gt;6) newfs -F vxfs /dev/vgtmp/rlvol1&lt;BR /&gt;7) mount /dev/vgtmp/lvol1 /mnt&lt;BR /&gt;8) cd &lt;OLD mountpoint=""&gt;&lt;BR /&gt;9) cp -rp . /mnt&lt;BR /&gt;10) umount /mnt&lt;BR /&gt;11) vgexport vgtmp&lt;BR /&gt;&lt;BR /&gt;Then you can do vgimport on the system you want to use the data again.&lt;/OLD&gt;&lt;/DESTINATION&gt;&lt;/ALL&gt;&lt;/DESTINATION&gt;&lt;/DESTINATION&gt;</description>
      <pubDate>Fri, 19 Dec 2003 08:35:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disk-copy-on-smaller-target/m-p/3149365#M157287</guid>
      <dc:creator>Elmar P. Kolkman</dc:creator>
      <dc:date>2003-12-19T08:35:47Z</dc:date>
    </item>
    <item>
      <title>Re: Disk copy on smaller target</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disk-copy-on-smaller-target/m-p/3149366#M157288</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;If you are trying to amke a system image to build on another box with a smaller disk or to change the disk to a smaller one in the existing box you can use ignite.&lt;BR /&gt;first make a note of the disk usage for each filesystem&lt;BR /&gt;&lt;BR /&gt;make_recovery -A&lt;BR /&gt;&lt;BR /&gt;when you restore to the destination disk do it interactively and reduce the file system sizes to reflect the usage recorded earlier.&lt;BR /&gt;&lt;BR /&gt;I normally use this method for increasing filesystems such as root on workstations but principles should be same for decreaing.&lt;BR /&gt;&lt;BR /&gt;:-) John.</description>
      <pubDate>Fri, 19 Dec 2003 08:42:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disk-copy-on-smaller-target/m-p/3149366#M157288</guid>
      <dc:creator>John Carr_2</dc:creator>
      <dc:date>2003-12-19T08:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: Disk copy on smaller target</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/disk-copy-on-smaller-target/m-p/3149367#M157289</link>
      <description>Hi Claude,&lt;BR /&gt;&lt;BR /&gt;Since the target is smaller you cannot use dd as you've found. You can use cpio as follows:&lt;BR /&gt;&lt;BR /&gt;cd /top_dir&lt;BR /&gt;find . -depth -print | cpio -pd /new_top_dir&lt;BR /&gt;&lt;BR /&gt;Rgds,&lt;BR /&gt;Jeff</description>
      <pubDate>Fri, 19 Dec 2003 08:48:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/disk-copy-on-smaller-target/m-p/3149367#M157289</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2003-12-19T08:48:23Z</dc:date>
    </item>
  </channel>
</rss>

