Project

General

Profile

Actions

Bug #18681

closed

ceph-disk prepare/activate misses steps and fails on [Bluestore]

Added by Leonid Prytuliak over 7 years ago. Updated almost 7 years ago.

Status:
Won't Fix
Priority:
Urgent
Assignee:
-
Category:
Administration/Usability
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
ceph-disk
Component(RADOS):
BlueStore
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

After prepare disk for bluestore ceph-disk did not chown db and wal partions and action activate failed.

Debian 8.7 (Linux 4.4.35)
ceph version 11.2.0

root@xxx:~# parted /dev/sdb print
Model: ATA Samsung SSD 850 (scsi)
Disk /dev/sdb: 512GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name      Flags
 1      1049kB  2128MB  2127MB               osd3.db
 2      2128MB  10.6GB  8506MB               osd3.wal

root@xxx:~# ls -l /dev/sdb*
brw-rw---- 1 root disk 8, 16 Jan 26 12:19 /dev/sdb
brw-rw---- 1 root disk 8, 17 Jan 26 12:19 /dev/sdb1
brw-rw---- 1 root disk 8, 18 Jan 26 12:19 /dev/sdb2
root@n004:~# ls -l /dev/sdc*
brw-rw---- 1 root disk 8, 32 Jan 26 12:17 /dev/sdc

Аfter preparing the disc we find the following

root@xxx:~# ceph-disk prepare --zap-disk --cluster ceph --cluster-uuid c49a2428-6a97-4bac-b497-fa6824113fc4 --bluestore /dev/sdc --block.wal /dev/disk/by-partlabel/osd3.wal --block.db /dev/disk/by-partlabel/osd3.db
...
The operation has completed successfully.
root@xxx:~# ls -l /dev/sdb*
brw-rw---- 1 root disk 8, 16 Jan 26 12:19 /dev/sdb
brw-rw---- 1 root disk 8, 17 Jan 26 12:19 /dev/sdb1
brw-rw---- 1 root disk 8, 18 Jan 26 12:19 /dev/sdb2
root@xxx:~# ls -l /dev/sdc*
brw-rw---- 1 root disk 8, 32 Jan 26 12:29 /dev/sdc
brw-rw---- 1 ceph ceph 8, 33 Jan 26 12:29 /dev/sdc1
brw-rw---- 1 ceph ceph 8, 34 Jan 26 12:29 /dev/sdc2
root@xxx:~# ceph-disk -v activate /dev/sdc1
...
2017-01-26 12:32:58.985407 7fc53692e940 -1 bluestore(/var/lib/ceph/tmp/mnt.5EOgmD) _setup_block_symlink_or_file failed to create block symlink to /dev/sdc2: (17) File exists
2017-01-26 12:32:58.985441 7fc53692e940 -1 OSD::mkfs: ObjectStore::mkfs failed with error -17
2017-01-26 12:32:58.985693 7fc53692e940 -1  ** ERROR: error creating empty object store in /var/lib/ceph/tmp/mnt.5EOgmD: (17) File exists
...

But after run command:

root@xxx:~# chown ceph:ceph /dev/sdb1
root@xxx:~# chown ceph:ceph /dev/sdb2
root@xxx:~# ls -l /dev/sdb*
brw-rw---- 1 root disk 8, 16 Jan 26 12:37 /dev/sdb
brw-rw---- 1 ceph ceph 8, 17 Jan 26 12:42 /dev/sdb1
brw-rw---- 1 ceph ceph 8, 18 Jan 26 12:42 /dev/sdb2
root@xxx:~# ceph-disk activate /dev/sdc1
got monmap epoch 4
added key for osd.3

And all is well

Actions

Also available in: Atom PDF