Solved

Solaris:  How to backup root partition on Raid 1 Volume

Posted on 2012-04-12
6
477 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
  • 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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 76

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 76

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
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…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.

759 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now