<?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: Linux:  Move data to a new smaller LUN in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/linux-move-data-to-a-new-smaller-lun/m-p/4644290#M41066</link>
    <description>&amp;gt; we need to keep the same filesytem name.&lt;BR /&gt;&lt;BR /&gt;Linux ext2/ext3 filesystems have an actual filesystem name, but it isn't usually visible to the users or normal applications at all. You can use "tune2fs -L" to change it while the filesystem is not mounted.&lt;BR /&gt;&lt;BR /&gt;But I guess you meant the mount point name, or the volume group name.&lt;BR /&gt;&lt;BR /&gt;Keeping the same mount point name is rather simple:&lt;BR /&gt;1.) mount the new LUN to a temporary location, for example /mnt&lt;BR /&gt;&lt;BR /&gt;2.) use "cp -a" or equivalent to copy the data from the old LUN to the filesystem in the temporary location&lt;BR /&gt;&lt;BR /&gt;3.) Set the ownership and permissions of /mnt to match the ownership and permissions to match the old mountpoint.&lt;BR /&gt;&lt;BR /&gt;4.) unmount the old LUN and the new LUN&lt;BR /&gt;&lt;BR /&gt;5.) edit /etc/fstab so that the new LUN automatically mounts into the old mountpoint instead of the old LUN&lt;BR /&gt;&lt;BR /&gt;6.) mount the new LUN into the old mountpoint: the users and applications should see all files exactly as before.&lt;BR /&gt;&lt;BR /&gt;7.) if you need to do any clean-up, you can mount the old LUN to a temporary location; or you can just un-present it if you don't need it any more.&lt;BR /&gt;&lt;BR /&gt;If the problem is the VG name, it can be solved by using the "vgrename" command. A VG must be deactivated first (unmount all filesystems, vgchange -a n &lt;VG_NAME&gt;) before it can be renamed.&lt;BR /&gt;&lt;BR /&gt;MK&lt;/VG_NAME&gt;</description>
    <pubDate>Wed, 09 Jun 2010 03:49:53 GMT</pubDate>
    <dc:creator>Matti_Kurkela</dc:creator>
    <dc:date>2010-06-09T03:49:53Z</dc:date>
    <item>
      <title>Linux:  Move data to a new smaller LUN</title>
      <link>https://community.hpe.com/t5/operating-system-linux/linux-move-data-to-a-new-smaller-lun/m-p/4644284#M41060</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;We have a 150GB LUN that only 6GB are used and needed.  Therefore, a 20GB LUN has been presented to the system and we have to move the data from the 150GB to the 20GB.  &lt;BR /&gt;&lt;BR /&gt;Any suggestions on how to do this?  I know with HP-UX we always mirrored and then broke the mirrors...but when I did that it was always to a LUN of equal size.</description>
      <pubDate>Tue, 08 Jun 2010 13:16:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/linux-move-data-to-a-new-smaller-lun/m-p/4644284#M41060</guid>
      <dc:creator>Coolmar</dc:creator>
      <dc:date>2010-06-08T13:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: Linux:  Move data to a new smaller LUN</title>
      <link>https://community.hpe.com/t5/operating-system-linux/linux-move-data-to-a-new-smaller-lun/m-p/4644285#M41061</link>
      <description>if you can take a application shutdown, just bring down applications and/or databases.&lt;BR /&gt;Make a new mount point and copy everything from the old to the new.  Unmount both the old and the new file system.&lt;BR /&gt;Fix the fstab to mount the new smaller file system where the old large one was.  Then fix the fstab to mount the old large one to a temporary name (like old_mount).  Then remount both of them, and make sure same number of files, etc.  Then make sure you've got the new smaller one where the old used to be, and restart your applications.&lt;BR /&gt;&lt;BR /&gt;The get rid of the old mount, lvol, LUN (if desired), etc.</description>
      <pubDate>Tue, 08 Jun 2010 13:36:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/linux-move-data-to-a-new-smaller-lun/m-p/4644285#M41061</guid>
      <dc:creator>TwoProc</dc:creator>
      <dc:date>2010-06-08T13:36:24Z</dc:date>
    </item>
    <item>
      <title>Re: Linux:  Move data to a new smaller LUN</title>
      <link>https://community.hpe.com/t5/operating-system-linux/linux-move-data-to-a-new-smaller-lun/m-p/4644286#M41062</link>
      <description>make a tar out of this 6GB files, then untar to the new locaiton. Make sure there is no I/O during this so no data will be lost. It should just take a couple of minutes.</description>
      <pubDate>Tue, 08 Jun 2010 13:49:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/linux-move-data-to-a-new-smaller-lun/m-p/4644286#M41062</guid>
      <dc:creator>John Guster</dc:creator>
      <dc:date>2010-06-08T13:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: Linux:  Move data to a new smaller LUN</title>
      <link>https://community.hpe.com/t5/operating-system-linux/linux-move-data-to-a-new-smaller-lun/m-p/4644287#M41063</link>
      <description>we need to keep the same filesytem name.  What about a pvmove?</description>
      <pubDate>Tue, 08 Jun 2010 13:57:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/linux-move-data-to-a-new-smaller-lun/m-p/4644287#M41063</guid>
      <dc:creator>Coolmar</dc:creator>
      <dc:date>2010-06-08T13:57:29Z</dc:date>
    </item>
    <item>
      <title>Re: Linux:  Move data to a new smaller LUN</title>
      <link>https://community.hpe.com/t5/operating-system-linux/linux-move-data-to-a-new-smaller-lun/m-p/4644288#M41064</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;dd will work.&lt;BR /&gt;&lt;BR /&gt;apps down though.&lt;BR /&gt;&lt;BR /&gt;If its a cooked file system and apps are down cp -rp will work.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Tue, 08 Jun 2010 17:51:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/linux-move-data-to-a-new-smaller-lun/m-p/4644288#M41064</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2010-06-08T17:51:09Z</dc:date>
    </item>
    <item>
      <title>Re: Linux:  Move data to a new smaller LUN</title>
      <link>https://community.hpe.com/t5/operating-system-linux/linux-move-data-to-a-new-smaller-lun/m-p/4644289#M41065</link>
      <description>I don't think pvmove is gonna do it for you.  It'll just move a pv to another lvm.  The sizing problems would just come from the old pv right into the new volume group.</description>
      <pubDate>Tue, 08 Jun 2010 22:31:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/linux-move-data-to-a-new-smaller-lun/m-p/4644289#M41065</guid>
      <dc:creator>TwoProc</dc:creator>
      <dc:date>2010-06-08T22:31:53Z</dc:date>
    </item>
    <item>
      <title>Re: Linux:  Move data to a new smaller LUN</title>
      <link>https://community.hpe.com/t5/operating-system-linux/linux-move-data-to-a-new-smaller-lun/m-p/4644290#M41066</link>
      <description>&amp;gt; we need to keep the same filesytem name.&lt;BR /&gt;&lt;BR /&gt;Linux ext2/ext3 filesystems have an actual filesystem name, but it isn't usually visible to the users or normal applications at all. You can use "tune2fs -L" to change it while the filesystem is not mounted.&lt;BR /&gt;&lt;BR /&gt;But I guess you meant the mount point name, or the volume group name.&lt;BR /&gt;&lt;BR /&gt;Keeping the same mount point name is rather simple:&lt;BR /&gt;1.) mount the new LUN to a temporary location, for example /mnt&lt;BR /&gt;&lt;BR /&gt;2.) use "cp -a" or equivalent to copy the data from the old LUN to the filesystem in the temporary location&lt;BR /&gt;&lt;BR /&gt;3.) Set the ownership and permissions of /mnt to match the ownership and permissions to match the old mountpoint.&lt;BR /&gt;&lt;BR /&gt;4.) unmount the old LUN and the new LUN&lt;BR /&gt;&lt;BR /&gt;5.) edit /etc/fstab so that the new LUN automatically mounts into the old mountpoint instead of the old LUN&lt;BR /&gt;&lt;BR /&gt;6.) mount the new LUN into the old mountpoint: the users and applications should see all files exactly as before.&lt;BR /&gt;&lt;BR /&gt;7.) if you need to do any clean-up, you can mount the old LUN to a temporary location; or you can just un-present it if you don't need it any more.&lt;BR /&gt;&lt;BR /&gt;If the problem is the VG name, it can be solved by using the "vgrename" command. A VG must be deactivated first (unmount all filesystems, vgchange -a n &lt;VG_NAME&gt;) before it can be renamed.&lt;BR /&gt;&lt;BR /&gt;MK&lt;/VG_NAME&gt;</description>
      <pubDate>Wed, 09 Jun 2010 03:49:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/linux-move-data-to-a-new-smaller-lun/m-p/4644290#M41066</guid>
      <dc:creator>Matti_Kurkela</dc:creator>
      <dc:date>2010-06-09T03:49:53Z</dc:date>
    </item>
    <item>
      <title>Re: Linux:  Move data to a new smaller LUN</title>
      <link>https://community.hpe.com/t5/operating-system-linux/linux-move-data-to-a-new-smaller-lun/m-p/4644291#M41067</link>
      <description>Are you using LVM to manage the filesystem ?&lt;BR /&gt;If so&lt;BR /&gt;pvcreate /dev/newlun&lt;BR /&gt;vgextend your_vg /dev/newlun&lt;BR /&gt;pvmove /dev/oldlun /dev/newlun&lt;BR /&gt;vgreduce your_vg /dev/oldlun&lt;BR /&gt;pvremove /dev/oldlun.&lt;BR /&gt;&lt;BR /&gt;If you are not using LVM then the best option is to:&lt;BR /&gt;1) Stop apps/db/anything using files on the old filesystem&lt;BR /&gt;2) format a similar filesystem on the new lun&lt;BR /&gt;3) Mount the new lun to some dir (like /mnt/newfs) and make sure it has the same perms as the old filesystem.&lt;BR /&gt;4) Use rsync to copy the files:&lt;BR /&gt;rsync -avzp /old_fs /mnt/newfs&lt;BR /&gt;5) umount both the old and new filesystems&lt;BR /&gt;6) modify /etc/fstab so the filesystem points to the new lun&lt;BR /&gt;7) mount the new filesystem on the correct mountpoint.&lt;BR /&gt;8) start your apps&lt;BR /&gt;9) Be happy.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 11 Jun 2010 18:43:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/linux-move-data-to-a-new-smaller-lun/m-p/4644291#M41067</guid>
      <dc:creator>Gerardo Arceri</dc:creator>
      <dc:date>2010-06-11T18:43:49Z</dc:date>
    </item>
    <item>
      <title>Re: Linux:  Move data to a new smaller LUN</title>
      <link>https://community.hpe.com/t5/operating-system-linux/linux-move-data-to-a-new-smaller-lun/m-p/4644292#M41068</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;It occurred to me that you could use resize2fs to reduce the file system size. You could then use lvreduce on the logical volume and get it the same size as the new target disk.&lt;BR /&gt;&lt;BR /&gt;This would open up many more replication options.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Fri, 11 Jun 2010 19:24:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/linux-move-data-to-a-new-smaller-lun/m-p/4644292#M41068</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2010-06-11T19:24:09Z</dc:date>
    </item>
  </channel>
</rss>

