junneyang / zumastor

Automatically exported from code.google.com/p/zumastor
0 stars 1 forks source link

Add --zero option to zumastor define volume #73

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
We should include an option to zumastor define volume that runs a dd 
of /dev/zero onto the volume being defined. This should speed up 
replication, as the volume full of zeros would compress nicely.  

Original issue reported on code.google.com by williama...@gmail.com on 13 Feb 2008 at 7:18

GoogleCodeExporter commented 9 years ago
So, according to `zumastor define volume` -i should do this. It does not.

"""
  -i, --initialize        initialize the volume with zeros (will destroy data)
"""

Original comment by williama...@gmail.com on 16 Feb 2008 at 1:51

GoogleCodeExporter commented 9 years ago
Looks like this doc error was fixed in the man page in r1327 and r1326
on Feb 4th, but not fixed in the help message?

Original comment by daniel.r...@gmail.com on 16 Feb 2008 at 3:06

GoogleCodeExporter commented 9 years ago
Right. I just checked in the fix for the help message, commit 1408.
The '--initialize' option does not zero the origin volume. So Will, please go 
ahead
to add the '--zero' option.

Original comment by jiahotc...@gmail.com on 20 Feb 2008 at 12:39

GoogleCodeExporter commented 9 years ago
Will, feel like doing this for 0.7?

Original comment by daniel.r...@gmail.com on 20 Feb 2008 at 8:31

GoogleCodeExporter commented 9 years ago
So, this is kind of tricky to implement. If we initialize with zeros, the 
filesystem will be wiped out, and the mount that happens later will fail. How 
do we 
want to do this?

Original comment by williama...@gmail.com on 20 Feb 2008 at 9:51

Attachments:

GoogleCodeExporter commented 9 years ago
Hi Will,

A user should call mkfs after 'zumastor define volume'. So it should be ok to 
zero
out the origin device in 'zumastor define volume'. If a user wants to keep the
existing data on the origin device, he will not use the '--zero' option.

Maybe we can change the description as "zero the origin (will overwrite data on
origin with zeros!!)". You may also want to change the usage message and 
zumastor man
page with the patch. Other than these, the patch lgtm.   

Original comment by jiahotc...@gmail.com on 20 Feb 2008 at 10:49

GoogleCodeExporter commented 9 years ago

Original comment by williama...@gmail.com on 21 Feb 2008 at 12:21

GoogleCodeExporter commented 9 years ago
Turns out, this does not actually work. --zero bails on device full.

Original comment by williama...@gmail.com on 12 Mar 2008 at 7:43

GoogleCodeExporter commented 9 years ago
Fixed with revision 1450.

Original comment by jiahotc...@gmail.com on 17 Mar 2008 at 8:43