Actions
Bug #4319
closedceph-deploy: --zap-disk option
% Done:
0%
Source:
Q/A
Tags:
Backport:
Regression:
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
It would be nice to implement --zapdisk option in osd create command to clean up the disk with zeroes.
tamil@ubuntu:~/ceph-deploy-latest/ceph-deploy$ ./ceph-deploy osd create burnupi06:sde --zap-disk DEBUG:ceph_deploy.osd:Preparing cluster ceph disks burnupi06:/dev/sde: DEBUG:ceph_deploy.osd:Deploying osd to burnupi06 DEBUG:ceph_deploy.osd:Host burnupi06 is now ready for osd use. DEBUG:ceph_deploy.osd:Preparing host burnupi06 disk /dev/sde journal None activate True GPT data structures destroyed! You may now partition the disk using fdisk or other utilities. Information: Creating fresh partition table; will override earlier problems! Non-GPT disk; not saving changes. Use -g to override. Caution: invalid backup GPT header, but valid main header; regenerating Traceback (most recent call last): File "./ceph-deploy", line 9, in <module> load_entry_point('ceph-deploy==0.0.1', 'console_scripts', 'ceph-deploy')() File "/home/tamil/ceph-deploy-latest/ceph-deploy/ceph_deploy/cli.py", line 90, in main return args.func(args) File "/home/tamil/ceph-deploy-latest/ceph-deploy/ceph_deploy/osd.py", line 222, in osd prepare(args, cfg, activate=True) File "/home/tamil/ceph-deploy-latest/ceph-deploy/ceph_deploy/osd.py", line 182, in prepare zap=args.zap_disk, File "/home/tamil/ceph-deploy-latest/ceph-deploy/virtualenv/local/lib/python2.7/site-packages/pushy-0.5.1-py2.7.egg/pushy/protocol/proxy.py", line 255, in <lambda> (conn.operator(type_, self, args, kwargs)) File "/home/tamil/ceph-deploy-latest/ceph-deploy/virtualenv/local/lib/python2.7/site-packages/pushy-0.5.1-py2.7.egg/pushy/protocol/connection.py", line 66, in operator return self.send_request(type_, (object, args, kwargs)) File "/home/tamil/ceph-deploy-latest/ceph-deploy/virtualenv/local/lib/python2.7/site-packages/pushy-0.5.1-py2.7.egg/pushy/protocol/baseconnection.py", line 323, in send_request return self.__handle(m) File "/home/tamil/ceph-deploy-latest/ceph-deploy/virtualenv/local/lib/python2.7/site-packages/pushy-0.5.1-py2.7.egg/pushy/protocol/baseconnection.py", line 639, in __handle raise e pushy.protocol.proxy.ExceptionProxybackup header from main header. Warning! Main and backup partition tables differ! Use the 'c' and 'e' options on the recovery & transformation menu to examine the two tables. Warning! One or more CRCs don't match. You should repair the disk! Invalid partition data! ceph-disk-prepare: OSD preparation error: Command '['sgdisk', '--zap-all', '--clear', '--mbrtogpt', '--', '/dev/sde']' returned non-zero exit status 3 : Command '['ceph-disk-prepare', '--zap-disk', '--', '/dev/sde']' returned non-zero exit status 1 tamil@ubuntu:~/ceph-deploy-latest/ceph-deploy$ ./ceph-deploy zapdisk burnupi06:sde DEBUG:ceph_deploy.zapdisk:zapping /dev/sde on burnupi06 tamil@ubuntu:~/ceph-deploy-latest/ceph-deploy$ ./ceph-deploy osd create burnupi06:sde --zap-disk DEBUG:ceph_deploy.osd:Preparing cluster ceph disks burnupi06:/dev/sde: DEBUG:ceph_deploy.osd:Deploying osd to burnupi06 DEBUG:ceph_deploy.osd:Host burnupi06 is now ready for osd use. DEBUG:ceph_deploy.osd:Preparing host burnupi06 disk /dev/sde journal None activate True **************************************************************************** Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk verification and recovery are STRONGLY recommended. **************************************************************************** GPT data structures destroyed! You may now partition the disk using fdisk or other utilities. The operation has completed successfully. Caution: invalid backup GPT header, but valid main header; regenerating backup header from main header.
Updated by Sage Weil about 11 years ago
- Status changed from New to Resolved
the zap functionality is already the same; added in-use warnings to avoid the confusing error messages
Actions