Solved

Solaris:  How to backup root partition on Raid 1 Volume

Posted on 2012-04-12
6
488 Views
Last Modified: 2012-04-17
Hello experts,

I need to backup a solaris system (Root....) on a raid 1 Volume. I will use tape drive to perform this action.

I have never done it before, can you please give me a step by step guide, a good procedure for the output bellow?


# df -k

Filesystem            kbytes    used   avail capacity  Mounted on
/dev/md/dsk/d30      66298139 14742220 50892938    23%    /
/proc                      0       0       0     0%    /proc
mnttab                     0       0       0     0%    /etc/mnttab
fd                         0       0       0     0%    /dev/fd
swap                 2066128     152 2065976     1%    /var/run
swap                 2067168    1192 2065976     1%    /tmp

Open in new window


# /sbin/metastat

d31: Mirror
    Submirror 0: d11
      State: Okay         
    Submirror 1: d21
      State: Okay         
    Pass: 2
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 8201856 blocks (3.9 GB)

d11: Submirror of d31
    State: Okay         
    Hot spare pool: hsp002
    Size: 8201856 blocks (3.9 GB)
    Stripe 0:
	Device     Start Block  Dbase        State Reloc Hot Spare
	c2t0d0s1          0     No            Okay   Yes 


d21: Submirror of d31
    State: Okay         
    Size: 8201856 blocks (3.9 GB)
    Stripe 0:
	Device     Start Block  Dbase        State Reloc Hot Spare
	c2t1d0s1          0     No            Okay   Yes 


d30: Mirror
    Submirror 0: d10
      State: Okay         
    Submirror 1: d20
      State: Okay         
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 134628480 blocks (64 GB)

d10: Submirror of d30
    State: Okay         
    Hot spare pool: hsp001
    Size: 134628480 blocks (64 GB)
    Stripe 0:
	Device     Start Block  Dbase        State Reloc Hot Spare
	c2t0d0s0          0     No            Okay   Yes 


d20: Submirror of d30
    State: Okay         
    Size: 134628480 blocks (64 GB)
    Stripe 0:
	Device     Start Block  Dbase        State Reloc Hot Spare
	c2t1d0s0          0     No            Okay   Yes 


hsp002: 2 hot spares
	Device     Status      Length  	Reloc
        c2t2d0s1   Available    8201856 blocks	Yes
        c2t3d0s1   Available    8201856 blocks	Yes

hsp001: 2 hot spares
	Device     Status      Length  	Reloc
        c2t2d0s0   Available    134628480 blocks	Yes
        c2t3d0s0   Available    134628480 blocks	Yes

Device Relocation Information:
Device   Reloc	Device ID
c2t1d0   Yes  	id1,sd@SFUJITSU_MAW3073NCSUN72G_000614B0CPVA____DAN0P640CPVA
c2t0d0   Yes  	id1,sd@SSEAGATE_ST373207LSUN72G_3432CMRW____________3KT2CMRW
c2t2d0   Yes  	id1,sd@SSEAGATE_ST373207LSUN72G_3432CQHY____________3KT2CQHY
c2t3d0   Yes  	id1,sd@SSEAGATE_ST373207LSUN72G_3432D3YC____________3KT2D3YC

Open in new window


# /sbin/metastat -p

d31 -m d11 d21 2
d11 1 1 c2t0d0s1 -h hsp002
d21 1 1 c2t1d0s1
d30 -m d10 d20 1
d10 1 1 c2t0d0s0 -h hsp001
d20 1 1 c2t1d0s0
hsp002 c2t2d0s1 c2t3d0s1
hsp001 c2t2d0s0 c2t3d0s0

Open in new window

0
Comment
Question by:cismoney
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 16

Expert Comment

by:Joseph Gan
ID: 37840615
Looks like you only need to backup d30 which is "root", can't see what d31 is for ?
0
 
LVL 16

Expert Comment

by:Joseph Gan
ID: 37840622
Frist, you need to find out tape drive interfact no, eg
# mt -f /dev/rmt/i

replace "i" from 0, 1, 2, ... respectively.
0
 
LVL 16

Accepted Solution

by:
Joseph Gan earned 300 total points
ID: 37840628
To backup d30 "root" to the tape drive:
# ufsdump 0cfu /dev/rmt/i /dev/md/rdsk/d30

where i is the number you have found above.
0
Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

 
LVL 79

Assisted Solution

by:arnold
arnold earned 200 total points
ID: 37840633
You are missing the metadb -i which includes the partitions where the info on the metadata is stored.
http://www.bga.org/~lessem/psyc5112/usail/man/solaris/ufsdump.1.html
ufsdump is the command to backup the contents of a file system.
ufsdump 0ufb nrst0 64 /
Note the options that follow are in sequence

The nrst0, rst0. Etc refer to the same tape drive, but changes option I.e. rewind the tape, first or not, and then what compression will be used to store the data on the tape. This entry corresponds to the f option which refers to file which in unix can be tape
64 refers to the block factor option b in the line.

u updates a file where dumps are tracked.
If you are storing multiple files on the same type you must make sure to record that so that you can use options to position the tape in the correct location when trying to restore a specific data.

You can use tar, it all depends on what it is you want to achieve, but you have to maintain uniformity or you will be trying to figure out what type of data is on the tape unless you label each.

mt -t
prtconf to see what tape drive you have.

The restore if needed will use ufsrestore. You would need the position of the file.
0
 

Author Comment

by:cismoney
ID: 37840648
# /sbin/metadb

      flags            first blk      block count
     a m  p  luo          16            8192            /dev/dsk/c2t0d0s7
     a    p  luo          8208            8192            /dev/dsk/c2t0d0s7
     a    p  luo          16            8192            /dev/dsk/c2t1d0s7
     a    p  luo          8208            8192            /dev/dsk/c2t1d0s7
0
 
LVL 79

Expert Comment

by:arnold
ID: 37840659
I did not really need to see the output of metadb, but you should be aware of it. The m in the output indicates that it is the master partition. I.e. in the event that disk c2t0d0 fails you would use metadb to remove a failed drive from the replica database in addition to the replacement of the drive from the metadevice.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question