0

We have a physical RedHat server with two 60GB local disks, and two RAID 1 devices on them. There are also a few multipathed SAN luns.

Disk /dev/sda: 60.0 GB, 60022480896 bytes

Device     Boot     Start         End      Blocks   Id  System
/dev/sda1   *           1        2628    21101568   fd  Linux raid autodetect
/dev/sda2            2628        4598    15825920   fd  Linux raid autodetect
/dev/sda3            4598        7298    21686272   82  Linux swap / Solaris


Disk /dev/sdb: 60.0 GB, 60022480896 bytes

Device    Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1        2628    21101568   fd  Linux raid autodetect
/dev/sdb2            2628        4598    15825920   fd  Linux raid autodetect


cat /proc/mdstat
Personalities : [raid1]
md1 : active raid1 sda2[0] sdb2[1]
  15824828 blocks super 1.1 [2/2] [UU]
  bitmap: 1/1 pages [4KB], 65536KB chunk

md0 : active raid1 sda1[0] sdb1[1]
  21101496 blocks super 1.0 [2/2] [UU]
  bitmap: 1/1 pages [4KB], 65536KB chunk

 unused devices: <none>

Filesystem    Size  Used Avail Use% Mounted on
/dev/md0      20G   9.0G  9.9G  48% /
/dev/md1      15G    13G  1.2G  92% /u01


The server is located in a vendor site, so we dont have direct access. We are planning to upgrade the OS from 6.3 to 6.5 and would like to take a backup of the root FS, in case we need to revert back. If this were a VM, we could take a snapshot before patching. Since this is a client system, we dont have permission to install any third party tools.

I have a few thoughts in mind, but am not sure if it is the right approach.

  • Do either a rsync,tar,cp or dd of the FS or device
  • Copy across the image to 'somewhere'. Not sure if I can copy to a lun, because multipath devices may not be accessible in rescue mode
  • In case a restore is needed, boot into rescue and restore from saved image

Does this sound right? Where would that 'somewhere' be?

Thank you.

0

I'd go for the dd option. Because that makes sure you have a "snapshot" like state of the disk including the master boot record and your partition table. If restoring you can write the image right back to the disk, without the need for partitioning or fiddling with grub.

The "somewhere" should be any fast and reliable storage you can mount into the rescue system. Like NFS, SCP (using sshfs with fuse) or a Samba share. If the rescue system supports it even something like Amazon S3 should be possible. If you have a fast uplink the "where" doesn't matter that much. If you have a slower uplink I'd suggest to focus on a storage available in the data center.

Perhaps you are able to check the possibilities of the rescue image. At the moment the SAN seem to be a good option. If you can compile a list of possible storage backends for the rescue system we can help you choose the easiest option.

|improve this answer|||||
  • - From the running system note wwid of the lun which you can potentially use to save the backup - Boot into rescue mode and don't mount FS (choose skip) - Mount the potential backup location into, say /tmp/mount. To find out the disk id, go to /dev/disk/by-id/. On the 6.x iso, rescue mode loads dm-multipath, so your disks are ready to be mounted - dd if=/dev/<1st disk> conv=sync,noerror bs=64K | gzip -c > /tmp/mount/disk1.img.gz. Repeat for 2nd disk - To restore: ` gunzip -c /tmp/mount/disk1.img.gz | dd of=/dev/<1st disk>. Repeat for 2nd disk – Dave Dec 12 '14 at 2:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.