Skip to content
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: erase 110MB for nuking existing bluestore #20400

Merged
merged 1 commit into from Feb 22, 2018

Conversation

Projects
None yet
4 participants
@tchaikov
Copy link
Contributor

commented Feb 12, 2018

10M is not enough for erasing the data partition and db partition,
let's make it 110M.

Fixes: http://tracker.ceph.com/issues/22354
Signed-off-by: Kefu Chai kchai@redhat.com

@tchaikov tchaikov requested review from alfredodeza and wido Feb 12, 2018

@tchaikov

This comment has been minimized.

Copy link
Contributor Author

commented Feb 12, 2018

@alfredodeza i think we can apply a similar fix to zap_data() in zap.py. what do you think?

@alfredodeza

This comment has been minimized.

Copy link
Contributor

commented Feb 12, 2018

Yes, that sounds sensible to me!

@wido

wido approved these changes Feb 12, 2018

@wido

This comment has been minimized.

Copy link
Member

commented Feb 12, 2018

Looks good to me! However, what I've been doing lately is using blkdiscard to fully wipe a SSD. This will erase all bits within ~15 sec on a SSD. It just tells the controller to erase all cells.

We might want to add that

@alfredodeza

This comment has been minimized.

Copy link
Contributor

commented Feb 12, 2018

hrmn, but then we need to do extra detection to see what kind of device we are handling?

@wido

This comment has been minimized.

Copy link
Member

commented Feb 12, 2018

Yes, you will need to check the rotational flag in sysfs to see it it's a SSD. It's very effective though! I can recommend it.

But that's not in scope for this PR, just wanted to bring it to the table for future option.

@tchaikov tchaikov force-pushed the tchaikov:wip-22354 branch from bb98deb to 01a695d Feb 12, 2018

@tchaikov

This comment has been minimized.

Copy link
Contributor Author

commented Feb 12, 2018

changelog:

  • fixed a PEP-8 warning
ceph_disk/main.py:1613:80: E501 line too long (80 > 79 characters)

@tchaikov tchaikov added the needs-qa label Feb 12, 2018

@tchaikov tchaikov self-assigned this Feb 12, 2018

@tchaikov tchaikov force-pushed the tchaikov:wip-22354 branch 2 times, most recently from b390bfe to 238c399 Feb 13, 2018

ceph-disk: erase 110MB for nuking existing bluestore
10M is not enough for erasing the data partition *and* db partition,
let's make it 110M.

Fixes: http://tracker.ceph.com/issues/22354
Signed-off-by: Kefu Chai <kchai@redhat.com>

@tchaikov tchaikov force-pushed the tchaikov:wip-22354 branch from 238c399 to 627475d Feb 22, 2018

@tchaikov

This comment has been minimized.

@tchaikov tchaikov merged commit d7dfdc8 into ceph:master Feb 22, 2018

5 checks passed

Docs: build check OK - docs built
Details
Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details
make check (arm64) make check succeeded
Details

@tchaikov tchaikov deleted the tchaikov:wip-22354 branch Feb 22, 2018

@kobigi

This comment has been minimized.

Copy link

commented Feb 23, 2018

Hi Guys,
i'm getting the same warning in the logs,
and OSD's is trying to get up and fails over and over again.

My deployment is with containers using ceph-ansible.

i can not find the same code (ok i guess you did not merged yet)
My question is ?
if i ll change the default value of count fro 10 to 100 in the zap function , will it be sufficient ?
or maybe it should be 110 ?

File: "/usr/lib/python2.7/site-packages/ceph_disk/main.py"
rpm: ceph-common-12.2.2-0.el7.x86_64

def zap_linux(dev):
try:
# Thoroughly wipe all partitions of any traces of
# Filesystems or OSD Journals
#
# In addition we need to write 10M of data to each partition
# to make sure that after re-creating the same partition
# there is no trace left of any previous Filesystem or OSD
# Journal

    LOG.debug('Writing zeros to existing partitions on %s', dev)

    for partname in list_partitions(dev):
        partition = get_dev_path(partname)
        command_check_call(
            [
                'wipefs',
                '--all',
                partition,
            ],
        )

        command_check_call(
            [
                'dd',
                'if=/dev/zero',
                'of={path}'.format(path=partition),
                'bs=1M',
                'count=10',
            ],
        )
@tchaikov

This comment has been minimized.

Copy link
Contributor Author

commented Feb 23, 2018

@kobigi are you zapping a device which was used for bluestore ? if yes, it should be 110.

@kobigi

This comment has been minimized.

Copy link

commented Feb 23, 2018

Hi @tchaikov - yes indeed with bluestore,
which is the default in luminous,
and as far as i understood should have Performance wise X2 faster.
will try 110
thx

@kobigi

This comment has been minimized.

Copy link

commented Feb 23, 2018

hi @tchaikov some progress now
But now i 'm getting authentication failed ,
any help would be appreciated - thx

  • echo '2018-02-23 08:55:43 entrypoint.sh: SUCCESS'
    2018-02-23 08:55:43 entrypoint.sh: SUCCESS
  • return 0
  • exec /usr/bin/ceph-osd --cluster ceph -f -i 1 --setuser ceph --setgroup disk
  • trap _term SIGTERM
  • child_for_exec=52493
  • echo 'exec: PID 52493: spawning /usr/bin/ceph-osd --cluster ceph -f -i 1 --setuser ceph --setgroup disk'
    exec: PID 52493: spawning /usr/bin/ceph-osd --cluster ceph -f -i 1 --setuser ceph --setgroup disk
  • wait 52493
  • /usr/bin/ceph-osd --cluster ceph -f -i 1 --setuser ceph --setgroup disk
    starting osd.1 at - osd_data /var/lib/ceph/osd/ceph-1 /var/lib/ceph/osd/ceph-1/journal
    2018-02-23 08:55:45.517387 7f016e33ed00 -1 osd.1 44 log_to_monitors {default=true}
    2018-02-23 08:55:45.521824 7f016e33ed00 -1 osd.1 44 init authentication failed: (1) Operation not permitted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.