[SOLVED] problem adding device to OSD

piviul

Member
Mar 19, 2020
50
3
13
Hi all, I'm trying to install ceph on a 3 nodes pve cluster. In one of the nodes, from the graphical interface, I have added a device to OSD but after a some big time (1 hour or more) I have stopped the procedure. Now I can't even clean the device becasue the command "ceph-volume lvm zap /dev/sdx --destroy" never stop.
Please someone can help me to find a way to clean the device and help me newly add to OSD?

Many thanks

Piviul
 
The task of adding a new OSD took an hour long before you cancelled it?

That does sound wrong. Is the disk okay?

You can fully wipe it with sgdisk -Z /dev/sdX
 
Thanks Aaron, I have clean the hard drive with gdisk and I have add the drive to osd again. These are the logs:
create OSD on /dev/sdf (bluestore)
wipe disk/partition: /dev/sdf
200+0 records in
200+0 records out
209715200 bytes (210 MB, 200 MiB) copied, 0.724384 s, 290 MB/s
Running command: /bin/ceph-authtool --gen-print-key
Running command: /bin/ceph --cluster ceph --name client.bootstrap-osd --keyring /var/lib/ceph/bootstrap-osd/ceph.keyring -i - osd new 1f770313-60d7-4d98-8c28-cb91fa0a83a9
Running command: /sbin/vgcreate --force --yes ceph-04e12fea-5138-4cd3-b854-03bb54cf34e6 /dev/sdf
stdout: Physical volume "/dev/sdf" successfully created.
stdout: Volume group "ceph-04e12fea-5138-4cd3-b854-03bb54cf34e6" successfully created
Running command: /sbin/lvcreate --yes -l 457854 -n osd-block-1f770313-60d7-4d98-8c28-cb91fa0a83a9 ceph-04e12fea-5138-4cd3-b854-03bb54cf34e6
stdout: Logical volume "osd-block-1f770313-60d7-4d98-8c28-cb91fa0a83a9" created.
Running command: /bin/ceph-authtool --gen-print-key
Running command: /bin/mount -t tmpfs tmpfs /var/lib/ceph/osd/ceph-4
--> Executable selinuxenabled not in PATH: /sbin:/bin:/usr/sbin:/usr/bin
Running command: /bin/chown -h ceph:ceph /dev/ceph-04e12fea-5138-4cd3-b854-03bb54cf34e6/osd-block-1f770313-60d7-4d98-8c28-cb91fa0a83a9
Running command: /bin/chown -R ceph:ceph /dev/dm-4
Running command: /bin/ln -s /dev/ceph-04e12fea-5138-4cd3-b854-03bb54cf34e6/osd-block-1f770313-60d7-4d98-8c28-cb91fa0a83a9 /var/lib/ceph/osd/ceph-4/block
Running command: /bin/ceph --cluster ceph --name client.bootstrap-osd --keyring /var/lib/ceph/bootstrap-osd/ceph.keyring mon getmap -o /var/lib/ceph/osd/ceph-4/activate.monmap
stderr: 2021-03-03 14:15:15.315 7fd1f86d9700 -1 auth: unable to find a keyring on /etc/pve/priv/ceph.client.bootstrap-osd.keyring: (2) No such file or directory
2021-03-03 14:15:15.315 7fd1f86d9700 -1 AuthRegistry(0x7fd1f00831a8) no keyring found at /etc/pve/priv/ceph.client.bootstrap-osd.keyring, disabling cephx
stderr: got monmap epoch 3
Running command: /bin/ceph-authtool /var/lib/ceph/osd/ceph-4/keyring --create-keyring --name osd.4 --add-key AQDhiz9gUsBQFBAAO9W32Nnh80a0dTPSSmQf5w==
stdout: creating /var/lib/ceph/osd/ceph-4/keyring
added entity osd.4 auth(key=AQDhiz9gUsBQFBAAO9W32Nnh80a0dTPSSmQf5w==)
Running command: /bin/chown -R ceph:ceph /var/lib/ceph/osd/ceph-4/keyring
Running command: /bin/chown -R ceph:ceph /var/lib/ceph/osd/ceph-4/
Running command: /bin/ceph-osd --cluster ceph --osd-objectstore bluestore --mkfs -i 4 --monmap /var/lib/ceph/osd/ceph-4/activate.monmap --keyfile - --osd-data /var/lib/ceph/osd/ceph-4/ --osd-uuid 1f770313-60d7-4d98-8c28-cb91fa0a83a9 --setuser ceph --setgroup ceph
stderr: 2021-03-03 14:15:15.955 7feef5859c80 -1 bluestore(/var/lib/ceph/osd/ceph-4/) _read_fsid unparsable uuid
--> ceph-volume lvm prepare successful for: /dev/sdf
and there is no way to go further. I've not noticed that in these logs is shown an error:
stderr: 2021-03-03 14:15:15.315 7fd1f86d9700 -1 auth: unable to find a keyring on /etc/pve/priv/ceph.client.bootstrap-osd.keyring: (2) No such file or directory
should be the cause of the problem? Do you know how can I solve this problem?

Piviul
 
The task of adding a new OSD took an hour long before you cancelled it?

That does sound wrong. Is the disk okay?

