Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
Hi, > Subject: Re: [DRBD-user] Initial sync, just want to confirm the process > (and not go down in a blaze of glory) > > Hmm sorry Dan, but this has left me a little confused. > As I said in my first post, storage00 is LIVE and has around 4TB of > data on it, I have a dedicated gigabit NIC for drbd, (the machine has 6 > network cards in it, 4 for MPIO iSCSI, 1 for managment/heartbeat, 1 for > DRBD) I have already setup storage01 and have issued drbdadm create-md > meta and drbdadm create-md data on the secondary machine, I haven't > started drbd on it as it needs to be rebooted first, hence why I'm now > a little cautious on the reboot of the machine. I'm not sure why you will need to reboot, you should be able to bring the drbd resource into secondary mode right away with the following commands #On the primary node (storage00) check the status with drbdadm status #You should see something like: [root at raid-primary ~]# drbdadm status <drbd-status version="8.3.8" api="88"> <resources config_file="/etc/drbd.conf"> <resource minor="1" name="drbd1" cs="StandAlone" ro1="Primary" ro2="Unknown" ds1="UpToDate" ds2="DUnknown" /> <resource minor="2" name="drbd2" cs="StandAlone" ro1="Primary" ro2="Unknown" ds1="UpToDate" ds2="DUnknown" /> <resource minor="3" name="drbd3" cs="StandAlone" ro1="Primary" ro2="Unknown" ds1="UpToDate" ds2="DUnknown" /> <resource minor="4" name="drbd4" cs="StandAlone" ro1="Primary" ro2="Unknown" ds1="UpToDate" ds2="DUnknown" /> <resource minor="5" name="drbd5" cs="StandAlone" ro1="Primary" ro2="Unknown" ds1="UpToDate" ds2="DUnknown" /> </resources> </drbd-status> OR #if you have issued the connect command on storage00: [root at raid-primary ~]# drbdadm status <drbd-status version="8.3.8" api="88"> <resources config_file="/etc/drbd.conf"> <resource minor="1" name="drbd1" cs="WFConnection" ro1="Primary" ro2="Unknown" ds1="UpToDate" ds2="DUnknown" /> <resource minor="2" name="drbd2" cs="WFConnection" ro1="Primary" ro2="Unknown" ds1="UpToDate" ds2="DUnknown" /> <resource minor="3" name="drbd3" cs="WFConnection" ro1="Primary" ro2="Unknown" ds1="UpToDate" ds2="DUnknown" /> <resource minor="4" name="drbd4" cs="WFConnection" ro1="Primary" ro2="Unknown" ds1="UpToDate" ds2="DUnknown" /> <resource minor="5" name="drbd5" cs="WFConnection" ro1="Primary" ro2="Unknown" ds1="UpToDate" ds2="DUnknown" /> </resources> </drbd-status> #If you do the same thing on the secondary node (storage01) you should see something like this: [root at raid-secondary ~]# drbdadm status <drbd-status version="8.3.8" api="88"> <resources config_file="/etc/drbd.conf"> <resource minor="1" name="drbd1" cs="Unconfigured" /> <resource minor="2" name="drbd2" cs="Unconfigured" /> <resource minor="3" name="drbd3" cs="Unconfigured" /> <resource minor="4" name="drbd4" cs="Unconfigured" /> <resource minor="5" name="drbd5" cs="Unconfigured" /> </resources> </drbd-status> #Attach to backing device. This step associates the DRBD resource with its backing device. This is a local step and doesn't start the sync: drbdadm attach resource Now on storage01 issue the following: #on Storage01 [root at raid-secondary ~]# drbdadm attach all [root at raid-secondary ~]# drbdadm status <drbd-status version="8.3.8" api="88"> <resources config_file="/etc/drbd.conf"> <resource minor="1" name="drbd1" cs="StandAlone" ro1="Secondary" ro2="Unknown" ds1="UpToDate" ds2="DUnknown" /> <resource minor="2" name="drbd2" cs="StandAlone" ro1="Secondary" ro2="Unknown" ds1="UpToDate" ds2="DUnknown" /> <resource minor="3" name="drbd3" cs="StandAlone" ro1="Secondary" ro2="Unknown" ds1="UpToDate" ds2="DUnknown" /> <resource minor="4" name="drbd4" cs="StandAlone" ro1="Secondary" ro2="Unknown" ds1="UpToDate" ds2="DUnknown" /> <resource minor="5" name="drbd5" cs="StandAlone" ro1="Secondary" ro2="Unknown" ds1="UpToDate" ds2="DUnknown" /> </resources> </drbd-status> #On storage00 you will see something no change to the status. #Set synchronization parameters. This step sets synchronization parameters for the DRBD resource. This is a local step and doesn't start the sync: drbdadm syncer resource #You will see something like this [root at raid-secondary ~]# drbdadm syncer drbd1 [root at raid-secondary ~]# drbdadm syncer drbd2 [root at raid-secondary ~]# drbdadm syncer drbd3 [root at raid-secondary ~]# drbdadm syncer drbd4 [root at raid-secondary ~]# drbdadm syncer drbd5 #Nothing changes on the status. #Connect to peer. This step connects the DRBD resource with its counterpart on the peer node. This step will then start the sync from the primary to the secondary which will be correct.: drbdadm connect resource #You will see the following: #On storage01 [root at raid-secondary ~]# drbdadm connect all [root at raid-secondary ~]# drbdadm status <drbd-status version="8.3.8" api="88"> <resources config_file="/etc/drbd.conf"> <resource minor="1" name="drbd1" cs="Connected" ro1="Secondary" ro2="Primary" ds1="Inconsistant" ds2="UpToDate" /> <resource minor="2" name="drbd2" cs="Connected" ro1="Secondary" ro2="Primary" ds1="Inconsistant" ds2="UpToDate" /> <resource minor="3" name="drbd3" cs="Connected" ro1="Secondary" ro2="Primary" ds1="Inconsistant" ds2="UpToDate" /> <resource minor="4" name="drbd4" cs="Connected" ro1="Secondary" ro2="Primary" ds1="Inconsistant" ds2="UpToDate" /> <resource minor="5" name="drbd5" cs="Connected" ro1="Secondary" ro2="Primary" ds1="Inconsistant" ds2="UpToDate" /> </resources> </drbd-status> #On storage00 provided that you have "connected" using "drbdadm connect all": [root at raid-primary ~]# drbdadm status <drbd-status version="8.3.8" api="88"> <resources config_file="/etc/drbd.conf"> <resource minor="1" name="drbd1" cs="Connected" ro1="Primary" ro2="Secondary" ds1="UpToDate" ds2="Inconsistant" /> <resource minor="2" name="drbd2" cs="Connected" ro1="Primary" ro2="Secondary" ds1="UpToDate" ds2="Inconsistant" /> <resource minor="3" name="drbd3" cs="Connected" ro1="Primary" ro2="Secondary" ds1="UpToDate" ds2="Inconsistant" /> <resource minor="4" name="drbd4" cs="Connected" ro1="Primary" ro2="Secondary" ds1="UpToDate" ds2="Inconsistant" /> <resource minor="5" name="drbd5" cs="Connected" ro1="Primary" ro2="Secondary" ds1="UpToDate" ds2="Inconsistant" /> </resources> </drbd-status> #There should also be some additional information in the status lines showing the sync percentage. #Once you have the given the drbd resource enough time to sync - your statuses will look like this: #On stroage00 [root at raid-primary ~]# drbdadm status <drbd-status version="8.3.8" api="88"> <resources config_file="/etc/drbd.conf"> <resource minor="1" name="drbd1" cs="Connected" ro1="Primary" ro2="Secondary" ds1="UpToDate" ds2="UpToDate" /> <resource minor="2" name="drbd2" cs="Connected" ro1="Primary" ro2="Secondary" ds1="UpToDate" ds2="UpToDate" /> <resource minor="3" name="drbd3" cs="Connected" ro1="Primary" ro2="Secondary" ds1="UpToDate" ds2="UpToDate" /> <resource minor="4" name="drbd4" cs="Connected" ro1="Primary" ro2="Secondary" ds1="UpToDate" ds2="UpToDate" /> <resource minor="5" name="drbd5" cs="Connected" ro1="Primary" ro2="Secondary" ds1="UpToDate" ds2="UpToDate" /> </resources> </drbd-status> #On storage01 [root at raid-secondary ~]# drbdadm status <drbd-status version="8.3.8" api="88"> <resources config_file="/etc/drbd.conf"> <resource minor="1" name="drbd1" cs="Connected" ro1="Secondary" ro2="Primary" ds1="UpToDate" ds2="UpToDate" /> <resource minor="2" name="drbd2" cs="Connected" ro1="Secondary" ro2="Primary" ds1="UpToDate" ds2="UpToDate" /> <resource minor="3" name="drbd3" cs="Connected" ro1="Secondary" ro2="Primary" ds1="UpToDate" ds2="UpToDate" /> <resource minor="4" name="drbd4" cs="Connected" ro1="Secondary" ro2="Primary" ds1="UpToDate" ds2="UpToDate" /> <resource minor="5" name="drbd5" cs="Connected" ro1="Secondary" ro2="Primary" ds1="UpToDate" ds2="UpToDate" /> </resources> </drbd-status> Hope that this helps to reduce the fear. Rgds Simon. PS. I did these on a live running pair ;-) - As Alfred E. Neuman says "WOT, ME WORRY???"