Beruflich Dokumente
Kultur Dokumente
1)
InthisDocument
Goal
Solution
APPLIESTO:
SolarisSPARCOperatingSystemVersion103/05to11.1[Release10.0to11.0]
Solarisx64/x86OperatingSystemVersion103/05to11.1[Release10.0to11.0]
Informationinthisdocumentappliestoanyplatform.
GOAL
HowtomirroravolumeusingZFS:
Inourexample,westartwiththisnonredundantconfiguration:
pool:tank
state:ONLINE
scrub:nonerequested
config:
NAMESTATEREADWRITECKSUM
tankONLINE000
c6t0d0ONLINE000
c6t1d0ONLINE000
errors:Noknowndataerrors
ThegoalistoaddtwoLUNstoourpool(inourexamplewewilladdc7t0d0andc7t1d0)
inawayweendupwiththisconfiguration:
pool:tank
state:ONLINE
scrub:nonerequested
config:
NAMESTATEREADWRITECKSUM
tankONLINE000
mirror0ONLINE000
c6t0d0ONLINE000
c7t0d0ONLINE000
mirror1ONLINE000
c6t1d0ONLINE000
c7t1d0ONLINE000
errors:Noknowndataerrors
Makesurethatthemirrordevicethatyouareaddingisequalorbiggerinsize.
NotethatstartingwithS10U9,wecanmirrorwithdeviceswhicharesmallerinsizethan
theexistingoneaslongastheamountofdatatomirroredwillfitinthenewdevice.
It'sunclearifweshouldusezpooladdorattachsubcommands,andthat'swhatwewillexplainhere.
SOLUTION
TheconcepthereisthatwewanttocreateamirrorofanexistingLUN(zpoolattach)asopposedtoaddmorespace
toyourpool(zpooladd).
Inthatcase,accordingtothezpoolmanpage:
zpoolattach[f]pooldevicenew_device
Attachesnew_devicetoanexistingzpooldevice.The
existingdevicecannotbepartofaraidzconfiguration.
Ifdeviceisnotcurrentlypartofamirroredconfigura
tion,deviceautomaticallytransformsintoatwoway
mirrorofdeviceandnew_device.Ifdeviceispartofa
twowaymirror,attachingnew_devicecreatesathreeway
mirror,andsoon.Ineithercase,new_devicebeginsto
resilverimmediately.
f
Forcesuseofnew_device,evenifitsappearstobe
inuse.Notalldevicescanbeoverriddeninthis
manner.
Inourexample,thecommandtoaddthemirrortoc6t0d0usingc6t1d0is:
#zpoolattachtankc6t0d0c7t0d0
Waitfortheresilveringtocomplete.
Inthesamewayforc6t1d0usingc7t1d0,issue:
#zpoolattachtankc6t1d0c7t1d0
Again,Waitfortheresilveringtocomplete.
Whentheresilverfinish,ZFSpoolconfigurationshouldlooklike:
pool:tank
state:ONLINE
scrub:resilvercompletedafter0h0mwith0errorsonTueSep110:55:542009
config:
NAMESTATEREADWRITECKSUM
tankONLINE000
mirror0ONLINE000
c6t0d0ONLINE000
c7t0d0ONLINE000
mirror1ONLINE000
c6t1d0ONLINE000
c7t1d0ONLINE000
errors:Noknowndataerrors
Ifdesiredso,theoriginaldevicesthencanbedetachedaswell.
Thisisonewayofmigratingdataoffdifferentstorageunits(assumingtheoriginaldevicesare
fromoneunitandthenewdevicesarefromanother).
#zpooldetachtankc6t0d0
#zpooldetachtankc6t1d0
ToresultinZFSpool:
pool:tank
state:ONLINE
scrub:nonerequested
config:
NAMESTATEREADWRITECKSUM
tankONLINE000
c7t0d0ONLINE000
c7t1d0ONLINE000
errors:Noknowndataerrors
Please,refertoManagingOracleSolarisZFSStoragePoolsunderOracleSolarisZFSAdministrationGuideforfurther
details.
MoreinformationregardingZFScanbefoundattheresourcecentre:OracleSolarisZFSResource
Center(DocID1372694.1)
TodiscussthisinformationfurtherwithOracleexpertsandindustrypeers,weencourageyoutoreview,joinor
startadiscussionintheMyOracleSupportZFScommunity