Solaris: How to backup root partition on Raid 1 Volume

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

Williams225System AdministatorAsked:
Who is Participating?
 
Joseph GanSystem AdminCommented:
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
 
Joseph GanSystem AdminCommented:
Looks like you only need to backup d30 which is "root", can't see what d31 is for ?
0
 
Joseph GanSystem AdminCommented:
Frist, you need to find out tape drive interfact no, eg
# mt -f /dev/rmt/i

replace "i" from 0, 1, 2, ... respectively.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
arnoldCommented:
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
 
Williams225System AdministatorAuthor Commented:
# /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
 
arnoldCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.