You can fully wipe it with sgdisk -Z /dev/sdX
Yes, the disk is new:
#
smartctl -a -d cciss,4 /dev/sdf
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.65-1-pve] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model: Micron_5300_MTFDDAK1T9TDS
Serial Number: 20522C2BD48A
LU WWN Device Id: 5 00a075 12c2bd48a
Firmware Version: D3MU001
User Capacity: 1,920,383,410,176 bytes [1.92 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: Solid State Device
Form Factor: 2.5 inches
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: ACS-4 (minor revision not indicated)
SATA Version is: SATA 3.3, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Wed Mar 3 16:23:23 2021 CET
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART Status not supported: Incomplete response, ATA output registers missing
SMART overall-health self-assessment test result: PASSED
Warning: This result is based on an Attribute check.

General SMART Values:
Offline data collection status: (0x00) Offline data collection activity
was never started.
Auto Offline Data Collection: Disabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: ( 3706) seconds.
Offline data collection
capabilities: (0x7b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 2) minutes.
Extended self-test routine
recommended polling time: ( 14) minutes.
Conveyance self-test routine
recommended polling time: ( 3) minutes.
SCT capabilities: (0x0035) SCT Status supported.
SCT Feature Control supported.
SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x002f 100 100 050 Pre-fail Always - 0
5 Reallocated_Sector_Ct 0x0032 100 100 001 Old_age Always - 0
9 Power_On_Hours 0x0032 100 100 000 Old_age Always - 313
12 Power_Cycle_Count 0x0032 100 100 001 Old_age Always - 3
170 Unknown_Attribute 0x0033 100 100 010 Pre-fail Always - 0
171 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 0
172 Unknown_Attribute 0x0032 100 100 001 Old_age Always - 0
173 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 1
174 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 2
183 Runtime_Bad_Block 0x0032 100 100 000 Old_age Always - 0
184 End-to-End_Error 0x0032 100 100 000 Old_age Always - 0
187 Reported_Uncorrect 0x0032 100 100 000 Old_age Always - 0
188 Command_Timeout 0x0032 100 100 000 Old_age Always - 2
194 Temperature_Celsius 0x0022 075 071 000 Old_age Always - 25 (Min/Max 17/29)
195 Hardware_ECC_Recovered 0x0032 100 100 000 Old_age Always - 0
196 Reallocated_Event_Count 0x0032 100 100 000 Old_age Always - 0
197 Current_Pending_Sector 0x0032 100 100 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0030 100 100 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x0032 100 100 000 Old_age Always - 0
202 Unknown_SSD_Attribute 0x0030 100 100 001 Old_age Offline - 0
206 Unknown_SSD_Attribute 0x000e 100 100 000 Old_age Always - 0
246 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 823432
247 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 25733
248 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 200815
180 Unused_Rsvd_Blk_Cnt_Tot 0x0033 100 100 000 Pre-fail Always - 4800
210 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 0
211 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 7
212 Unknown_Attribute 0x0032 100 100 000 Old_age Always - 0

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error
# 1 Short offline Completed without error 00% 313 -

SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Completed [00% left] (126468096-126533631)
4 0 0 Not_testing
5 0 0 Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

That's seems ok, isn't it?

Piviul
 
The task of adding a new OSD took an hour long before you cancelled it?
yes never end, I have to stop myself. Should be tied to the fact that this node has proxmox 6.2.12 but other nodes have proxmox 6.3.4?

That does sound wrong. Is the disk okay?
yes the disk is new and it is ok.

You can fully wipe it with sgdisk -Z /dev/sdX
That seems to works but doesn't remove the disk from "out" OSDs. There is a way to remove this device ever from out OSDs?

Piviul
 
Run a ceph osd tree and check if you have stray OSD. If so, remove it. Then you may need to delete the auth key as well (ceph auth del osd.X). After that try again.
This is the oputput of ceph osd tree:
ceph osd tree
ID CLASS WEIGHT TYPE NAME STATUS REWEIGHT PRI-AFF
-1 3.49319 root default
-3 3.49319 host pve03
1 ssd 1.74660 osd.1 up 1.00000 1.00000
2 ssd 1.74660 osd.2 up 1.00000 1.00000
0 0 osd.0 down 0 1.00000
3 0 osd.3 down 0 1.00000
4 0 osd.4 down 0 1.00000
but I can't understand what you mean with "check if you have stray OSD". Any way to remove the OSDs failed devices I run
Code:
ceph osd rm osd.{0,3,4}
and now the output of ceph osd tree is:
ID CLASS WEIGHT TYPE NAME STATUS REWEIGHT PRI-AFF
-1 3.49319 root default
-3 3.49319 host pve03
1 ssd 1.74660 osd.1 up 1.00000 1.00000
2 ssd 1.74660 osd.2 up 1.00000 1.00000
Furthermore as you suggested me I have removed the auth keys as well with the command
Code:
ceph auth del osd.{4,3,0}
. Any way If I try to add the sdx device to the OSDs with the command
Code:
pveceph osd create /dev/sdx
I I get the error:
device '/dev/sdx' is already in use
Have you any idea how to clean the failed devices from proxmox in a way I can try to re-add to CEPH OSDs

Thank you very much

Piviul
 
Probably it still is in use? If not, then run the command @aaron suggested.
I run the command that aaron suggested me... in effect proxmox says that is in use but it isn't: as I have wrote I have only cancel the osd creations on the drive...

Do you know how to reset ceph in a way I can try to configure/install it from zero?

Piviul
 
It's not an issue with ceph. Either you will need to re-run the command or in a later consequence do a reboot. The disk might have not been released by the kernel.
You are right. rebooting the server the drive has been released.

Aligning packages between nodes installing all updates available, solve the adding drive to OSDs problem found early

Thank you very much!

Piviul
 
  • Like
Reactions: Alwin Antreich

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!