restore multiple disks from a server

Messages about how to use partimage across a network (with the partimaged server, samba, nfs, ...)

Moderator: feffer

openmind
Posts: 3
Joined: Fri Apr 24, 2009 7:23 am

restore multiple disks from a server

Postby openmind » Fri Apr 24, 2009 7:45 am

Hello,
I'm newbie here and sorry for my english.
We are using sucessfully the patimage across the network but I have a small problem:
How can I make an image server who has partitions on 2 hdd. The servers harddisk looks like:
df -h
/dev/sda
/dev/sdb

The partimage make the image of /dev/sda. How can i tell to partimage to make an image to all harddrives from the server?
Here we have a part of the script what runs from pxe server:

Code: Select all

sdaInfo=`fdisk -l /dev/sda | wc -l`
echo $sdaInfo
echo $sdaInfo >> out


if [ "$sdaInfo" = "0" ]
then
firstDevice="/dev/sdb"
fi
if [ "$sdaInfo" != "0" ]
then
firstDevice="/dev/sda"
fi

echo 'firstDevice: '${firstDevice} >> /out
echo 'firstDevice: '${firstDevice}


[/code]

feffer
Posts: 126
Joined: Tue Mar 17, 2009 4:30 am

Postby feffer » Fri Apr 24, 2009 5:18 pm

I'm confused about your configuration. Are you trying to back up a client machine with two partitions, /dev/sda and /dev/sdb to a server? If so, remember that partimage will only work on unmounted partitions. As a result, if you boot into /dev/sdb on the client, you will be able to make an image of /dev/sda (the unmounted partition), but not /dev/sdb (the booted partition).

If this is your configuration, you could make two scripts and run them on alternating nights. Maybe I'm misunderstanding your set up, if so could you please explain again with more detail?

Regards,
feffer

openmind
Posts: 3
Joined: Fri Apr 24, 2009 7:23 am

Postby openmind » Sat Apr 25, 2009 8:15 am

Hi,
thanks for reply.
We are running partimage integrated into a pxe server. We have many servers to reinstall. So, we made an image of each hardware specs of the server. And when we need to reinstall it, we boot the server from our pxe and reimage the server.
The problem is:
I wanna know, how I need to make the script to image the both harddrives from the server without to give commands to partimage to do it.
So,after it will finish to image the /dev/sda, to start to image /dev/sdb

feffer
Posts: 126
Joined: Tue Mar 17, 2009 4:30 am

Postby feffer » Sat Apr 25, 2009 8:47 pm

I'm not really familiar with the pxe server -- network architecture, but here are some things to consider. As I mentioned, partimage will only image unmounted partitions, so that must be true in your setup. If one of your target drives is mounted and active, and the other unmounted and inactive, you'll only be able to image the inactive one. Maybe you can figure out a way to alternate these, but that is really more of a pxe environment question than a partimage one. If you can figure that out, or if both of your target partitions are inactive I posted a script in the Automating partimage with cron thread that should help you. The script will run partimage in "fully-batch" mode. That means you won't get the ncurses dialog, it will run automatically w/o intervention, even from cron. You might be able to use it to image /dev/sda and then do "&& partimage-script-targeting-dev-sdb" Hope that helps.

btw, openmind I see other posters have tried to do what you are attempting, so if you are successful in getting this to work, please post your code and notes. I'm sure many people would be grateful.

regards,
feffer


Return to “Usage across network”

Who is online

Users browsing this forum: No registered users and 2 guests