Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
436 lines (230 loc) · 14.6 KB
/
Copy pathindex.html
File metadata and controls
436 lines (230 loc) · 14.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Simons Blogg</title>
<meta name="author" content="Simon Ingelsson">
<meta name="description" content="server, ubuntu Online Resize Scan the bus to find the right disk 1
2
3
4
5
$ sudo apt-get install lsscsi
$ lsscsi | grep [/dev/sdb]
[2:0:1:0] disk …">
<!-- http://t.co/dKP3o1e -->
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="/blog/atom.xml" rel="alternate" title="Simons Blogg" type="application/atom+xml">
<link rel="canonical" href="http://devnore.github.io/">
<link href="/favicon.png" rel="shortcut icon">
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
<link href="/stylesheets/font-awesome.min.css" media="screen, projection" rel="stylesheet" type="text/css">
<!--[if lt IE 9]><script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<link href='http://fonts.googleapis.com/css?family=Nunito:400,300,700' rel='stylesheet' type='text/css'>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
</head>
<body>
<div class="container">
<div class="left-col">
<div class="intrude-less">
<header id="header" class="inner"><div class="profilepic">
<img src="http://www.gravatar.com/avatar/1a586777bafc1e0dae620e8046c7645f?s=160" alt="Profile Picture" style="width: 160px;" />
</div>
<nav id="main-nav"><ul class="main">
<li><a href="/">Blog</a></li>
<li><a href="/blog/archives">Archives</a></li>
</ul>
</nav>
<nav id="sub-nav">
<div class="social">
<a class="twitter" href="http://twitter.com/_DeVVaN_" title="Twitter">Twitter</a>
<a class="github" href="https://github.com/devnore" title="GitHub">GitHub</a>
<a class="rss" href="/blog/atom.xml" title="RSS">RSS</a>
</div>
</nav>
</header>
</div>
</div>
<div class="mid-col">
<div class="mid-col-container">
<div id="content" class="inner">
<div itemscope itemtype="http://schema.org/Blog">
<article class="post" itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
<div class="meta">
<div class="date">
<time datetime="2014-09-05T11:13:29+02:00" data-updated="true" itemprop="datePublished"></time></div>
<div class="tags">
<a class='category' href='/blog/categories/server/'>server</a>, <a class='category' href='/blog/categories/ubuntu/'>ubuntu</a>
</div>
</div>
<h1 class="title" itemprop="name"><a href="/blog/2014/09/05/online-resize/" itemprop="url">Online Resize</a></h1>
<div class="entry-content" itemprop="articleBody">
<p>Scan the bus to find the right disk</p>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
</pre></td><td class='code'><pre><code class='sh'><span class='line'><span class="nv">$ </span>sudo apt-get install lsscsi
</span><span class='line'><span class="nv">$ </span>lsscsi <span class="p">|</span> grep <span class="o">[</span>/dev/sdb<span class="o">]</span>
</span><span class='line'><span class="o">[</span>2:0:1:0<span class="o">]</span> disk VMware Virtual disk 1.0 /dev/sdb
</span><span class='line'><span class="c"># rescan disk</span>
</span><span class='line'><span class="nb">echo </span><span class="m">1</span> > /sys/bus/scsi/devices/2<span class="se">\:</span>0<span class="se">\:</span>1<span class="se">\:</span>0/rescan
</span></code></pre></td></tr></table></div></figure>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class='sh'><span class='line'>cfdisk /dev/sdb
</span></code></pre></td></tr></table></div></figure>
<p>skapa en ny partition av det utrymmet som är ledigt på disken. och se till att den är av typ 8e (Linux LVM)</p>
<p><code>partprobe -s</code>
Registrerar den nya partitionen så att kerneln känner till den.</p>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
</pre></td><td class='code'><pre><code class='sh'><span class='line'>pvcreate /dev/sdb2
</span><span class='line'>Physical volume <span class="s2">"/dev/sdb2"</span> successfully created
</span><span class='line'>vgextend VolGroup00 /dev/sdb2
</span><span class='line'>lvextend -l +100%FREE /dev/VolGroup00/LogVol00
</span><span class='line'>resize2fs /dev/VolGroup00/LogVol00
</span><span class='line'>df -h
</span></code></pre></td></tr></table></div></figure>
</div>
</article>
<article class="post" itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
<div class="meta">
<div class="date">
<time datetime="2014-09-03T15:01:50+02:00" data-updated="true" itemprop="datePublished"></time></div>
<div class="tags">
<a class='category' href='/blog/categories/blog/'>blog</a>, <a class='category' href='/blog/categories/thoughts/'>thoughts</a>
</div>
</div>
<h1 class="title" itemprop="name"><a href="/blog/2014/09/03/octopress/" itemprop="url">Octopress</a></h1>
<div class="entry-content" itemprop="articleBody">
<h2>Starting using octopress.</h2>
<p>I’v decided to try using octopress in favor of wordpress. I’m hoping this will go better than my attempt to use <a href="https://ghost.org">Ghost</a> .</p>
<p>One of the biggest best features of Wordpress is the Media Library. And without Wordpress backing this blog I have to figure out a good workflow for adding images to my blog. I’m thinking that using S3-style buckets tied in to our <a href="http://ceph.com">Ceph</a> deployment at work. But this is not currently up and running so in the mean time i just have to use dropbox or add a custom rsync to octopress to push images as well as the blog.</p>
</div>
</article>
<article class="post" itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
<div class="meta">
<div class="date">
<time datetime="2014-08-28T16:12:38+02:00" data-updated="true" itemprop="datePublished"></time></div>
<div class="tags">
<a class='category' href='/blog/categories/osx/'>osx</a>, <a class='category' href='/blog/categories/vagrant/'>vagrant</a>
</div>
</div>
<h1 class="title" itemprop="name"><a href="/blog/2014/08/28/dnsmasq-in-osx/" itemprop="url">DNSMASQ in OSX</a></h1>
<div class="entry-content" itemprop="articleBody">
<h2>Installing Dnsmasq</h2>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'> brew up <span class="o">&&</span> brew install dnsmasq
</span></code></pre></td></tr></table></div></figure>
<p>The installation process will output several commands that you can use to start Dnsmasq automatically with a default configuration. I used the following commands but you should use whichever commands brew tells you to:</p>
<h2>Configuring Dnsmasq</h2>
<p>Now that you have Dnsmasq installed and running, it’s time to configure it! The configuration file lives at <code>/usr/local/etc/dnsmasq.conf</code> by default, so open this file in your favourite editor.</p>
<p>One the many, many things that Dnsmasq can do is compare DNS requests against a database of patterns and use these to determine the correct response. I use this functionality to match any request which ends in .dev and send <code>10.200.200.10</code> in response. The Dnsmasq configuration directive to do this is very simple:</p>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'> <span class="nv">address</span><span class="o">=</span>/dev/10.200.200.10
</span></code></pre></td></tr></table></div></figure>
<p>Insert this into your <code>/usr/local/etc/dnsmasq.conf</code> file (I put it near the example <code>address=/double-click.net/127.0.0.1</code> entry just to keep them all together) and save the file.</p>
<p>You may need to restart Dnsmasq to get it to recognise this change. Restarting Dnsmasq is the same as any other service running under <code>launchd</code>:</p>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'> sudo launchctl stop homebrew.mxcl.dnsmasq
</span><span class='line'> sudo launchctl start homebrew.mxcl.dnsmasq
</span></code></pre></td></tr></table></div></figure>
<p>You can test Dnsmasq by sending it a DNS query using the <code>dig</code> utility. Pick a name ending in <code>dev</code> and use dig to query your new DNS server:</p>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'> dig local.site.dev @127.0.0.1
</span></code></pre></td></tr></table></div></figure>
<p>You should get back a response something like:</p>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'> <span class="p">;;</span> ANSWER SECTION:
</span><span class='line'> local.site.dev. <span class="m">0</span> IN A 10.200.200.10
</span></code></pre></td></tr></table></div></figure>
<h2>Configuring OS X</h2>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'> sudo mkdir -p /etc/resolver
</span><span class='line'> <span class="c"># Create file for domain .dev</span>
</span><span class='line'> sudo tee /etc/resolver/dev >/dev/null <span class="s"><<EOF</span>
</span><span class='line'><span class="s"> nameserver 127.0.0.1</span>
</span><span class='line'><span class="s"> EOF</span>
</span></code></pre></td></tr></table></div></figure>
<h2>Testing.</h2>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
</pre></td><td class='code'><pre><code class='bash'><span class='line'> <span class="c"># Make sure you haven't broken your DNS.</span>
</span><span class='line'> ping -c <span class="m">1</span> www.google.com
</span><span class='line'> <span class="c"># Check that .dev names work</span>
</span><span class='line'> ping -c <span class="m">1</span> this.is.a.test.dev
</span><span class='line'> ping -c <span class="m">1</span> iam.the.walrus.dev
</span></code></pre></td></tr></table></div></figure>
</div>
</article>
<article class="post" itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
<div class="meta">
<div class="date">
<time datetime="2014-04-07T16:18:47+02:00" data-updated="true" itemprop="datePublished"></time></div>
<div class="tags">
<a class='category' href='/blog/categories/home-electronics/'>home electronics</a>
</div>
</div>
<h1 class="title" itemprop="name"><a href="/blog/2014/04/07/raspberry-pi/" itemprop="url">Raspberry Pi</a></h1>
<div class="entry-content" itemprop="articleBody">
<p>A while ago I bought a Raspberry Pi (model B) planning to build an Entertainmentsystem. The main reason for this was that I had gotten tired on using My TVs builtin player that did not support any of the format I wanted to use.</p>
<p>After looking around on the alternatives I decided there where three ways to go.</p>
<ol>
<li>Raspbmc</li>
<li>OpenELEC</li>
<li>Build it myself.</li>
</ol>
<p>As building it myself would take me to much time. I opted for either alternative 1 or 2. After looking at some vs writeups and youtube reviews it seamed to me that rasbmc was the faster of the two (less sluggish in menus and such).</p>
<p>Installing rasbmc was a breeze so I will not cover it, have a peek over at the official <a href="http://www.raspbmc.com/">www.raspbmc.com</a>.</p>
</div>
</article>
<article class="post" itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
<div class="meta">
<div class="date">
<time datetime="2014-01-22T15:14:59+01:00" data-updated="true" itemprop="datePublished"></time></div>
<div class="tags">
<a class='category' href='/blog/categories/home-electronics/'>home electronics</a>
</div>
</div>
<h1 class="title" itemprop="name"><a href="/blog/2014/01/22/synology/" itemprop="url">Synology Diskstation</a></h1>
<div class="entry-content" itemprop="articleBody">
<p>After looking at a D-link NAS that I borrowed from a friend I decided that i should buy a real NAS.</p>
<p>I Finally settled on the Synology Diskstation DS214<a href="http://simon.ispy.se/blog/wp-content/uploads/2014/01/DS214.jpg"><img src="http://simon.ispy.se/blog/wp-content/uploads/2014/01/DS214.jpg" alt="DS214" /></a></p>
<p>I’v gone through the checklist, migrating all unarranged photos (from 4 different iphoto-libraries, and my very old photos from pre 2008 ) into the NAS.</p>
</div>
</article>
</div>
<nav id="pagenavi">
<div class="center"><a href="/blog/archives">Blog Archives</a></div>
</nav></div>
</div>
<footer id="footer" class="inner">Copyright © 2014
Simon Ingelsson
Design credit: <a href="http://shashankmehta.in/archive/2012/greyshade.html">Shashank Mehta</a></footer>
</div>
</div>
<script src="/javascripts/slash.js"></script>
<script src="/javascripts/jquery.fancybox.pack.js"></script>
<script type="text/javascript">
(function($){
$('.fancybox').fancybox();
})(jQuery);
</script> <!-- Delete or comment this line to disable Fancybox -->
</body>
</html>