Actions
Bug #9721
closedpartx -a should be called after creating the data partition
% Done:
80%
Source:
other
Tags:
Backport:
Regression:
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):
Description
In the following udev is racing with the creation of the partition:
++ /usr/sbin/sgdisk --info=1 /dev/sdb ++ grep 'Partition unique GUID'
does not retrieve anything although the the udev script was triggered when the data partition was created with a valid GUID It only shows up when partx is called after the journal partition is created:
+ ID_PART_ENTRY_UUID=668f92f5-df46-4052-92ba-e8b8f7efd2d9 + mkdir -p /dev/disk/by-partuuid + ln -sf ../../sdb1 /dev/disk/by-partuuid/668f92f5-df46-4052-92ba-e8b8f7efd2d9
Unfortunately it does not trigger the udev script that would call ceph-disk-activate on the data partition.
partx -u / partx -a should be called after creating the data partition
Thu Oct 9 15:57:47 CEST 2014 + PARTNO=1 + NAME=sdb1 + PARENT_NAME=sdb ++ /usr/sbin/sgdisk --info=1 /dev/sdb ++ grep 'Partition GUID code' ++ awk '{print $4}' ++ tr '[:upper:]' '[:lower:]' + ID_PART_ENTRY_TYPE=4fbd7e29-9d25-41b8-afd0-062c0ceff05d + '[' -z 4fbd7e29-9d25-41b8-afd0-062c0ceff05d ']' ++ /usr/sbin/sgdisk --info=1 /dev/sdb ++ grep 'Partition unique GUID' ++ awk '{print $4}' ++ tr '[:upper:]' '[:lower:]' Thu Oct 9 15:57:47 CEST 2014 + PARTNO=2 + NAME=sdb2 + PARENT_NAME=sdb ++ /usr/sbin/sgdisk --info=2 /dev/sdb ++ grep 'Partition GUID code' ++ awk '{print $4}' ++ tr '[:upper:]' '[:lower:]' + ID_PART_ENTRY_UUID=668f92f5-df46-4052-92ba-e8b8f7efd2d9 + mkdir -p /dev/disk/by-partuuid + ln -sf ../../sdb1 /dev/disk/by-partuuid/668f92f5-df46-4052-92ba-e8b8f7efd2d9 + mkdir -p /dev/disk/by-parttypeuuid + ln -sf ../../sdb1 /dev/disk/by-parttypeuuid/4fbd7e29-9d25-41b8-afd0-062c0ceff05d.668f92f5-df46-4052-92ba-e8b8f7efd2d9 + case $ID_PART_ENTRY_TYPE in + /usr/sbin/ceph-disk -v activate /dev/sdb1 + ID_PART_ENTRY_TYPE=45b0969e-9b03-4f30-b4c6-b4b80ceff106 + '[' -z 45b0969e-9b03-4f30-b4c6-b4b80ceff106 ']' ++ /usr/sbin/sgdisk --info=2 /dev/sdb ++ grep 'Partition unique GUID' ++ awk '{print $4}' ++ tr '[:upper:]' '[:lower:]' + ID_PART_ENTRY_UUID=feb09ba1-30a2-44a8-a338-fef39ae6626a + mkdir -p /dev/disk/by-partuuid + ln -sf ../../sdb2 /dev/disk/by-partuuid/feb09ba1-30a2-44a8-a338-fef39ae6626a + mkdir -p /dev/disk/by-parttypeuuid + ln -sf ../../sdb2 /dev/disk/by-parttypeuuid/45b0969e-9b03-4f30-b4c6-b4b80ceff106.feb09ba1-30a2-44a8-a338-fef39ae6626a + case $ID_PART_ENTRY_TYPE in + /usr/sbin/ceph-disk -v activate-journal /dev/sdb2 INFO:ceph-disk:Running command: /sbin/blkid -p -s TYPE -ovalue -- /dev/sdb1 INFO:ceph-disk:Running command: /usr/bin/ceph-conf --cluster=ceph --name=osd. --lookup osd_mount_options_xfs INFO:ceph-disk:Running command: /usr/bin/ceph-conf --cluster=ceph --name=osd. --lookup osd_fs_mount_options_xfs DEBUG:ceph-disk:Mounting /dev/sdb1 on /var/lib/ceph/tmp/mnt.T5BgJx with options noatime INFO:ceph-disk:Running command: /usr/bin/mount -t xfs -o noatime -- /dev/sdb1 /var/lib/ceph/tmp/mnt.T5BgJx DEBUG:ceph-disk:Cluster uuid is 70ac4a78-46c0-45e6-8ff9-878b37f50fa1 INFO:ceph-disk:Running command: /usr/bin/ceph-osd --cluster=ceph --show-config-value=fsid DEBUG:ceph-disk:Cluster name is ceph DEBUG:ceph-disk:OSD uuid is 668f92f5-df46-4052-92ba-e8b8f7efd2d9 DEBUG:ceph-disk:Allocating OSD id... INFO:ceph-disk:Running command: /usr/bin/ceph --cluster ceph --name client.bootstrap-osd --keyring /var/lib/ceph/bootstrap-osd/ceph.keyring osd create --concise 668f92f5-df46-4052-92ba-e8b8f7efd2d9 DEBUG:ceph-disk:OSD id is 46 DEBUG:ceph-disk:Initializing OSD... INFO:ceph-disk:Running command: /usr/bin/ceph --cluster ceph --name client.bootstrap-osd --keyring /var/lib/ceph/bootstrap-osd/ceph.keyring mon getmap -o /var/lib/ceph/tmp/mnt.T5BgJx/activate.monmap got monmap epoch 1 INFO:ceph-disk:Running command: /usr/bin/ceph-osd --cluster ceph --mkfs --mkkey -i 46 --monmap /var/lib/ceph/tmp/mnt.T5BgJx/activate.monmap --osd-data /var/lib/ceph/tmp/mnt.T5BgJx --osd-journal /var/lib/ceph/tmp/mnt.T5BgJx/journal --osd-uuid 668f92f5-df46-4052-92ba-e8b8f7efd2d9 --keyring /var/lib/ceph/tmp/mnt.T5BgJx/keyring SG_IO: bad/missing sense data, sb[]: 70 00 05 00 00 00 00 0b 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2014-10-09 15:57:48.542023 7fcf59aed7c0 -1 journal check: ondisk fsid dd53878c-8f8a-4d16-ad44-28185e4ad837 doesn't match expected 668f92f5-df46-4052-92ba-e8b8f7efd2d9, invalid (someone else's?) journal SG_IO: bad/missing sense data, sb[]: 70 00 05 00 00 00 00 0b 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 SG_IO: bad/missing sense data, sb[]: 70 00 05 00 00 00 00 0b 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 SG_IO: bad/missing sense data, sb[]: 70 00 05 00 00 00 00 0b 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2014-10-09 15:57:48.555834 7fcf59aed7c0 -1 filestore(/var/lib/ceph/tmp/mnt.T5BgJx) could not find 23c2fcde/osd_superblock/0//-1 in index: (2) No such file or directory 2014-10-09 15:57:48.559624 7fcf59aed7c0 -1 created object store /var/lib/ceph/tmp/mnt.T5BgJx journal /var/lib/ceph/tmp/mnt.T5BgJx/journal for osd.46 fsid 70ac4a78-46c0-45e6-8ff9-878b37f50fa1 2014-10-09 15:57:48.559663 7fcf59aed7c0 -1 auth: error reading file: /var/lib/ceph/tmp/mnt.T5BgJx/keyring: can't open /var/lib/ceph/tmp/mnt.T5BgJx/keyring: (2) No such file or directory 2014-10-09 15:57:48.559889 7fcf59aed7c0 -1 created new key in keyring /var/lib/ceph/tmp/mnt.T5BgJx/keyring INFO:ceph-disk:Running command: /usr/bin/ceph-conf --cluster=ceph --name=osd. --lookup init DEBUG:ceph-disk:Marking with init system sysvinit DEBUG:ceph-disk:Authorizing OSD key... INFO:ceph-disk:Running command: /usr/bin/ceph --cluster ceph --name client.bootstrap-osd --keyring /var/lib/ceph/bootstrap-osd/ceph.keyring auth add osd.46 -i /var/lib/ceph/tmp/mnt.T5BgJx/keyring osd allow * mon allow profile osd added key for osd.46 DEBUG:ceph-disk:ceph osd.46 data dir is ready at /var/lib/ceph/tmp/mnt.T5BgJx DEBUG:ceph-disk:Moving mount to final location... INFO:ceph-disk:Running command: /bin/mount -o noatime -- /dev/sdb1 /var/lib/ceph/osd/ceph-46 INFO:ceph-disk:Running command: /bin/umount -l -- /var/lib/ceph/tmp/mnt.T5BgJx DEBUG:ceph-disk:Starting ceph osd.46... INFO:ceph-disk:Running command: /usr/sbin/service ceph --cluster ceph start osd.46 === osd.46 === create-or-move updating item name 'osd.46' weight 0.9 at location {host=ceph1,root=default} to crush map Starting Ceph osd.46 on ceph1... Running as unit run-31663.service. INFO:ceph-disk:Running command: /usr/bin/ceph-osd -i 0 --get-journal-uuid --osd-journal /dev/sdb2 + exit + exec SG_IO: bad/missing sense data, sb[]: 70 00 05 00 00 00 00 0b 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 DEBUG:ceph-disk:Journal /dev/sdb2 has OSD UUID 668f92f5-df46-4052-92ba-e8b8f7efd2d9 INFO:ceph-disk:Running command: /sbin/blkid -p -s TYPE -ovalue -- /dev/disk/by-partuuid/668f92f5-df46-4052-92ba-e8b8f7efd2d9 INFO:ceph-disk:Running command: /usr/bin/ceph-conf --cluster=ceph --name=osd. --lookup osd_mount_options_xfs INFO:ceph-disk:Running command: /usr/bin/ceph-conf --cluster=ceph --name=osd. --lookup osd_fs_mount_options_xfs DEBUG:ceph-disk:Mounting /dev/disk/by-partuuid/668f92f5-df46-4052-92ba-e8b8f7efd2d9 on /var/lib/ceph/tmp/mnt.TvdWK1 with options noatime INFO:ceph-disk:Running command: /usr/bin/mount -t xfs -o noatime -- /dev/disk/by-partuuid/668f92f5-df46-4052-92ba-e8b8f7efd2d9 /var/lib/ceph/tmp/mnt.TvdWK1 DEBUG:ceph-disk:Cluster uuid is 70ac4a78-46c0-45e6-8ff9-878b37f50fa1 INFO:ceph-disk:Running command: /usr/bin/ceph-osd --cluster=ceph --show-config-value=fsid DEBUG:ceph-disk:Cluster name is ceph DEBUG:ceph-disk:OSD uuid is 668f92f5-df46-4052-92ba-e8b8f7efd2d9 DEBUG:ceph-disk:OSD id is 46 INFO:ceph-disk:Running command: /usr/bin/ceph-conf --cluster=ceph --name=osd. --lookup init DEBUG:ceph-disk:Marking with init system sysvinit DEBUG:ceph-disk:ceph osd.46 data dir is ready at /var/lib/ceph/tmp/mnt.TvdWK1 INFO:ceph-disk:ceph osd.46 already mounted in position; unmounting ours. DEBUG:ceph-disk:Unmounting /var/lib/ceph/tmp/mnt.TvdWK1 INFO:ceph-disk:Running command: /bin/umount -- /var/lib/ceph/tmp/mnt.TvdWK1 DEBUG:ceph-disk:Starting ceph osd.46... INFO:ceph-disk:Running command: /usr/sbin/service ceph --cluster ceph start osd.46 === osd.46 === Starting Ceph osd.46 on ceph1...already running + exit + exec Thu Oct 9 15:58:04 CEST 2014 + PARTNO=2 + NAME=sdc2 + PARENT_NAME=sdc ++ /usr/sbin/sgdisk --info=2 /dev/sdc ++ grep 'Partition GUID code' ++ awk '{print $4}' ++ tr '[:upper:]' '[:lower:]' + ID_PART_ENTRY_TYPE=45b0969e-9b03-4f30-b4c6-b4b80ceff106 + '[' -z 45b0969e-9b03-4f30-b4c6-b4b80ceff106 ']' ++ /usr/sbin/sgdisk --info=2 /dev/sdc ++ grep 'Partition unique GUID' ++ awk '{print $4}' ++ tr '[:upper:]' '[:lower:]' + ID_PART_ENTRY_UUID=5e50bb8b-0b99-455f-af71-10815a32bfbc + mkdir -p /dev/disk/by-partuuid + ln -sf ../../sdc2 /dev/disk/by-partuuid/5e50bb8b-0b99-455f-af71-10815a32bfbc + mkdir -p /dev/disk/by-parttypeuuid + ln -sf ../../sdc2 /dev/disk/by-parttypeuuid/45b0969e-9b03-4f30-b4c6-b4b80ceff106.5e50bb8b-0b99-455f-af71-10815a32bfbc + case $ID_PART_ENTRY_TYPE in + /usr/sbin/ceph-disk -v activate-journal /dev/sdc2 INFO:ceph-disk:Running command: /usr/bin/ceph-osd -i 0 --get-journal-uuid --osd-journal /dev/sdc2 SG_IO: bad/missing sense data, sb[]: 70 00 05 00 00 00 00 0b 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 DEBUG:ceph-disk:Journal /dev/sdc2 has OSD UUID 00000000-0000-0000-0000-000000000000 INFO:ceph-disk:Running command: /sbin/blkid -p -s TYPE -ovalue -- /dev/disk/by-partuuid/00000000-0000-0000-0000-000000000000 error: /dev/disk/by-partuuid/00000000-0000-0000-0000-000000000000: No such file or directory ceph-disk: Cannot discover filesystem type: device /dev/disk/by-partuuid/00000000-0000-0000-0000-000000000000: Command '/sbin/blkid' returned non-zero exit status 2 + exit + exec Thu Oct 9 15:58:06 CEST 2014 + PARTNO=2 + NAME=sdc2 + PARENT_NAME=sdc ++ /usr/sbin/sgdisk --info=2 /dev/sdc ++ grep 'Partition GUID code' ++ awk '{print $4}' ++ tr '[:upper:]' '[:lower:]' + ID_PART_ENTRY_TYPE=45b0969e-9b03-4f30-b4c6-b4b80ceff106 + '[' -z 45b0969e-9b03-4f30-b4c6-b4b80ceff106 ']' ++ /usr/sbin/sgdisk --info=2 /dev/sdc ++ grep 'Partition unique GUID' ++ awk '{print $4}' ++ tr '[:upper:]' '[:lower:]' + ID_PART_ENTRY_UUID=5e50bb8b-0b99-455f-af71-10815a32bfbc + mkdir -p /dev/disk/by-partuuid + ln -sf ../../sdc2 /dev/disk/by-partuuid/5e50bb8b-0b99-455f-af71-10815a32bfbc + mkdir -p /dev/disk/by-parttypeuuid + ln -sf ../../sdc2 /dev/disk/by-parttypeuuid/45b0969e-9b03-4f30-b4c6-b4b80ceff106.5e50bb8b-0b99-455f-af71-10815a32bfbc + case $ID_PART_ENTRY_TYPE in + /usr/sbin/ceph-disk -v activate-journal /dev/sdc2 Thu Oct 9 15:58:06 CEST 2014 + PARTNO=1 + NAME=sdc1 + PARENT_NAME=sdc ++ /usr/sbin/sgdisk --info=1 /dev/sdc ++ grep 'Partition GUID code' ++ awk '{print $4}' ++ tr '[:upper:]' '[:lower:]' + ID_PART_ENTRY_TYPE=89c57f98-2fe5-4dc0-89c1-f3ad0ceff2be + '[' -z 89c57f98-2fe5-4dc0-89c1-f3ad0ceff2be ']' ++ /usr/sbin/sgdisk --info=1 /dev/sdc ++ grep 'Partition unique GUID' ++ awk '{print $4}' ++ tr '[:upper:]' '[:lower:]' + ID_PART_ENTRY_UUID=244973de-7472-421c-bb25-4b09d3f8d441 + mkdir -p /dev/disk/by-partuuid + ln -sf ../../sdc1 /dev/disk/by-partuuid/244973de-7472-421c-bb25-4b09d3f8d441 + mkdir -p /dev/disk/by-parttypeuuid + ln -sf ../../sdc1 /dev/disk/by-parttypeuuid/89c57f98-2fe5-4dc0-89c1-f3ad0ceff2be.244973de-7472-421c-bb25-4b09d3f8d441 + case $ID_PART_ENTRY_TYPE in + exit + exec INFO:ceph-disk:Running command: /usr/bin/ceph-osd -i 0 --get-journal-uuid --osd-journal /dev/sdc2 SG_IO: bad/missing sense data, sb[]: 70 00 05 00 00 00 00 0b 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 DEBUG:ceph-disk:Journal /dev/sdc2 has OSD UUID 00000000-0000-0000-0000-000000000000 INFO:ceph-disk:Running command: /sbin/blkid -p -s TYPE -ovalue -- /dev/disk/by-partuuid/00000000-0000-0000-0000-000000000000 error: /dev/disk/by-partuuid/00000000-0000-0000-0000-000000000000: No such file or directory ceph-disk: Cannot discover filesystem type: device /dev/disk/by-partuuid/00000000-0000-0000-0000-000000000000: Command '/sbin/blkid' returned non-zero exit status 2 + exit + exec Thu Oct 9 15:58:06 CEST 2014 + PARTNO=2 + NAME=sdc2 + PARENT_NAME=sdc Thu Oct 9 15:58:06 CEST 2014 + PARTNO=1 + NAME=sdc1 + PARENT_NAME=sdc ++ /usr/sbin/sgdisk --info=2 /dev/sdc ++ grep 'Partition GUID code' ++ awk '{print $4}' ++ tr '[:upper:]' '[:lower:]' ++ /usr/sbin/sgdisk --info=1 /dev/sdc ++ grep 'Partition GUID code' ++ awk '{print $4}' ++ tr '[:upper:]' '[:lower:]' + ID_PART_ENTRY_TYPE=45b0969e-9b03-4f30-b4c6-b4b80ceff106 + '[' -z 45b0969e-9b03-4f30-b4c6-b4b80ceff106 ']' + ID_PART_ENTRY_TYPE=89c57f98-2fe5-4dc0-89c1-f3ad0ceff2be + '[' -z 89c57f98-2fe5-4dc0-89c1-f3ad0ceff2be ']' ++ /usr/sbin/sgdisk --info=2 /dev/sdc ++ /usr/sbin/sgdisk --info=1 /dev/sdc ++ grep 'Partition unique GUID' ++ grep 'Partition unique GUID' ++ awk '{print $4}' ++ awk '{print $4}' ++ tr '[:upper:]' '[:lower:]' ++ tr '[:upper:]' '[:lower:]' + ID_PART_ENTRY_UUID=5e50bb8b-0b99-455f-af71-10815a32bfbc + mkdir -p /dev/disk/by-partuuid + ID_PART_ENTRY_UUID=244973de-7472-421c-bb25-4b09d3f8d441 + mkdir -p /dev/disk/by-partuuid + ln -sf ../../sdc2 /dev/disk/by-partuuid/5e50bb8b-0b99-455f-af71-10815a32bfbc + ln -sf ../../sdc1 /dev/disk/by-partuuid/244973de-7472-421c-bb25-4b09d3f8d441 + mkdir -p /dev/disk/by-parttypeuuid + mkdir -p /dev/disk/by-parttypeuuid + ln -sf ../../sdc2 /dev/disk/by-parttypeuuid/45b0969e-9b03-4f30-b4c6-b4b80ceff106.5e50bb8b-0b99-455f-af71-10815a32bfbc + ln -sf ../../sdc1 /dev/disk/by-parttypeuuid/89c57f98-2fe5-4dc0-89c1-f3ad0ceff2be.244973de-7472-421c-bb25-4b09d3f8d441 + case $ID_PART_ENTRY_TYPE in + /usr/sbin/ceph-disk -v activate-journal /dev/sdc2 + case $ID_PART_ENTRY_TYPE in + exit + exec INFO:ceph-disk:Running command: /usr/bin/ceph-osd -i 0 --get-journal-uuid --osd-journal /dev/sdc2 SG_IO: bad/missing sense data, sb[]: 70 00 05 00 00 00 00 0b 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 DEBUG:ceph-disk:Journal /dev/sdc2 has OSD UUID 00000000-0000-0000-0000-000000000000 INFO:ceph-disk:Running command: /sbin/blkid -p -s TYPE -ovalue -- /dev/disk/by-partuuid/00000000-0000-0000-0000-000000000000 error: /dev/disk/by-partuuid/00000000-0000-0000-0000-000000000000: No such file or directory ceph-disk: Cannot discover filesystem type: device /dev/disk/by-partuuid/00000000-0000-0000-0000-000000000000: Command '/sbin/blkid' returned non-zero exit status 2 + exit + exec
Updated by Loïc Dachary over 9 years ago
- Description updated (diff)
- Status changed from New to 12
Updated by Loïc Dachary over 9 years ago
- Status changed from 12 to Fix Under Review
- Priority changed from Normal to High
- % Done changed from 0 to 80
Updated by Loïc Dachary over 9 years ago
- Status changed from Fix Under Review to Rejected
The diagnostic is incorrect. At the time the data partition is created it does not make sense to try to activate it because the journal partition is not created yet. Therefore it is not necessary to refresh the partition table, it is too soon.
Actions