Bug #8592
sgdisk no longer likes `--change-name` when creating partitions
0%
Description
When using `--change-name` on the same call when creating the partition sgdisk complains like:
sudo /sbin/sgdisk --new=1:+0:+5120M --change-name=1:"ceph journal" --partition-guid=1:68ca602a-af72-48a6-8ca9-ecff1003ecca --typecode=1:45b0969e-9b03-4f30-b4c6-5ec00ceff106 --mbrtogpt -- /dev/sdb Problem opening journal for reading! Error is 2. The specified file does not exist!
Taking out that flag allows us to create everything except for setting the name:
sudo /sbin/sgdisk --new=1:+0:+5120M --partition-guid=1:68ca602a-af72-48a6-8ca9-ecff1003ecca --typecode=1:45b0969e-9b03-4f30-b4c6-5ec00ceff106 --mbrtogpt -- /dev/sdb Creating new GPT entries. Information: Moved requested sector from 34 to 2048 in order to align on 2048-sector boundaries. The operation has completed successfully.
This affects ceph-disk as the `--change-name` flag is used everywhere. Modifying ceph-disk on the fly to do a subsequent `--change-name` worked
correctly.
History
#1 Updated by Alfredo Deza almost 10 years ago
- Description updated (diff)
#2 Updated by Gao Jiangmiao over 9 years ago
I have fixed this by add --zap-disk option, hope this will help you.
#3 Updated by Sage Weil over 9 years ago
- Priority changed from Normal to High
#4 Updated by Alfredo Deza about 9 years ago
- Assignee set to Alfredo Deza
#5 Updated by Alfredo Deza about 9 years ago
- Status changed from New to Can't reproduce
I can't replicate this anymore with the following version:
$ ceph --version ceph version 0.87.1 (283c2e7cfa2457799f534744d7d549f83ea1335e)
As a rule of thumb, it will always be easier if we zap before hand (manually, requested/done by the user) than trying
to do it without.
#6 Updated by Daniel Ferber almost 9 years ago
Alfredo, I just ran into this bug with ceph 0.94.2 and CentOS 7 3.10.0-123.8.1.el7.x86_64.
(on the node where ceph-deploy is trying to create the partition)
[root@ceph1 cephuser]# /sbin/sgdisk --new=1:0:+5120M --change-name=1:ceph journal --partition-guid=1:b0610817-4eda-4aa8-be41-f29c1e2cd729 --typecode=1:45b0969e-9b03-4f30-b4c6-b4b80ceff106 --mbrtogpt -- /dev/xvdc
Problem opening journal for reading! Error is 2.
The specified file does not exist!
(and from the node ceph-deploy is executed from)
[centos@ceph-master ceph]$ tail ceph.log
[ceph1][WARNING] INFO:ceph-disk:Running command: /sbin/sgdisk --new=1:0:+5120M --change-name=1:ceph journal --partition-guid=1:b0610817-4eda-4aa8-be41-f29c1e2cd729 --typecode=1:45b0969e-9b03-4f30-b4c6-b4b80ceff106 --mbrtogpt -- /dev/xvdc
[ceph1][WARNING] Could not create partition 1 from 2048 to 10487807
[ceph1][WARNING] Unable to set partition 1's name to 'ceph journal'!
[ceph1][WARNING] Could not change partition 1's type code to 45b0969e-9b03-4f30-b4c6-b4b80ceff106!
[ceph1][WARNING] Error encountered; not saving changes.
#7 Updated by Alfredo Deza over 8 years ago
- Regression set to No
Daniel: what happens if you try the proposed workaround (using --change-name on a second call) ? Does it work for you?
#8 Updated by Alfredo Deza over 8 years ago
- Status changed from Can't reproduce to Need More Info
#9 Updated by Loïc Dachary over 8 years ago
- Status changed from Need More Info to Can't reproduce