# df -k /test
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0t2d1s3 50700783 39746386 10530839 80% /test
First, you'll create a metadevice named d101 on the /test file system when it's mounted.
# metainit -f d101 1 1 c0t2d1s3
Now it's time to initialize a one-way mirror metadevice named, for example, d100, with the submirror d101 that you've already created:
# metainit d100 -m d101
# metastat d100
d100: Mirror
Submirror 0: d101
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 102961152 blocks
d101: Submirror of d100
State: Okay
Size: 102961152 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c0t2d1s3 0 No Okay
And you'll create another metadevice d102 on the new location c0t2d1s7. The size of the new partition should be the same as d101:
# metainit d102 1 1 c0t2d1s7
d102: Concat/Stripe is setup
# metastat d102
d102: Concat/Stripe
Size: 102975488 blocks
Stripe 0:
Device Start Block Dbase
c0t2d1s7 0 No
When you add the metadevice d102 as the second submirror to d100, resynchronization will automatically take place:
# metattach d100 d102
After the resynchronization has completed successfully, you should get the following two-way mirrors that indicate that the file system is ready to be backed up:
# metastat d100
d100: Mirror
Submirror 0: d101
State: Okay
Submirror 1: d102
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 102961152 blocks
d101: Submirror of d100
State: Okay
Size: 102961152 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c0t2d1s3 0 No Okay
d102: Submirror of d100
State: Okay
Size: 102961152 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c0t2d1s7 0 No Okay
You can schedule your file system backup to run any time you wish. Before you start, though, you have to detach the second metadevice d102 or bring it offline. To detach it, use:
# metadetach d100 d102
Or, to bring it offline, use:
# metaoffline d102
Remember, you're only backing up the data on the partition c0t2d1s7, which includes all the data at the point of detach.
# metattach d100 d102
or
# metaonline d102
You'll need to wait until the resynchronization is done before the next backup.
Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.
Comments (0)