Hi,

Krsnendu dasa wrote on 02.01.2007 at 15:12:38 [[BackupPC-users] Using LVM - I 
want to keep backups on a separate physical drive]:
> I am using K12LTSP 6 (Fedora Core 6). When I installed it defaulted to LVM.
> Now I want to add a separate drive to store backups. How do I do it so that
> the backups are stored on the new physical drive so if there is system
> failure the backup directory is still ok.
> How do I do that?

while you *can* explicitly allocate the space for your BackupPC LV on the
second drive, even if your VG spreads out over two disks, you don't want to
do that, because in the event of a failure a VG missing a PV is bound to give
you unnecessary trouble. Instead, create a second volume group (see
vgcreate(8)) with a PV on your new drive and put your BackupPC LV in the new
VG. If you don't want to use LVM for the BackupPC filesystem, you can, of
course, simply use a native partition on the new drive. This is assuming you
don't already have a BackupPC pool that you want to keep.

As you probably do, things are slightly more complicated, but your goal is
the same: a separate VG on your new disk with the BackupPC LV in it. In this
case you don't have the option of "simply" using a native partition. I'd
recommend against that anyway, so that you can easily extend your BackupPC
pool later on or move it to another disk.

Step 1: Create a PV on your new disk (on a partition on your new disk, that
        is).
Step 2: vgextend your VG to include the new PV.
Step 3: pvmove your BackupPC LV to the new disk. Note that your kernel (or
        dm-mod kernel module) needs to include Device Mapper Mirror support
        (CONFIG_BLK_DEV_DM_MIRROR) for pvmove to work.
Step 4: vgsplit the new disk out of your VG, thus creating a second VG.
        You'll probably have to umount and lvchange -an your BackupPC LV
        first.
Step 5: Don't forget to update your /etc/fstab ;-).

All of that is not distribution specific. Your distribution may or may not
include tools to make some of that more difficult^H^H^H^H^H^H^H^H^Huser
friendly ;-).

Disclaimer: doing just about anything concerning hard disk management can,
if you're unlucky and/or do something wrong, destroy all your data. Making a
backup before proceeding is probably not an option in this case, and even
that could probably destroy your data ("dd of=/dev/source if=/dev/dest" ...).
Usually everything will work fine, but it's a good idea to know exactly what
you're doing and maybe play around with dummy VGs and PVs on your new drive
first.

Regards,
Holger

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
BackupPC-users mailing list
BackupPC-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users
http://backuppc.sourceforge.net/

Reply via email to