Ceph displayed size calculation - ceph

I'm currently running a Ceph cluster ( Nautilus 14.2.8-59.el8cp ) and I have questions about the sizes shown :
What exactly are the "USED" and "MAX AVAIL" columns in 'ceph df' output, and how is it calculated ?
If I mount a CephFS space on a Linux machine, why does the "size" column of "df -h" output change ? I mean, I had "48T" in size a few days ago and now I have "46T", my CephFS pool is shrinking ???
No OSDs down at all
Users cleaned their CephFS space, retrieved 11T of free space and the total raise to 48T instead of 46T, this is weird
I have 1024 PGs for the CephFS, I don't know if it's enough
I can't find documentation about the sizing calculation shown by Ceph, it's kind of a blackbox
Thank you
Ceph df
RAW STORAGE:
CLASS SIZE AVAIL USED RAW USED %RAW USED
MixedUse 680 TiB 465 TiB 214 TiB 214 TiB 31.54
ReadIntensive 204 TiB 85 TiB 119 TiB 120 TiB 58.59
TOTAL 884 TiB 550 TiB 333 TiB 334 TiB 37.79
POOLS:
POOL ID STORED OBJECTS USED %USED MAX AVAIL
glance 1 31 GiB 4.66k 93 GiB 0.03 92 TiB
cinder 2 9.4 TiB 2.56M 28 TiB 9.23 92 TiB
nova 3 62 TiB 16.25M 185 TiB 40.08 92 TiB
cinder-backup 4 0 B 0 0 B 0 92 TiB
gnocchi 5 0 B 0 0 B 0 92 TiB
cephfs_data 6 40 TiB 11.46M 119 TiB 88.02 5.4 TiB
cephfs_metadata 7 749 MiB 88.95k 1.2 GiB 0 5.4 TiB
scbench 8 28 GiB 6.76k 84 GiB 0.50 5.4 TiB
Ceph osd tree
ID CLASS WEIGHT TYPE NAME STATUS REWEIGHT PRI-AFF
-1 884.05933 root default
-19 817.39832 datacenter DC3
-15 204.34959 rack J07
-3 68.11653 host server-01797
0 MixedUse 5.82190 osd.0 up 1.00000 1.00000
24 MixedUse 1.45549 osd.24 up 1.00000 1.00000
30 MixedUse 1.45549 osd.30 up 1.00000 1.00000
31 MixedUse 5.82190 osd.31 up 1.00000 1.00000
37 MixedUse 5.82190 osd.37 up 1.00000 1.00000
42 MixedUse 5.82190 osd.42 up 1.00000 1.00000
47 MixedUse 5.82190 osd.47 up 1.00000 1.00000
52 MixedUse 5.82190 osd.52 up 1.00000 1.00000
58 MixedUse 1.45549 osd.58 up 1.00000 1.00000
87 MixedUse 1.45549 osd.87 up 1.00000 1.00000
102 MixedUse 5.82190 osd.102 up 1.00000 1.00000
188 MixedUse 5.82190 osd.188 up 1.00000 1.00000
7 ReadIntensive 1.74660 osd.7 up 1.00000 1.00000
13 ReadIntensive 1.74660 osd.13 up 1.00000 1.00000
20 ReadIntensive 1.74660 osd.20 up 1.00000 1.00000
85 ReadIntensive 1.74660 osd.85 up 1.00000 1.00000
124 ReadIntensive 1.74660 osd.124 up 1.00000 1.00000
125 ReadIntensive 1.74660 osd.125 up 1.00000 1.00000
126 ReadIntensive 1.74660 osd.126 up 1.00000 1.00000
127 ReadIntensive 1.74660 osd.127 up 1.00000 1.00000
130 ReadIntensive 1.74660 osd.130 up 1.00000 1.00000
-5 68.11653 host server-01798
1 MixedUse 5.82190 osd.1 up 1.00000 1.00000
28 MixedUse 5.82190 osd.28 up 1.00000 1.00000
35 MixedUse 5.82190 osd.35 up 1.00000 1.00000
40 MixedUse 5.82190 osd.40 up 1.00000 1.00000
45 MixedUse 5.82190 osd.45 up 1.00000 1.00000
50 MixedUse 5.82190 osd.50 up 1.00000 1.00000
55 MixedUse 1.45549 osd.55 up 1.00000 1.00000
59 MixedUse 1.45549 osd.59 up 1.00000 1.00000
64 MixedUse 5.82190 osd.64 up 1.00000 1.00000
119 MixedUse 1.45549 osd.119 up 1.00000 1.00000
122 MixedUse 1.45549 osd.122 up 1.00000 1.00000
236 MixedUse 5.82190 osd.236 up 1.00000 1.00000
6 ReadIntensive 1.74660 osd.6 up 1.00000 1.00000
12 ReadIntensive 1.74660 osd.12 up 1.00000 1.00000
18 ReadIntensive 1.74660 osd.18 up 1.00000 1.00000
131 ReadIntensive 1.74660 osd.131 up 1.00000 1.00000
132 ReadIntensive 1.74660 osd.132 up 1.00000 1.00000
133 ReadIntensive 1.74660 osd.133 up 1.00000 1.00000
136 ReadIntensive 1.74660 osd.136 up 1.00000 1.00000
137 ReadIntensive 1.74660 osd.137 up 1.00000 1.00000
138 ReadIntensive 1.74660 osd.138 up 1.00000 1.00000
-7 68.11653 host server-01799
2 MixedUse 5.82190 osd.2 up 1.00000 1.00000
25 MixedUse 5.82190 osd.25 up 1.00000 1.00000
32 MixedUse 5.82190 osd.32 up 1.00000 1.00000
38 MixedUse 5.82190 osd.38 up 1.00000 1.00000
43 MixedUse 5.82190 osd.43 up 1.00000 1.00000
48 MixedUse 5.82190 osd.48 up 1.00000 1.00000
57 MixedUse 1.45549 osd.57 up 1.00000 1.00000
61 MixedUse 1.45549 osd.61 up 1.00000 1.00000
101 MixedUse 5.82190 osd.101 up 1.00000 1.00000
107 MixedUse 1.45549 osd.107 up 1.00000 1.00000
110 MixedUse 1.45549 osd.110 up 1.00000 1.00000
212 MixedUse 5.82190 osd.212 up 1.00000 1.00000
9 ReadIntensive 1.74660 osd.9 up 1.00000 1.00000
15 ReadIntensive 1.74660 osd.15 up 1.00000 1.00000
21 ReadIntensive 1.74660 osd.21 up 1.00000 1.00000
153 ReadIntensive 1.74660 osd.153 up 1.00000 1.00000
154 ReadIntensive 1.74660 osd.154 up 1.00000 1.00000
155 ReadIntensive 1.74660 osd.155 up 1.00000 1.00000
156 ReadIntensive 1.74660 osd.156 up 1.00000 1.00000
157 ReadIntensive 1.74660 osd.157 up 1.00000 1.00000
158 ReadIntensive 1.74660 osd.158 up 1.00000 1.00000
-37 204.34953 rack J08
-31 68.11647 host server-06076
93 MixedUse 5.82190 osd.93 up 1.00000 1.00000
95 MixedUse 5.82190 osd.95 up 1.00000 1.00000
97 MixedUse 5.82190 osd.97 up 1.00000 1.00000
99 MixedUse 5.82190 osd.99 up 1.00000 1.00000
103 MixedUse 5.82190 osd.103 up 1.00000 1.00000
144 MixedUse 5.82190 osd.144 up 1.00000 1.00000
162 MixedUse 1.45547 osd.162 up 1.00000 1.00000
163 MixedUse 1.45547 osd.163 up 1.00000 1.00000
165 MixedUse 1.45547 osd.165 up 1.00000 1.00000
166 MixedUse 1.45547 osd.166 up 1.00000 1.00000
172 MixedUse 5.82190 osd.172 up 1.00000 1.00000
284 MixedUse 5.82190 osd.284 up 1.00000 1.00000
139 ReadIntensive 1.74660 osd.139 up 1.00000 1.00000
143 ReadIntensive 1.74660 osd.143 up 1.00000 1.00000
145 ReadIntensive 1.74660 osd.145 up 1.00000 1.00000
146 ReadIntensive 1.74660 osd.146 up 1.00000 1.00000
147 ReadIntensive 1.74660 osd.147 up 1.00000 1.00000
149 ReadIntensive 1.74660 osd.149 up 1.00000 1.00000
150 ReadIntensive 1.74660 osd.150 up 1.00000 1.00000
151 ReadIntensive 1.74660 osd.151 up 1.00000 1.00000
152 ReadIntensive 1.74660 osd.152 up 1.00000 1.00000
-34 68.11653 host server-06077
53 MixedUse 5.82190 osd.53 up 1.00000 1.00000
71 MixedUse 5.82190 osd.71 up 1.00000 1.00000
76 MixedUse 5.82190 osd.76 up 1.00000 1.00000
84 MixedUse 5.82190 osd.84 up 1.00000 1.00000
89 MixedUse 5.82190 osd.89 up 1.00000 1.00000
121 MixedUse 5.82190 osd.121 up 1.00000 1.00000
148 MixedUse 5.82190 osd.148 up 1.00000 1.00000
168 MixedUse 5.82190 osd.168 up 1.00000 1.00000
186 MixedUse 1.45549 osd.186 up 1.00000 1.00000
187 MixedUse 1.45549 osd.187 up 1.00000 1.00000
189 MixedUse 1.45549 osd.189 up 1.00000 1.00000
190 MixedUse 1.45549 osd.190 up 1.00000 1.00000
169 ReadIntensive 1.74660 osd.169 up 1.00000 1.00000
170 ReadIntensive 1.74660 osd.170 up 1.00000 1.00000
171 ReadIntensive 1.74660 osd.171 up 1.00000 1.00000
232 ReadIntensive 1.74660 osd.232 up 1.00000 1.00000
233 ReadIntensive 1.74660 osd.233 up 1.00000 1.00000
239 ReadIntensive 1.74660 osd.239 up 1.00000 1.00000
245 ReadIntensive 1.74660 osd.245 up 1.00000 1.00000
246 ReadIntensive 1.74660 osd.246 up 1.00000 1.00000
247 ReadIntensive 1.74660 osd.247 up 1.00000 1.00000
-40 68.11653 host server-06078
63 MixedUse 5.82190 osd.63 up 1.00000 1.00000
72 MixedUse 5.82190 osd.72 up 1.00000 1.00000
78 MixedUse 5.82190 osd.78 up 1.00000 1.00000
88 MixedUse 5.82190 osd.88 up 1.00000 1.00000
91 MixedUse 5.82190 osd.91 up 1.00000 1.00000
140 MixedUse 5.82190 osd.140 up 1.00000 1.00000
192 MixedUse 5.82190 osd.192 up 1.00000 1.00000
196 MixedUse 5.82190 osd.196 up 1.00000 1.00000
210 MixedUse 1.45549 osd.210 up 1.00000 1.00000
211 MixedUse 1.45549 osd.211 up 1.00000 1.00000
213 MixedUse 1.45549 osd.213 up 1.00000 1.00000
214 MixedUse 1.45549 osd.214 up 1.00000 1.00000
193 ReadIntensive 1.74660 osd.193 up 1.00000 1.00000
194 ReadIntensive 1.74660 osd.194 up 1.00000 1.00000
195 ReadIntensive 1.74660 osd.195 up 1.00000 1.00000
248 ReadIntensive 1.74660 osd.248 up 1.00000 1.00000
249 ReadIntensive 1.74660 osd.249 up 1.00000 1.00000
250 ReadIntensive 1.74660 osd.250 up 1.00000 1.00000
251 ReadIntensive 1.74660 osd.251 up 1.00000 1.00000
252 ReadIntensive 1.74660 osd.252 up 1.00000 1.00000
253 ReadIntensive 1.74660 osd.253 up 1.00000 1.00000
-16 204.34959 rack K07
-9 68.11653 host server-01800
3 MixedUse 5.82190 osd.3 up 1.00000 1.00000
34 MixedUse 5.82190 osd.34 up 1.00000 1.00000
41 MixedUse 5.82190 osd.41 up 1.00000 1.00000
49 MixedUse 5.82190 osd.49 up 1.00000 1.00000
62 MixedUse 5.82190 osd.62 up 1.00000 1.00000
65 MixedUse 5.82190 osd.65 up 1.00000 1.00000
66 MixedUse 5.82190 osd.66 up 1.00000 1.00000
67 MixedUse 1.45549 osd.67 up 1.00000 1.00000
68 MixedUse 1.45549 osd.68 up 1.00000 1.00000
69 MixedUse 5.82190 osd.69 up 1.00000 1.00000
70 MixedUse 1.45549 osd.70 up 1.00000 1.00000
73 MixedUse 1.45549 osd.73 up 1.00000 1.00000
22 ReadIntensive 1.74660 osd.22 up 1.00000 1.00000
29 ReadIntensive 1.74660 osd.29 up 1.00000 1.00000
33 ReadIntensive 1.74660 osd.33 up 1.00000 1.00000
159 ReadIntensive 1.74660 osd.159 up 1.00000 1.00000
160 ReadIntensive 1.74660 osd.160 up 1.00000 1.00000
161 ReadIntensive 1.74660 osd.161 up 1.00000 1.00000
167 ReadIntensive 1.74660 osd.167 up 1.00000 1.00000
173 ReadIntensive 1.74660 osd.173 up 1.00000 1.00000
174 ReadIntensive 1.74660 osd.174 up 1.00000 1.00000
-11 68.11653 host server-01801
4 MixedUse 5.82190 osd.4 up 1.00000 1.00000
10 MixedUse 5.82190 osd.10 up 1.00000 1.00000
26 MixedUse 5.82190 osd.26 up 1.00000 1.00000
36 MixedUse 5.82190 osd.36 up 1.00000 1.00000
46 MixedUse 5.82190 osd.46 up 1.00000 1.00000
56 MixedUse 5.82190 osd.56 up 1.00000 1.00000
116 MixedUse 5.82190 osd.116 up 1.00000 1.00000
128 MixedUse 5.82190 osd.128 up 1.00000 1.00000
134 MixedUse 1.45549 osd.134 up 1.00000 1.00000
135 MixedUse 1.45549 osd.135 up 1.00000 1.00000
141 MixedUse 1.45549 osd.141 up 1.00000 1.00000
142 MixedUse 1.45549 osd.142 up 1.00000 1.00000
8 ReadIntensive 1.74660 osd.8 up 1.00000 1.00000
14 ReadIntensive 1.74660 osd.14 up 1.00000 1.00000
19 ReadIntensive 1.74660 osd.19 up 1.00000 1.00000
175 ReadIntensive 1.74660 osd.175 up 1.00000 1.00000
176 ReadIntensive 1.74660 osd.176 up 1.00000 1.00000
177 ReadIntensive 1.74660 osd.177 up 1.00000 1.00000
178 ReadIntensive 1.74660 osd.178 up 1.00000 1.00000
179 ReadIntensive 1.74660 osd.179 up 1.00000 1.00000
180 ReadIntensive 1.74660 osd.180 up 1.00000 1.00000
-13 68.11653 host server-01802
5 MixedUse 5.82190 osd.5 up 1.00000 1.00000
16 MixedUse 5.82190 osd.16 up 1.00000 1.00000
27 MixedUse 5.82190 osd.27 up 1.00000 1.00000
39 MixedUse 5.82190 osd.39 up 1.00000 1.00000
44 MixedUse 5.82190 osd.44 up 1.00000 1.00000
51 MixedUse 5.82190 osd.51 up 1.00000 1.00000
54 MixedUse 1.45549 osd.54 up 1.00000 1.00000
60 MixedUse 1.45549 osd.60 up 1.00000 1.00000
94 MixedUse 1.45549 osd.94 up 1.00000 1.00000
96 MixedUse 1.45549 osd.96 up 1.00000 1.00000
129 MixedUse 5.82190 osd.129 up 1.00000 1.00000
260 MixedUse 5.82190 osd.260 up 1.00000 1.00000
11 ReadIntensive 1.74660 osd.11 up 1.00000 1.00000
17 ReadIntensive 1.74660 osd.17 up 1.00000 1.00000
23 ReadIntensive 1.74660 osd.23 up 1.00000 1.00000
181 ReadIntensive 1.74660 osd.181 up 1.00000 1.00000
182 ReadIntensive 1.74660 osd.182 up 1.00000 1.00000
183 ReadIntensive 1.74660 osd.183 up 1.00000 1.00000
184 ReadIntensive 1.74660 osd.184 up 1.00000 1.00000
185 ReadIntensive 1.74660 osd.185 up 1.00000 1.00000
191 ReadIntensive 1.74660 osd.191 up 1.00000 1.00000
-43 204.34959 rack K08
-46 68.11653 host server-06079
75 MixedUse 5.82190 osd.75 up 1.00000 1.00000
82 MixedUse 5.82190 osd.82 up 1.00000 1.00000
86 MixedUse 5.82190 osd.86 up 1.00000 1.00000
92 MixedUse 5.82190 osd.92 up 1.00000 1.00000
106 MixedUse 5.82190 osd.106 up 1.00000 1.00000
111 MixedUse 5.82190 osd.111 up 1.00000 1.00000
216 MixedUse 5.82190 osd.216 up 1.00000 1.00000
220 MixedUse 5.82190 osd.220 up 1.00000 1.00000
234 MixedUse 1.45549 osd.234 up 1.00000 1.00000
235 MixedUse 1.45549 osd.235 up 1.00000 1.00000
237 MixedUse 1.45549 osd.237 up 1.00000 1.00000
238 MixedUse 1.45549 osd.238 up 1.00000 1.00000
209 ReadIntensive 1.74660 osd.209 up 1.00000 1.00000
215 ReadIntensive 1.74660 osd.215 up 1.00000 1.00000
217 ReadIntensive 1.74660 osd.217 up 1.00000 1.00000
218 ReadIntensive 1.74660 osd.218 up 1.00000 1.00000
219 ReadIntensive 1.74660 osd.219 up 1.00000 1.00000
221 ReadIntensive 1.74660 osd.221 up 1.00000 1.00000
222 ReadIntensive 1.74660 osd.222 up 1.00000 1.00000
223 ReadIntensive 1.74660 osd.223 up 1.00000 1.00000
224 ReadIntensive 1.74660 osd.224 up 1.00000 1.00000
-52 68.11653 host server-06080
79 MixedUse 5.82190 osd.79 up 1.00000 1.00000
83 MixedUse 5.82190 osd.83 up 1.00000 1.00000
98 MixedUse 5.82190 osd.98 up 1.00000 1.00000
108 MixedUse 5.82190 osd.108 up 1.00000 1.00000
113 MixedUse 5.82190 osd.113 up 1.00000 1.00000
164 MixedUse 5.82190 osd.164 up 1.00000 1.00000
240 MixedUse 5.82190 osd.240 up 1.00000 1.00000
258 MixedUse 1.45549 osd.258 up 1.00000 1.00000
259 MixedUse 1.45549 osd.259 up 1.00000 1.00000
261 MixedUse 1.45549 osd.261 up 1.00000 1.00000
262 MixedUse 1.45549 osd.262 up 1.00000 1.00000
268 MixedUse 5.82190 osd.268 up 1.00000 1.00000
203 ReadIntensive 1.74660 osd.203 up 1.00000 1.00000
204 ReadIntensive 1.74660 osd.204 up 1.00000 1.00000
205 ReadIntensive 1.74660 osd.205 up 1.00000 1.00000
206 ReadIntensive 1.74660 osd.206 up 1.00000 1.00000
207 ReadIntensive 1.74660 osd.207 up 1.00000 1.00000
208 ReadIntensive 1.74660 osd.208 up 1.00000 1.00000
241 ReadIntensive 1.74660 osd.241 up 1.00000 1.00000
242 ReadIntensive 1.74660 osd.242 up 1.00000 1.00000
243 ReadIntensive 1.74660 osd.243 up 1.00000 1.00000
-49 68.11653 host server-06081
77 MixedUse 5.82190 osd.77 up 1.00000 1.00000
81 MixedUse 5.82190 osd.81 up 1.00000 1.00000
90 MixedUse 5.82190 osd.90 up 1.00000 1.00000
104 MixedUse 5.82190 osd.104 up 1.00000 1.00000
105 MixedUse 5.82190 osd.105 up 1.00000 1.00000
112 MixedUse 5.82190 osd.112 up 1.00000 1.00000
244 MixedUse 5.82190 osd.244 up 1.00000 1.00000
264 MixedUse 5.82190 osd.264 up 1.00000 1.00000
282 MixedUse 1.45549 osd.282 up 1.00000 1.00000
283 MixedUse 1.45549 osd.283 up 1.00000 1.00000
285 MixedUse 1.45549 osd.285 up 1.00000 1.00000
286 MixedUse 1.45549 osd.286 up 1.00000 1.00000
197 ReadIntensive 1.74660 osd.197 up 1.00000 1.00000
198 ReadIntensive 1.74660 osd.198 up 1.00000 1.00000
199 ReadIntensive 1.74660 osd.199 up 1.00000 1.00000
200 ReadIntensive 1.74660 osd.200 up 1.00000 1.00000
201 ReadIntensive 1.74660 osd.201 up 1.00000 1.00000
202 ReadIntensive 1.74660 osd.202 up 1.00000 1.00000
265 ReadIntensive 1.74660 osd.265 up 1.00000 1.00000
266 ReadIntensive 1.74660 osd.266 up 1.00000 1.00000
267 ReadIntensive 1.74660 osd.267 up 1.00000 1.00000
-61 66.66104 datacenter DC4
-58 66.66104 rack N21
-55 66.66104 host server-06694
74 MixedUse 5.82190 osd.74 up 1.00000 1.00000
80 MixedUse 5.82190 osd.80 up 1.00000 1.00000
100 MixedUse 5.82190 osd.100 up 1.00000 1.00000
109 MixedUse 5.82190 osd.109 up 1.00000 1.00000
115 MixedUse 5.82190 osd.115 up 1.00000 1.00000
117 MixedUse 5.82190 osd.117 up 1.00000 1.00000
118 MixedUse 5.82190 osd.118 up 1.00000 1.00000
123 MixedUse 5.82190 osd.123 up 1.00000 1.00000
288 MixedUse 1.45549 osd.288 up 1.00000 1.00000
289 MixedUse 1.45549 osd.289 up 1.00000 1.00000
290 MixedUse 1.45549 osd.290 up 1.00000 1.00000
114 ReadIntensive 1.74660 osd.114 up 1.00000 1.00000
120 ReadIntensive 1.74660 osd.120 up 1.00000 1.00000
225 ReadIntensive 1.74660 osd.225 up 1.00000 1.00000
226 ReadIntensive 1.74660 osd.226 up 1.00000 1.00000
227 ReadIntensive 1.74660 osd.227 up 1.00000 1.00000
228 ReadIntensive 1.74660 osd.228 up 1.00000 1.00000
229 ReadIntensive 1.74660 osd.229 up 1.00000 1.00000
230 ReadIntensive 1.74660 osd.230 up 1.00000 1.00000
231 ReadIntensive 1.74660 osd.231 up 1.00000 1.00000

These questions have been asked many times on the ceph-users mailing list. I would recommend to search the archives for a more detailed explanation. But to briefly answer your questions:
What exactly are the "USED" and "MAX AVAIL" columns in 'ceph df'
output, and how is it calculated ?
"Used" is what it says, the raw storage the pool is using (including replication). You seem to be using an older ceph version, can you confirm? In your case "used" is three times the "stored" value, so you're probably using a replicated pool of size 3. The "max avail" value is an estimation of ceph based on several criteria like the fullest OSD, the crush device class etc. It tries to predict how much free space you have in your cluster, this prediction varies depending on how fast pools are getting full.
If I mount a CephFS space on a Linux machine, why does the "size"
column of "df -h" output change ? I mean, I had "48T" in size a few
days ago and now I have "46T", my CephFS pool is shrinking ???
You probably had down OSDs, I would assume. The size of your cluster is calculated by taking into account every single OSD, if one fails or is down the cluster size will shrink.

Related

Recover from failed Ceph Cluster - Inactive PGs (Down)

Ceph Cluster PGs inactive/down.
I had a healthy cluster and tried adding a new node using ceph-deploy tool. I didn't put enable noout flag before adding node to cluster.
So while using ceph-deploy tool, I ended up deleting new OSD nodes couple of times and it looks like Ceph tries to balance PGs and now those PGs are inactive/down state.
I tried recovering one PG just to see if it recover but that's not the case. I am using ceph to manage OpenStack glance images and VMs. So now all new VMs and existing VMs are slow or not responding.
Current Output of Ceph tree: (Note fre201 is new node. I have recently disabled OSD services on that node)
[root#fre201 ceph]# ceph osd tree
ID CLASS WEIGHT TYPE NAME STATUS REWEIGHT PRI-AFF
-1 70.92137 root default
-2 5.45549 host fre101
0 hdd 1.81850 osd.0 up 1.00000 1.00000
1 hdd 1.81850 osd.1 up 1.00000 1.00000
2 hdd 1.81850 osd.2 up 1.00000 1.00000
-9 5.45549 host fre103
3 hdd 1.81850 osd.3 up 1.00000 1.00000
4 hdd 1.81850 osd.4 up 1.00000 1.00000
5 hdd 1.81850 osd.5 up 1.00000 1.00000
-3 5.45549 host fre105
6 hdd 1.81850 osd.6 up 1.00000 1.00000
7 hdd 1.81850 osd.7 up 1.00000 1.00000
8 hdd 1.81850 osd.8 up 1.00000 1.00000
-4 5.45549 host fre107
9 hdd 1.81850 osd.9 up 1.00000 1.00000
10 hdd 1.81850 osd.10 up 1.00000 1.00000
11 hdd 1.81850 osd.11 up 1.00000 1.00000
-5 5.45549 host fre109
12 hdd 1.81850 osd.12 up 1.00000 1.00000
13 hdd 1.81850 osd.13 up 1.00000 1.00000
14 hdd 1.81850 osd.14 up 1.00000 1.00000
-6 5.45549 host fre111
15 hdd 1.81850 osd.15 up 1.00000 1.00000
16 hdd 1.81850 osd.16 up 1.00000 1.00000
17 hdd 1.81850 osd.17 up 0.79999 1.00000
-7 5.45549 host fre113
18 hdd 1.81850 osd.18 up 1.00000 1.00000
19 hdd 1.81850 osd.19 up 1.00000 1.00000
20 hdd 1.81850 osd.20 up 1.00000 1.00000
-8 5.45549 host fre115
21 hdd 1.81850 osd.21 up 1.00000 1.00000
22 hdd 1.81850 osd.22 up 1.00000 1.00000
23 hdd 1.81850 osd.23 up 1.00000 1.00000
-10 5.45549 host fre117
24 hdd 1.81850 osd.24 up 1.00000 1.00000
25 hdd 1.81850 osd.25 up 1.00000 1.00000
26 hdd 1.81850 osd.26 up 1.00000 1.00000
-11 5.45549 host fre119
27 hdd 1.81850 osd.27 up 1.00000 1.00000
28 hdd 1.81850 osd.28 up 1.00000 1.00000
29 hdd 1.81850 osd.29 up 1.00000 1.00000
-12 5.45549 host fre121
30 hdd 1.81850 osd.30 up 1.00000 1.00000
31 hdd 1.81850 osd.31 up 1.00000 1.00000
32 hdd 1.81850 osd.32 up 1.00000 1.00000
-13 5.45549 host fre123
33 hdd 1.81850 osd.33 up 1.00000 1.00000
34 hdd 1.81850 osd.34 up 1.00000 1.00000
35 hdd 1.81850 osd.35 up 1.00000 1.00000
-27 5.45549 host fre201
36 hdd 1.81850 osd.36 down 0 1.00000
37 hdd 1.81850 osd.37 down 0 1.00000
38 hdd 1.81850 osd.38 down 0 1.00000
Current Ceph Health:
Current Health of Ceph cluster
~ceph -s
cluster:
id: XXXXXXXXXXXXXXXX
health: HEALTH_ERR
3 pools have many more objects per pg than average
358887/12390692 objects misplaced (2.896%)
2 scrub errors
9677 PGs pending on creation
Reduced data availability: 7125 pgs inactive, 6185 pgs down, 2 pgs peering, 2709 pgs stale
Possible data damage: 2 pgs inconsistent
Degraded data redundancy: 193505/12390692 objects degraded (1.562%), 351 pgs degraded, 1303 pgs undersized
53882 slow requests are blocked > 32 sec
4082 stuck requests are blocked > 4096 sec
too many PGs per OSD (2969 > max 200)
services:
mon: 3 daemons, quorum ceph-mon01,ceph-mon02,ceph-mon03
mgr: ceph-mon03(active), standbys: ceph-mon01, ceph-mon02
osd: 39 osds: 36 up, 36 in; 51 remapped pgs
rgw: 1 daemon active
data:
pools: 18 pools, 54656 pgs
objects: 6050k objects, 10940 GB
usage: 21721 GB used, 45314 GB / 67035 GB avail
pgs: 13.036% pgs not active
193505/12390692 objects degraded (1.562%)
358887/12390692 objects misplaced (2.896%)
46177 active+clean
5070 down
1114 stale+down
1088 stale+active+undersized
547 activating
201 stale+active+undersized+degraded
173 stale+activating
96 activating+degraded
61 stale+active+clean
43 activating+remapped
39 stale+activating+degraded
24 stale+activating+remapped
9 activating+undersized+degraded+remapped
4 stale+activating+undersized+degraded+remapped
2 active+clean+inconsistent
1 stale+activating+degraded+remapped
1 stale+remapped+peering
1 active+undersized
1 stale+peering
1 stale+active+clean+remapped
1 down+remapped
1 stale+remapped
1 activating+degraded+remapped
io:
client: 967 kB/s rd, 1225 kB/s wr, 29 op/s rd, 30 op/s wr
I am not sure how to recover 7125 PGs which are present on active OSDs. Any help would be appreciated.
In luminous release of ceph. Release is enforcing maximum number of PGs as 200. In my case they were more than 3000+ so I need to set max_number_of pgs parameter in /etc/ceph/ceph.conf file of monitor and OSDs as 5000 which enabled ceph recovery.

Why am I getting the error "Index exceeds matrix dimensions"?

I am currently new to MATLAB. My code is below. I just have a question regarding why I keep getting the error "Index exceeds matrix dimensions" for the functions provided:
a = [105 97 245 163 207 134 218 199 160 196 221 154 228 131 180 178 157 151 ...
175 201 183 153 174 154 190 76 101 142 149 200 186 174 199 115 193 167 ...
171 163 87 176 121 120 181 160 194 184 165 145 160 150 181 168 158 208 ...
133 135 172 171 237 170 180 167 176 158 156 229 158 148 150 118 143 141 ...
110 133 123 146 169 158 135 149];
mean = mean(a)
std = std(a)
max = max(a)
min = min(a)
range = range(a)
Don't give variables the same names as existing functions. This shadows the function. When you then try to call the function with an argument you instead end up indexing the variable with the argument, which in this case tries to index elements in the variable that don't exist, hence your error.
Use clear to remove the existing variables, then rerun the calculations with new variable names:
clear mean std max min range;
meanResult = mean(a);
stdResult = std(a);
...
Use clc (clear command window), clear (removes all variables from the workspace) and close all (closes off any previously used figures) to clean you work space. This could help run the script better.
clc, clear, close all
a = [105 97 245 163 207 134 218 199 160 196 221 154 228 131 180 178 157 151,...,
175 201 183 153 174 154 190 76 101 142 149 200 186 174 199 115 193 167,...,
171 163 87 176 121 120 181 160 194 184 165 145 160 150 181 168 158 208,...,
133 135 172 171 237 170 180 167 176 158 156 229 158 148 150 118 143 141,...,
110 133 123 146 169 158 135 149];
Mean = mean(a)
Std = std(a)
Max = max(a)
Min = min(a)
Range = range(a)

Trying to plot a CSV file

I'm trying to plot a CSV file, and this is what it looks like:
Date Ebola: Case counts and deaths from the World Health Organization and WHO situation reports
3/22/2014 49
3/24/2014 86
3/25/2014 86
3/26/2014 86
3/27/2014 103
3/28/2014 112
3/29/2014 112
3/31/2014 122
4/1/2014 127
4/4/2014 143
4/7/2014 151
4/9/2014 158
4/11/2014 159
4/14/2014 168
4/16/2014 197
4/17/2014 203
4/20/2014 208
4/23/2014 218
4/26/2014 224
5/1/2014 226
5/3/2014 231
5/5/2014 235
5/7/2014 236
5/10/2014 233
5/12/2014 248
5/23/2014 258
5/27/2014 281
5/28/2014 291
6/1/2014 328
6/3/2014 344
6/10/2014 351
6/16/2014 398
6/18/2014 390
6/20/2014 390
6/30/2014 413
7/2/2014 412
7/6/2014 408
7/8/2014 409
7/12/2014 406
7/14/2014 411
7/17/2014 410
7/20/2014 415
7/23/2014 427
7/27/2014 460
7/30/2014 472
I imported it into my MATLAB workspace. Now I want to plot this data using MATLAB, but how do I do this? The variables I have for each column are Date and EbolaCaseCountsAndDeathsFromTheWorldHealthOrganizationAndWHOsit (sorry I don't know how to make the latter variable shorter).
I tried doing plot(Date, EbolaCa[...]) but it gives me an error. What is the right way to do it?
You must use both datenum() and datetick() to actually show dates on the x-axis. I was able to create your table snippet as follows:
T={'3/22/2014' 49
'3/24/2014' 86
'3/25/2014' 86
'3/26/2014' 86
'3/27/2014' 103
'3/28/2014' 112
'3/29/2014' 112
'3/31/2014' 122
'4/1/2014' 127
'4/4/2014' 143
'4/7/2014' 151
'4/9/2014' 158
'4/11/2014' 159
'4/14/2014' 168
'4/16/2014' 197
'4/17/2014' 203
'4/20/2014' 208
'4/23/2014' 218
'4/26/2014' 224
'5/1/2014' 226
'5/3/2014' 231
'5/5/2014' 235
'5/7/2014' 236
'5/10/2014' 233
'5/12/2014' 248
'5/23/2014' 258
'5/27/2014' 281
'5/28/2014' 291
'6/1/2014' 328
'6/3/2014' 344
'6/10/2014' 351
'6/16/2014' 398
'6/18/2014' 390
'6/20/2014' 390
'6/30/2014' 413
'7/2/2014' 412
'7/6/2014' 408
'7/8/2014' 409
'7/12/2014' 406
'7/14/2014' 411
'7/17/2014' 410
'7/20/2014' 415
'7/23/2014' 427
'7/27/2014' 460
'7/30/2014' 472};
T=cell2table(T);
T.Properties.VariableNames={'Date','Ebola'};
where the first column is composed by strings and the second column is composed by numbers. To generate the plot() you might want to do something like
figure(1);
plot(datenum(T.Date,'m/dd/yyyy'),T.Ebola);
datetick('x','dd/mmm/yyyy'); grid on;
which shows
However, feel free to adjust datenum() and datetick() format(s) as you wish.

Saving (in a matrix) the elapsed time and number of iterations for a large number of cases

I have a program that outputs the number of iterations and a test value, given inputs A1,A2,A3,A4.
I want to run through 5 values each of A1, A2, A3, A4, thus making 625 runs. In the process, I want to save the time elapsed for each run, the number of iterations, and test value in 3 separate matrices.
I have tried using 4 nested for loops, and made progress, but need some help on indexing the elements of the matrices. The iterator variables in the for loops don't match the indexing variables...
The code for the 4 nested loops is below:
m = logspace(-4,4,5);
n = logspace(0,8,5);
eltime = zeros(5,length(m)*length(m)*length(m));
for A1 = m
for A2 = m
for A3 = m
for A4 = n
tic
SmallMAX(A1,A2,A3,A4)
toc;
for i=1:numel(eltime)
for j = 1:length(n)
eltime(j,i) = toc;
end
end
end
end
end
end
The code for the main program is excerpted below:
function [k,test] = SmallMAX(A1,A2,A3,A4)
...
end
Thanks for any help.
In your case, the easiest way is to use A1, A2, A3 and A4 as counters instead of the actual values. This way you them to index the entries of eltime. We can then easily calculate the index in the second dimension with sub2ind and use A4 to index the first dimension of eltime. We need to adjust the arguments in SmallMAX as well.
Here is the code of the proposed method:
m = logspace(-4,4,5);
n = logspace(0,8,5);
eltime = zeros(length(n),length(m)*length(m)*length(m));
res_k = zeros(length(n),length(m)*length(m)*length(m)); % or zeros(size(eltime));
res_test = zeros(length(n),length(m)*length(m)*length(m)); % or zeros(size(eltime));
for A1 = 1:length(m)
for A2 = 1:length(m)
for A3 = 1:length(m)
for A4 = 1:length(n)
ind = sub2ind([length(m),length(m),length(m)],A3,A2,A1);
tic
[k,test] = SmallMAX(m(A1),m(A2),m(A3),n(A4));
eltime(A4,ind) = toc;
res_k(A4,ind) = k;
res_test(A4,ind) = test;
end
end
end
end
This is the order of the addressed entries of eltime:
eltime_order =
Columns 1 through 18
1 6 11 16 21 26 31 36 41 46 51 56 61 66 71 76 81 86
2 7 12 17 22 27 32 37 42 47 52 57 62 67 72 77 82 87
3 8 13 18 23 28 33 38 43 48 53 58 63 68 73 78 83 88
4 9 14 19 24 29 34 39 44 49 54 59 64 69 74 79 84 89
5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90
Columns 19 through 36
91 96 101 106 111 116 121 126 131 136 141 146 151 156 161 166 171 176
92 97 102 107 112 117 122 127 132 137 142 147 152 157 162 167 172 177
93 98 103 108 113 118 123 128 133 138 143 148 153 158 163 168 173 178
94 99 104 109 114 119 124 129 134 139 144 149 154 159 164 169 174 179
95 100 105 110 115 120 125 130 135 140 145 150 155 160 165 170 175 180
Columns 37 through 54
181 186 191 196 201 206 211 216 221 226 231 236 241 246 251 256 261 266
182 187 192 197 202 207 212 217 222 227 232 237 242 247 252 257 262 267
183 188 193 198 203 208 213 218 223 228 233 238 243 248 253 258 263 268
184 189 194 199 204 209 214 219 224 229 234 239 244 249 254 259 264 269
185 190 195 200 205 210 215 220 225 230 235 240 245 250 255 260 265 270
Columns 55 through 72
271 276 281 286 291 296 301 306 311 316 321 326 331 336 341 346 351 356
272 277 282 287 292 297 302 307 312 317 322 327 332 337 342 347 352 357
273 278 283 288 293 298 303 308 313 318 323 328 333 338 343 348 353 358
274 279 284 289 294 299 304 309 314 319 324 329 334 339 344 349 354 359
275 280 285 290 295 300 305 310 315 320 325 330 335 340 345 350 355 360
Columns 73 through 90
361 366 371 376 381 386 391 396 401 406 411 416 421 426 431 436 441 446
362 367 372 377 382 387 392 397 402 407 412 417 422 427 432 437 442 447
363 368 373 378 383 388 393 398 403 408 413 418 423 428 433 438 443 448
364 369 374 379 384 389 394 399 404 409 414 419 424 429 434 439 444 449
365 370 375 380 385 390 395 400 405 410 415 420 425 430 435 440 445 450
Columns 91 through 108
451 456 461 466 471 476 481 486 491 496 501 506 511 516 521 526 531 536
452 457 462 467 472 477 482 487 492 497 502 507 512 517 522 527 532 537
453 458 463 468 473 478 483 488 493 498 503 508 513 518 523 528 533 538
454 459 464 469 474 479 484 489 494 499 504 509 514 519 524 529 534 539
455 460 465 470 475 480 485 490 495 500 505 510 515 520 525 530 535 540
Columns 109 through 125
541 546 551 556 561 566 571 576 581 586 591 596 601 606 611 616 621
542 547 552 557 562 567 572 577 582 587 592 597 602 607 612 617 622
543 548 553 558 563 568 573 578 583 588 593 598 603 608 613 618 623
544 549 554 559 564 569 574 579 584 589 594 599 604 609 614 619 624
545 550 555 560 565 570 575 580 585 590 595 600 605 610 615 620 625

Why does MATLAB piecewise cubic interpolation give diagonalized plot data in 2-D surface plot fits?

Does anyone know why does MATLAB 'piecewise cubic interpolation' gives diagonalized plot data in a 2-D surface plot fit? Attached is a 2-D surface plot (below the code & data) from the code using this cubic fit. As can be seen, peaks in the image/plot are diagonalized at five isolated data points (pointing upper left to lower right). Instead of being a symmetric Gaussian spread that was expected. Why does the cubic interpolation do this?
The cubic fit is shown at: http://www.mathworks.co.uk/help/curvefit/fit.html
Below is the matlab code with 'piecewise cubic interpolation' to fit data from:
'helm2Coils126.txt' & 'positionsData2_20x20_2.txt'.
Any help with this would much appreciated.
Thanking you in advance,
Brendan Darrer
================================CODE=====================================
% 2D MIT surface plots of p.d. phase-difference against x y coordinates
% Written by Brendan Darrer
% Date 20th September 2013.
% oscillator = 2.6V at f = 500Hz, lock-in amplifier: sensitivity = 50mV, time constant = 500ms.
% background phase: ---- degrees.
A = load('helm2Coils126.txt')
B = load('positionsData2_20x20_2.txt')
% correcting phase offset
for i=1:10 % columns
for j=1:40 % rows
if (A(j,i) < 0) % correct offset, if e.g. phase = -179 when it should be 181.
A(j,i) = 360 + A(j,i);
end
end
end
p = A';
A2 = p(:)'
A = A2'
B = [B A]
x=B(:,1); y=B(:,2); z=B(:,3);
Fig2Handle = figure('Position', [100, 100, 1049, 895]);
xlin=linspace(min(x),max(x),100); % was 50
ylin=linspace(min(y),max(y),100); % was 50
[X,Y]=meshgrid(xlin,ylin);
% cubic piecewise interpolation:
Z=griddata(x,y,z,X,Y,'cubic');
surf(X,Y,Z) % interpolated
axis tight; hold on
view(0,90);
plot3(x,y,z,'.','MarkerSize',10)
colormap hsv
colorbar
xlabel('x axis / mm')
ylabel('y axis / mm')
zlabel('phase \Delta\phi / degrees')
====================== END OF CODE =============================
%====== helm2Coils126.txt ==== copy & paste into .txt file ========
%====================(10 COLUMNS, 40 ROWS)=====================
-14.690 -144.460 -173.610 -177.820 -179.260 -179.930 179.690 179.580 179.340 179.360
-128.020 -175.360 -177.990 -179.420 179.680 179.420 179.330 179.170 179.160 179.120
-175.050 -178.450 -179.890 179.770 179.350 179.140 179.070 179.070 178.990 178.960
-178.060 -179.590 179.550 179.290 179.070 179.040 178.940 178.870 178.890 178.900
-179.270 179.780 179.360 179.130 178.990 178.910 178.880 178.940 178.730 178.470
-178.900 179.730 179.160 179.000 179.000 178.860 178.900 179.080 178.760 179.450
179.430 -179.870 179.350 179.220 178.910 178.980 178.950 178.990 178.870 178.520
-179.930 179.220 179.040 179.070 178.940 178.840 178.840 178.810 178.810 178.880
179.430 179.130 179.000 179.000 178.850 178.840 178.820 178.800 178.860 178.840
179.370 179.070 178.930 178.880 178.860 178.810 178.880 178.830 178.810 178.790
179.320 179.120 179.000 178.900 178.860 178.840 178.830 178.870 178.860 178.800
179.360 179.140 178.990 178.920 178.880 178.840 178.890 178.860 178.840 178.900
179.470 179.170 178.950 178.960 178.950 178.860 178.840 178.850 178.860 178.830
179.700 179.190 179.060 -2.820 178.860 178.910 178.850 178.840 178.790 178.840
179.870 179.440 179.250 179.020 179.000 178.970 178.870 178.850 178.820 178.850
-179.450 179.690 179.290 179.030 178.920 178.900 178.890 178.870 178.840 178.850
-177.830 -179.580 179.600 179.270 179.090 178.980 178.950 178.880 178.860 178.890
-175.210 -178.450 -179.850 179.560 179.200 179.080 178.960 178.990 178.930 178.910
-129.050 -175.360 -178.460 -179.730 179.650 179.370 179.250 179.120 179.100 179.040
-16.750 -121.430 -175.270 -178.000 -179.460 179.230 179.330 179.400 179.580 -179.960
179.260 179.350 179.520 179.600 179.900 -179.300 -177.900 -174.010 -107.820 -15.650
179.050 179.090 179.140 179.240 179.440 179.650 -179.680 -174.620 -175.350 -107.820
178.920 178.910 178.940 179.050 179.140 179.260 179.550 -179.970 -178.710 -174.930
178.810 178.870 178.870 178.930 178.990 179.040 179.180 179.470 -179.810 -178.250
178.740 178.850 178.840 178.870 178.910 179.030 179.130 179.380 179.840 -178.840
178.460 178.720 178.760 178.760 178.820 178.870 179.040 178.980 179.430 179.750
178.730 178.770 178.790 178.790 178.840 178.810 178.920 179.060 179.220 179.620
178.780 178.840 178.810 178.780 178.820 178.810 178.870 178.950 179.170 179.360
178.910 178.820 178.910 -2.710 178.830 178.830 178.870 178.900 -2.900 179.240
178.840 178.840 178.870 178.840 178.820 178.840 178.810 178.920 179.020 179.300
178.870 178.870 178.870 178.800 178.800 178.700 178.760 178.840 179.040 179.300
178.890 178.840 178.790 178.690 178.480 177.550 178.480 178.860 179.080 179.250
178.740 178.840 178.820 178.760 177.590 -93.940 177.420 178.890 179.120 179.340
178.970 178.840 178.770 178.740 178.520 177.530 178.700 178.990 179.090 179.570
178.830 178.800 178.800 178.760 178.760 178.780 178.830 179.000 179.290 179.810
178.820 178.900 178.840 178.940 178.940 178.920 178.960 179.130 179.410 -179.960
178.970 178.990 178.900 178.960 178.910 179.040 179.190 179.540 -179.930 -178.180
-2.790 179.060 179.040 179.050 179.110 179.320 179.710 -179.720 -178.270 -174.540
179.000 179.140 179.210 179.440 179.410 179.750 -179.470 -177.830 -167.850 -20.630
179.220 179.290 179.400 179.780 179.900 -179.470 -178.300 -171.660 -168.110 -22.730
=========================end 1st text file============================
======= positionsData2_20x20_2.txt ======== copy & paste into .txt file =========
===================(2 COLUMNS, 400 ROWS)==============================
0 247
13 247
26 247
39 247
52 247
65 247
78 247
91 247
104 247
117 247
0 234
13 234
26 234
39 234
52 234
65 234
78 234
91 234
104 234
117 234
0 221
13 221
26 221
39 221
52 221
65 221
78 221
91 221
104 221
117 221
0 208
13 208
26 208
39 208
52 208
65 208
78 208
91 208
104 208
117 208
0 195
13 195
26 195
39 195
52 195
65 195
78 195
91 195
104 195
117 195
0 182
13 182
26 182
39 182
52 182
65 182
78 182
91 182
104 182
117 182
0 169
13 169
26 169
39 169
52 169
65 169
78 169
91 169
104 169
117 169
0 156
13 156
26 156
39 156
52 156
65 156
78 156
91 156
104 156
117 156
0 143
13 143
26 143
39 143
52 143
65 143
78 143
91 143
104 143
117 143
0 130
13 130
26 130
39 130
52 130
65 130
78 130
91 130
104 130
117 130
0 117
13 117
26 117
39 117
52 117
65 117
78 117
91 117
104 117
117 117
0 104
13 104
26 104
39 104
52 104
65 104
78 104
91 104
104 104
117 104
0 91
13 91
26 91
39 91
52 91
65 91
78 91
91 91
104 91
117 91
0 78
13 78
26 78
39 78
52 78
65 78
78 78
91 78
104 78
117 78
0 65
13 65
26 65
39 65
52 65
65 65
78 65
91 65
104 65
117 65
0 52
13 52
26 52
39 52
52 52
65 52
78 52
91 52
104 52
117 52
0 39
13 39
26 39
39 39
52 39
65 39
78 39
91 39
104 39
117 39
0 26
13 26
26 26
39 26
52 26
65 26
78 26
91 26
104 26
117 26
0 13
13 13
26 13
39 13
52 13
65 13
78 13
91 13
104 13
117 13
0 0
13 0
26 0
39 0
52 0
65 0
78 0
91 0
104 0
117 0
130 247
143 247
156 247
169 247
182 247
195 247
208 247
221 247
234 247
247 247
130 234
143 234
156 234
169 234
182 234
195 234
208 234
221 234
234 234
247 234
130 221
143 221
156 221
169 221
182 221
195 221
208 221
221 221
234 221
247 221
130 208
143 208
156 208
169 208
182 208
195 208
208 208
221 208
234 208
247 208
130 195
143 195
156 195
169 195
182 195
195 195
208 195
221 195
234 195
247 195
130 182
143 182
156 182
169 182
182 182
195 182
208 182
221 182
234 182
247 182
130 169
143 169
156 169
169 169
182 169
195 169
208 169
221 169
234 169
247 169
130 156
143 156
156 156
169 156
182 156
195 156
208 156
221 156
234 156
247 156
130 143
143 143
156 143
169 143
182 143
195 143
208 143
221 143
234 143
247 143
130 130
143 130
156 130
169 130
182 130
195 130
208 130
221 130
234 130
247 130
130 117
143 117
156 117
169 117
182 117
195 117
208 117
221 117
234 117
247 117
130 104
143 104
156 104
169 104
182 104
195 104
208 104
221 104
234 104
247 104
130 91
143 91
156 91
169 91
182 91
195 91
208 91
221 91
234 91
247 91
130 78
143 78
156 78
169 78
182 78
195 78
208 78
221 78
234 78
247 78
130 65
143 65
156 65
169 65
182 65
195 65
208 65
221 65
234 65
247 65
130 52
143 52
156 52
169 52
182 52
195 52
208 52
221 52
234 52
247 52
130 39
143 39
156 39
169 39
182 39
195 39
208 39
221 39
234 39
247 39
130 26
143 26
156 26
169 26
182 26
195 26
208 26
221 26
234 26
247 26
130 13
143 13
156 13
169 13
182 13
195 13
208 13
221 13
234 13
247 13
130 0
143 0
156 0
169 0
182 0
195 0
208 0
221 0
234 0
247 0
===================end 2nd text file==============================
Are you sure of the plot you are showing? Below is the result obtained by your code on your data. I'm using Matlab 2012a.
The cubic piecewise interpolation of the data produces a 2D surface plot (as shown in the original question), in MATLAB 2012b and MATLAB 2013a. However I found other Interpolations for scattered data at matlab Interpolations, that include: 'linear' --> Linear interpolation; 'cubic' --> Cubic piecewise interpolation; 'natural' --> Natural neighbour interpolation; 'nearest' --> Nearest neighbour interpolation.
'Natural neighbour' gave the closest to smoothed Gaussian like edges of the data in x and y. However I have stayed with the cubic interpolation, as it gave the a rounded curve in the z component of the image. Whereas, 'natural neighbour' interpolation gives sharp spikes in the z component, which was unrealistic for my data.
Below are 2 surface plots showing the difference between 'natural neighbour' and 'cubic piecewise' interpolation, for an example image of a copper disk in a metallic container, taken from eddy current imaging.