Query
Hi All, i have a table in my vertica db having some failed devices i need a help how can i select failed device.
column having failed entries is like below.
Resume of ZTE_E300_SYS .E300_02 Connectivity FAILED!!!..
ZTE_E300_SYS .E300_02 this is device name
Thanks in advance.
Br.
0
Comments
Hi,
How many nodes are in your cluster? Is your K Safety at least 1? If you have a failed device, you can replace it, and Vertica will recover the data from a buddy projection.
I think you'll need to run some OS command to check for bad blocks on a device.
Example:
Hi, Thanks for your reply.
there are 3 nodes in a vertica cluster.
let me explain my query more for better understanding.
For example, i have 5 failed devices in my db table and 7 opened devices just need to find out the 5 failed device using query.
Oh. I thought you meant you had a failed disk
A simple REPLACE might help?
dbadmin=> SELECT * FROM devices; message ---------------------------------------------------------- Resume of ZTE_E300_SYS .E300_02 Connectivity FAILED!!!.. (1 row) dbadmin=> SELECT message, dbadmin-> REPLACE(REPLACE(message, 'Resume of ', ''), ' Connectivity FAILED!!!..', '') device dbadmin-> FROM devices; message | device ----------------------------------------------------------+----------------------- Resume of ZTE_E300_SYS .E300_02 Connectivity FAILED!!!.. | ZTE_E300_SYS .E300_02 (1 row)Hi, Thanks for your help this is now interesting and i need your help more here.
how can i altered my query more to just select ".E300_02 Failed" from the string "Resume of ZTE_E300_SYS .E300_02 Connectivity Failed!!!..
dbadmin=> SELECT message, rtrim(split_part(split_part(message, '.', 2), ' ', 1) || ' ' || split_part(split_part(message, '.', 2), ' ', 3), '!') error_msg from devices; message | error_msg ----------------------------------------------------------+---------------- Resume of ZTE_E300_SYS .E300_02 Connectivity FAILED!!!.. | E300_02 FAILED (1 row)Hi Jim, Thanks (Y) it is really helpfull (Y)