If you gave your current layout (the output of fdisk -l
will do if you don't use LVM, the output of "fdisk -l
", "pvdisplay -C
", "vgdisplay -C
" and "lvdisplay -C
" if do you use LVM) and the drive/partition you wish to grow, we could give a more accurate answer.
Assuming that by "non root volume drive" you mean a drive with a single partition that contains the volume you want to grow onto a new disk, that the old disk appears as sdb (and the partition on it sdb1), that the existing partition is an ext2 or ext3 filesystem, that the new disk is in and partitioned as a single volume (say, sdc1), and that you want to move completely to the new disk getting rid of the old, the following will work:
- Backup the data, just in case
- stop any services and other processes that are accessing the volume /dev/sdb1
- umount it
dd if=/dev/sdb1 of=/dev/sdc1
fsck /dev/sdc1 -C 0
resize2fs /dev/sdc1 -p
- Adjust any pointers to the old device (i.e. in /etc/fstab) to the new one
- Remount and restart services
- Remove the old drive next time the machine powers down. You might want to keep it a while as an emergency backup in case the new drive turns out to be a dud
edit: the "-C 0" on fsck and "-p" on resize2fs tell the respective utilities to output progress information as they do their thing. The resize operation should be pretty quick (it usually only takes a lot of time if making a volume smaller, as more data needs to be moved around in that case). If you have pv installed then you can make step 3 give you progress info too by replacing the call to dd with "pv /dev/sdb1 > /dev/sdc1"
edit 2: this is a good option for pretty full volumes as it copies block-for-block at first so doesn't need to flip drive heads around caring about filesystem structures (so the copy will happen as fast as the slower of "the speed the old drive can bulk read" and "the speed the new drive can bulk write") and it doesn't have any confusion with hard links, device nodes, or anything else special that may be in the filesystem - for volumes that are fairly empty you'll find one of the cp/cpio based methods much faster as they won't be copying all the empty blocks from disk to disk