New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ceph-disk: Write 10M to all partitions before zapping #13766

Merged
merged 1 commit into from Apr 4, 2017

Conversation

Projects
None yet
4 participants
@ghost

ghost commented Mar 3, 2017

By writing 10M of zeroes to each partition of the device we prevent that
old data causes troubles if exactly the same partition scheme is created
on the disk again and is read by the OSD.

This mainly involves the OSD's journal which will contain data from the
previous OSD and results in a assert of the OSD.

Fixes: http://tracker.ceph.com/issues/18962

Signed-off-by: Wido den Hollander wido@42on.com

@ghost ghost added bug fix core labels Mar 3, 2017

@ghost ghost requested a review from wido Mar 3, 2017

@ghost

This comment has been minimized.

ghost commented Mar 3, 2017

teuthology-suite -k distro --verbose --suite ceph-disk --ceph wip-18962-ceph-disk-zap --machine-type vps --priority 1000

command_check_call(
[
'wipefs',
'--all',

This comment has been minimized.

@leseb

leseb Mar 3, 2017

Contributor

Shouldn't we add −−quiet and −−force to this command? Force will be helpful if the fs is mounted. I haven't tried wipefs behaviour on a mounted partition...

@ghost

This comment has been minimized.

ghost commented Mar 3, 2017

jenkins test this please (test_objectstore_memstore.sh fail)

@ghost

This comment has been minimized.

ghost commented Mar 3, 2017

@leseb added --quiet. I'd rather avoid --force. It is a good idea for zap to fail if a partition is mounted.

@leseb

This comment has been minimized.

Contributor

leseb commented Mar 3, 2017

@dachary you're right, let's keep it like this.

# Filesystems or OSD Journals
#
# In addition we need to write 10M of data to each partition
# first to make sure that after re-creating the same parition

This comment has been minimized.

@leseb

leseb Mar 3, 2017

Contributor

s/parition/partition/

@ErwanAliasr1

This comment has been minimized.

Contributor

ErwanAliasr1 commented Mar 3, 2017

10MB seems pretty arbitrary.
Can you detail what you really target in that 10MB ?

@ghost

This comment has been minimized.

ghost commented Mar 3, 2017

typo fixed & repushed

@ghost

This comment has been minimized.

ghost commented Mar 7, 2017

teuthology-suite -k distro --verbose --suite ceph-disk --ceph wip-18962-ceph-disk-zap --machine-type vps --priority 1000

Ubuntu 14.04 does not have --quiet for wipefs

ceph-disk: Write 10M to all partitions before zapping
By writing 10M of zeroes to each partition of the device we prevent that
old data causes troubles if exactly the same partition scheme is created
on the disk again and is read by the OSD.

This mainly involves the OSD's journal which will contain data from the
previous OSD and results in a assert of the OSD.

Fixes: http://tracker.ceph.com/issues/18962

Signed-off-by: Wido den Hollander <wido@42on.com>
@ghost

This comment has been minimized.

ghost commented Mar 8, 2017

The following ceph-disk run stands since the --quiet option was not added for backward compatibility purposes.

teuthology-suite -k distro --verbose --suite ceph-disk --ceph wip-18962-ceph-disk-zap --machine-type vps --priority 1000

@liewegas liewegas merged commit fe28add into ceph:master Apr 4, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment