11.5. Removing an Old DiskSay you have an old IDE drive on /dev/hdb. You want to remove that old disk but a lot of files are on it.
11.5.1. Distributing Old Extents to Existing Disks in Volume GroupIf you have enough free extents on the other disks in the volume group, you have it easy. Simply run
11.5.1.1. Remove the unused diskWe can now remove the old IDE disk from the volume group.
11.5.2. Distributing Old Extents to a New Replacement DiskIf you do not have enough free physical extents to distribute the old physical extents to, you will have to add a disk to the volume group and move the extents to it. 11.5.2.1. Prepare the diskFirst, you need to pvcreate the new disk to make it available to LVM. In this recipe we show that you don't need to partition a disk to be able to use it.
11.5.2.2. Add it to the volume groupAs developers use a lot of disk space this is a good volume group to add it into.
11.5.2.3. Move the dataNext we move the data from the old disk onto the new one. Note that it is not necessary to unmount the file system before doing this. Although it is *highly* recommended that you do a full backup before attempting this operation in case of a power outage or some other problem that may interrupt it. The pvmove command can take a considerable amount of time to complete and it also exacts a performance hit on the two volumes so, although it isn't necessary, it is advisable to do this when the volumes are not too busy.
11.5.2.4. Remove the unused diskWe can now remove the old IDE disk from the volume group.
Linux HOWTO full list |
|
This document, LDP HOWTO-INDEX, is copyrighted (c) 1995 - 2002 by Tim Bynum, Guylhem Aznar, Joshua Drake and Greg Ferguson. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is available at http://www.gnu.org/copyleft/fdl.html. If you have questions, please contact the LDP.
Web Design Copyright © 1999-2003. Chrisranjana Software Solutions Pvt Ltd. syndicate rss feed |