33 | | |
34 | | == expanding /dev/sdb1 == |
35 | | 1. mkfs |
36 | | * sudo fdisk /dev/sdb -l |
37 | | {{{ |
38 | | Disk /dev/sdb: 4294 MB, 4294967296 bytes |
39 | | 255 heads, 63 sectors/track, 522 cylinders |
40 | | Units = cylinders of 16065 * 512 = 8225280 bytes |
41 | | Sector size (logical/physical): 512 bytes / 512 bytes |
42 | | I/O size (minimum/optimal): 512 bytes / 512 bytes |
43 | | Disk identifier: 0x00000000 |
44 | | |
45 | | Disk /dev/sdb doesn't contain a valid partition table |
46 | | }}} |
47 | | * sudo fdisk /dev/sdb |
48 | | {{{ |
49 | | Command (m for help): n |
50 | | Command action |
51 | | e extended |
52 | | p primary partition (1-4) |
53 | | p |
54 | | Partition number (1-4): 1 |
55 | | First cylinder (1-522, default 1): |
56 | | Using default value 1 |
57 | | Last cylinder, +cylinders or +size{K,M,G} (1-522, default 522): +1G |
58 | | |
59 | | /dev/sdb1 1 132 1060258+ 83 Linux |
60 | | }}} |
61 | | * sudo mkfs.xfs /dev/sdb1 |
62 | | {{{ |
63 | | meta-data=/dev/sdb1 isize=256 agcount=4, agsize=66266 blks |
64 | | = sectsz=512 attr=2 |
65 | | data = bsize=4096 blocks=265064, imaxpct=25 |
66 | | = sunit=0 swidth=0 blks |
67 | | naming =version 2 bsize=4096 ascii-ci=0 |
68 | | log =internal log bsize=4096 blocks=2560, version=2 |
69 | | = sectsz=512 sunit=0 blks, lazy-count=1 |
70 | | realtime =none extsz=4096 blocks=0, rtextents=0 |
71 | | }}} |
72 | | * sudo blkid /dev/sdb1 |
73 | | {{{ |
74 | | /dev/sdb1: UUID="e47dbfff-97ca-43b8-9a29-89700956a7dd" TYPE="xfs" |
75 | | }}} |
76 | | 1. mount |
77 | | * sudo mkdir /mnt/sdb1 |
78 | | * sudo mount /dev/sdb1 /mnt/sdb1 |
79 | | * df /mnt/sdb1/ -h |
80 | | {{{ |
81 | | /dev/sdb1 1.1G 4.2M 1022M 1% /mnt/sdb1 |
82 | | }}} |
83 | | 1. テストデータの用意 |
84 | | * sudo dd if=/dev/urandom of=/mnt/sdb1/rand.10M bs=1024 count=10240 |
85 | | * cp /mnt/sdb1/rand.10M . |
86 | | 1. remake partition |
87 | | * sudo umount /mnt/sdb1/ |
88 | | * sudo fdisk /dev/sdb |
89 | | {{{ |
90 | | Command (m for help): d |
91 | | Selected partition 1 |
92 | | |
93 | | Command (m for help): n |
94 | | Command action |
95 | | e extended |
96 | | p primary partition (1-4) |
97 | | p |
98 | | Partition number (1-4): 1 |
99 | | First cylinder (1-522, default 1): |
100 | | Using default value 1 |
101 | | Last cylinder, +cylinders or +size{K,M,G} (1-522, default 522): |
102 | | Using default value 522 |
103 | | |
104 | | /dev/sdb1 1 522 4192933+ 83 Linux |
105 | | }}} |
106 | | * sudo blkid /dev/sdb1 |
107 | | {{{ |
108 | | /dev/sdb1: UUID="e47dbfff-97ca-43b8-9a29-89700956a7dd" TYPE="xfs" |
109 | | }}} |
110 | | * sudo mount /dev/sdb1 /mnt/sdb1 |
111 | | * df /mnt/sdb1/ -h |
112 | | {{{ |
113 | | /dev/sdb1 1.1G 15M 1012M 2% /mnt/sdb1 |
114 | | }}} |
115 | | * sha1sum -b rand.10M /mnt/sdb1/rand.10M |
116 | | {{{ |
117 | | 72d3a67ecd23e77bbc57eb959b945c6cbdae58e1 *rand.10M |
118 | | 72d3a67ecd23e77bbc57eb959b945c6cbdae58e1 */mnt/sdb1/rand.10M |
119 | | }}} |
120 | | 1. resize xfs filesystem |
121 | | * sudo xfs_growfs /mnt/sdb1/ |
122 | | {{{ |
123 | | meta-data=/dev/sdb1 isize=256 agcount=4, agsize=66266 blks |
124 | | = sectsz=512 attr=2 |
125 | | data = bsize=4096 blocks=265064, imaxpct=25 |
126 | | = sunit=0 swidth=0 blks |
127 | | naming =version 2 bsize=4096 ascii-ci=0 |
128 | | log =internal bsize=4096 blocks=2560, version=2 |
129 | | = sectsz=512 sunit=0 blks, lazy-count=1 |
130 | | realtime =none extsz=4096 blocks=0, rtextents=0 |
131 | | data blocks changed from 265064 to 1048233 |
132 | | }}} |
133 | | * df /mnt/sdb1/ -h |
134 | | {{{ |
135 | | Filesystem Size Used Avail Use% Mounted on |
136 | | /dev/sdb1 4.0G 15M 4.0G 1% /mnt/sdb1 |
137 | | }}} |
138 | | * sha1sum -b rand.10M /mnt/sdb1/rand.10M |
139 | | {{{ |
140 | | 72d3a67ecd23e77bbc57eb959b945c6cbdae58e1 *rand.10M |
141 | | 72d3a67ecd23e77bbc57eb959b945c6cbdae58e1 */mnt/sdb1/rand.10M |
142 | | }}} |
143 | | |
144 | | * 問題なく拡張された |
145 | | |
146 | | == test with 3 partitions == |
147 | | 1. make partitions |
148 | | * sudo fdisk /dev/sdb |
149 | | * snip |
150 | | * sudo fdisk /dev/sdb -l |
151 | | {{{ |
152 | | /dev/sdb1 1 132 1060258+ 83 Linux |
153 | | /dev/sdb2 133 394 2104515 83 Linux |
154 | | /dev/sdb3 395 522 1028160 83 Linux |
155 | | }}} |
156 | | 1. mkfs |
157 | | * sudo mkfs.xfs /dev/sdb1 |
158 | | {{{ |
159 | | meta-data=/dev/sdb1 isize=256 agcount=4, agsize=66266 blks |
160 | | = sectsz=512 attr=2 |
161 | | data = bsize=4096 blocks=265064, imaxpct=25 |
162 | | = sunit=0 swidth=0 blks |
163 | | naming =version 2 bsize=4096 ascii-ci=0 |
164 | | log =internal log bsize=4096 blocks=2560, version=2 |
165 | | = sectsz=512 sunit=0 blks, lazy-count=1 |
166 | | realtime =none extsz=4096 blocks=0, rtextents=0 |
167 | | }}} |
168 | | * sudo mkfs.xfs /dev/sdb2 |
169 | | {{{ |
170 | | meta-data=/dev/sdb2 isize=256 agcount=4, agsize=131532 blks |
171 | | = sectsz=512 attr=2 |
172 | | data = bsize=4096 blocks=526128, imaxpct=25 |
173 | | = sunit=0 swidth=0 blks |
174 | | naming =version 2 bsize=4096 ascii-ci=0 |
175 | | log =internal log bsize=4096 blocks=2560, version=2 |
176 | | = sectsz=512 sunit=0 blks, lazy-count=1 |
177 | | realtime =none extsz=4096 blocks=0, rtextents=0 |
178 | | }}} |
179 | | * sudo mkfs.xfs /dev/sdb3 |
180 | | {{{ |
181 | | meta-data=/dev/sdb3 isize=256 agcount=4, agsize=64260 blks |
182 | | = sectsz=512 attr=2 |
183 | | data = bsize=4096 blocks=257040, imaxpct=25 |
184 | | = sunit=0 swidth=0 blks |
185 | | naming =version 2 bsize=4096 ascii-ci=0 |
186 | | log =internal log bsize=4096 blocks=1200, version=2 |
187 | | = sectsz=512 sunit=0 blks, lazy-count=1 |
188 | | realtime =none extsz=4096 blocks=0, rtextents=0 |
189 | | }}} |
190 | | * sudo blkid /dev/sdb![123] |
191 | | {{{ |
192 | | /dev/sdb1: UUID="9065c3c2-ab3d-4460-978e-e37c88f31f5f" TYPE="xfs" |
193 | | /dev/sdb2: UUID="b9515b82-4d3c-457d-8d32-330cfea692df" TYPE="xfs" |
194 | | /dev/sdb3: UUID="17374506-2cb1-4451-a5a8-b15cb1410870" TYPE="xfs" |
195 | | }}} |
196 | | 1. mount |
197 | | * sudo mkdir /mnt/sdb1 |
198 | | * sudo mkdir /mnt/sdb2 |
199 | | * sudo mkdir /mnt/sdb3 |
200 | | * sudo mount /dev/sdb1 /mnt/sdb1 |
201 | | * sudo mount /dev/sdb2 /mnt/sdb2 |
202 | | * sudo mount /dev/sdb3 /mnt/sdb3 |
203 | | * df -h |
204 | | {{{ |
205 | | /dev/sdb1 1.1G 4.2M 1022M 1% /mnt/sdb1 |
206 | | /dev/sdb2 2.0G 4.2M 2.0G 1% /mnt/sdb2 |
207 | | /dev/sdb3 1000M 4.2M 996M 1% /mnt/sdb3 |
208 | | }}} |
209 | | 1. テストデータの用意 |
210 | | * sudo dd if=/dev/urandom of=/mnt/sdb1/rand1.10M bs=1024 count=10240 |
211 | | * sudo dd if=/dev/urandom of=/mnt/sdb2/rand2.10M bs=1024 count=10240 |
212 | | * sudo dd if=/dev/urandom of=/mnt/sdb3/rand3.10M bs=1024 count=10240 |
213 | | * sha1sum -b /mnt/sdb*/rand*.10M |
214 | | {{{ |
215 | | 11b2836d9c88f3890224f5d4250e2dd86ddca3e6 */mnt/sdb1/rand1.10M |
216 | | 3b2fb16c6416b5c6314c396f03275fd20ff8f24b */mnt/sdb2/rand2.10M |
217 | | 0fb674e54da58858fa1a825f724f5e0c782a8a04 */mnt/sdb3/rand3.10M |
218 | | }}} |
219 | | |
220 | | === /dev/sdb2をdisk後方に向けて拡張 === |
221 | | 1. remake partition |
222 | | * sudo umount /dev/sdb![123] |
223 | | * sudo fdisk /dev/sdb |
224 | | {{{ |
225 | | /dev/sdb1 1 132 1060258+ 83 Linux |
226 | | /dev/sdb2 133 394 2104515 83 Linux |
227 | | /dev/sdb3 395 522 1028160 83 Linux |
228 | | |
229 | | Command (m for help): d |
230 | | Partition number (1-4): 3 |
231 | | |
232 | | Command (m for help): d |
233 | | Partition number (1-4): 2 |
234 | | |
235 | | Command (m for help): n |
236 | | Command action |
237 | | e extended |
238 | | p primary partition (1-4) |
239 | | p |
240 | | Partition number (1-4): 2 |
241 | | First cylinder (133-522, default 133): |
242 | | Using default value 133 |
243 | | Last cylinder, +cylinders or +size{K,M,G} (133-522, default 522): |
244 | | Using default value 522 |
245 | | |
246 | | /dev/sdb1 1 132 1060258+ 83 Linux |
247 | | /dev/sdb2 133 522 3132675 83 Linux |
248 | | }}} |
249 | | 1. resize xfs filesystem |
250 | | * sudo mount /dev/sdb2 /mnt/sdb2 |
251 | | * df -h |
252 | | {{{ |
253 | | /dev/sdb2 2.0G 15M 2.0G 1% /mnt/sdb2 |
254 | | }}} |
255 | | * sha1sum -b /mnt/sdb*/rand*.10M |
256 | | {{{ |
257 | | 3b2fb16c6416b5c6314c396f03275fd20ff8f24b */mnt/sdb2/rand2.10M |
258 | | }}} |
259 | | * sudo xfs_growfs /mnt/sdb2/ |
260 | | {{{ |
261 | | meta-data=/dev/sdb2 isize=256 agcount=4, agsize=131532 blks |
262 | | = sectsz=512 attr=2 |
263 | | data = bsize=4096 blocks=526128, imaxpct=25 |
264 | | = sunit=0 swidth=0 blks |
265 | | naming =version 2 bsize=4096 ascii-ci=0 |
266 | | log =internal bsize=4096 blocks=2560, version=2 |
267 | | = sectsz=512 sunit=0 blks, lazy-count=1 |
268 | | realtime =none extsz=4096 blocks=0, rtextents=0 |
269 | | data blocks changed from 526128 to 783168 |
270 | | }}} |
271 | | * sudo blkid /dev/sdb![123] |
272 | | {{{ |
273 | | /dev/sdb1: UUID="9065c3c2-ab3d-4460-978e-e37c88f31f5f" TYPE="xfs" |
274 | | /dev/sdb2: UUID="b9515b82-4d3c-457d-8d32-330cfea692df" TYPE="xfs" |
275 | | }}} |
276 | | * df -h |
277 | | {{{ |
278 | | /dev/sdb2 3.0G 15M 3.0G 1% /mnt/sdb2 |
279 | | }}} |
280 | | |
281 | | * 問題なく拡張された |
282 | | |
283 | | === /dev/sdb2をdisk前方に向けて拡張 === |
284 | | ==== 適当でない手順 ==== |
285 | | ===== remake partition with name sdb1 ===== |
286 | | * sudo umount /dev/sdb![123] |
287 | | * sudo fdisk /dev/sdb |
288 | | {{{ |
289 | | /dev/sdb1 1 132 1060258+ 83 Linux |
290 | | /dev/sdb2 133 522 3132675 83 Linux |
291 | | |
292 | | |
293 | | Command (m for help): d |
294 | | Partition number (1-4): 1 |
295 | | |
296 | | Command (m for help): d |
297 | | Selected partition 2 |
298 | | |
299 | | Command (m for help): n |
300 | | Command action |
301 | | e extended |
302 | | p primary partition (1-4) |
303 | | p |
304 | | Partition number (1-4): 1 |
305 | | First cylinder (1-522, default 1): |
306 | | Using default value 1 |
307 | | Last cylinder, +cylinders or +size{K,M,G} (1-522, default 522): |
308 | | Using default value 522 |
309 | | |
310 | | |
311 | | /dev/sdb1 1 522 4192933+ 83 Linux |
312 | | }}} |
313 | | * sudo mount /dev/sdb1 /mnt/sdb1 |
314 | | * sha1sum -b /mnt/sdb*/rand*.10M |
315 | | {{{ |
316 | | 11b2836d9c88f3890224f5d4250e2dd86ddca3e6 */mnt/sdb1/rand1.10M |
317 | | }}} |
318 | | |
319 | | * 当然だがsdb2ではなくsdb1がmountされてしまう |
320 | | |
321 | | ===== remake partition with name sdb2 ===== |
322 | | * sudo umount /dev/sdb![123] |
323 | | * sudo fdisk /dev/sdb |
324 | | {{{ |
325 | | /dev/sdb1 1 522 4192933+ 83 Linux |
326 | | |
327 | | Command (m for help): d |
328 | | Selected partition 1 |
329 | | |
330 | | Command (m for help): n |
331 | | Command action |
332 | | e extended |
333 | | p primary partition (1-4) |
334 | | p |
335 | | Partition number (1-4): 2 |
336 | | First cylinder (1-522, default 1): |
337 | | Using default value 1 |
338 | | Last cylinder, +cylinders or +size{K,M,G} (1-522, default 522): |
339 | | Using default value 522 |
340 | | |
341 | | /dev/sdb2 1 522 4192933+ 83 Linux |
342 | | }}} |
343 | | * sudo mount /dev/sdb2 /mnt/sdb2 |
344 | | * sha1sum -b /mnt/sdb*/rand*.10M |
345 | | {{{ |
346 | | 11b2836d9c88f3890224f5d4250e2dd86ddca3e6 */mnt/sdb2/rand1.10M |
347 | | }}} |
348 | | |
349 | | * やはりsdb1の内容がmountされる |
350 | | |
351 | | ===== overwrite sdb1 with 0x00 and remake partition ===== |
352 | | * sudo umount /dev/sdb![123] |
353 | | * sudo fdisk /dev/sdb |
354 | | {{{ |
355 | | /dev/sdb2 1 522 4192933+ 83 Linux |
356 | | |
357 | | |
358 | | Command (m for help): d |
359 | | Selected partition 2 |
360 | | |
361 | | Command (m for help): n |
362 | | Command action |
363 | | e extended |
364 | | p primary partition (1-4) |
365 | | p |
366 | | Partition number (1-4): 1 |
367 | | First cylinder (1-522, default 1): |
368 | | Using default value 1 |
369 | | Last cylinder, +cylinders or +size{K,M,G} (1-522, default 522): 132 |
370 | | |
371 | | Command (m for help): n |
372 | | Command action |
373 | | e extended |
374 | | p primary partition (1-4) |
375 | | p |
376 | | Partition number (1-4): 2 |
377 | | First cylinder (133-522, default 133): |
378 | | Using default value 133 |
379 | | Last cylinder, +cylinders or +size{K,M,G} (133-522, default 522): |
380 | | Using default value 522 |
381 | | |
382 | | /dev/sdb1 1 132 1060258+ 83 Linux |
383 | | /dev/sdb2 133 522 3132675 83 Linux |
384 | | }}} |
385 | | * sudo dd if=/dev/zero of=/dev/sdb1 bs=1024 count=10240 |
386 | | * sudo mount /dev/sdb1 /mnt/sdb1 -t xfs |
387 | | {{{ |
388 | | [ 8848.630996] XFS: bad magic number |
389 | | [ 8848.630996] XFS: SB validate failed |
390 | | }}} |
391 | | * sudo mount /dev/sdb2 /mnt/sdb2 |
392 | | * sha1sum -b /mnt/sdb*/rand*.10M |
393 | | {{{ |
394 | | 3b2fb16c6416b5c6314c396f03275fd20ff8f24b */mnt/sdb2/rand2.10M |
395 | | }}} |
396 | | |
397 | | * sudo umount /dev/sdb![123] |
398 | | * sudo fdisk /dev/sdb |
399 | | {{{ |
400 | | /dev/sdb1 1 132 1060258+ 83 Linux |
401 | | /dev/sdb2 133 522 3132675 83 Linux |
402 | | |
403 | | Command (m for help): d |
404 | | Partition number (1-4): 1 |
405 | | |
406 | | Command (m for help): d |
407 | | Selected partition 2 |
408 | | |
409 | | Command (m for help): n |
410 | | Command action |
411 | | e extended |
412 | | p primary partition (1-4) |
413 | | p |
414 | | Partition number (1-4): 2 |
415 | | First cylinder (1-522, default 1): |
416 | | Using default value 1 |
417 | | Last cylinder, +cylinders or +size{K,M,G} (1-522, default 522): |
418 | | Using default value 522 |
419 | | |
420 | | |
421 | | /dev/sdb2 1 522 4192933+ 83 Linux |
422 | | }}} |
423 | | * sudo mount /dev/sdb2 /mnt/sdb2 -t xfs |
424 | | {{{ |
425 | | [ 9060.520973] XFS: bad magic number |
426 | | [ 9060.520973] XFS: SB validate failed |
427 | | }}} |
428 | | |
429 | | * 全くmount出来なくなる |
430 | | |
431 | | ==== 適当(と思われる)方法 ==== |
432 | | 1. mount |
433 | | * sudo fdisk -l /dev/sdb |
434 | | {{{ |
435 | | /dev/sdb1 1 132 1060258+ 83 Linux |
436 | | /dev/sdb2 133 522 3132675 83 Linux |
437 | | }}} |
438 | | * sudo fdisk -lu /dev/sdb |
439 | | {{{ |
440 | | /dev/sdb1 63 2120579 1060258+ 83 Linux |
441 | | /dev/sdb2 2120580 8385929 3132675 83 Linux |
442 | | }}} |
443 | | * sudo mount /dev/sdb1 /mnt/sdb1 |
444 | | * sudo mount /dev/sdb2 /mnt/sdb2 |
445 | | * df -h |
446 | | {{{ |
447 | | /dev/sdb1 1.1G 15M 1012M 2% /mnt/sdb1 |
448 | | /dev/sdb2 3.0G 15M 3.0G 1% /mnt/sdb2 |
449 | | }}} |
450 | | * sha1sum -b /mnt/sdb*/rand*.10M |
451 | | {{{ |
452 | | 11b2836d9c88f3890224f5d4250e2dd86ddca3e6 */mnt/sdb1/rand1.10M |
453 | | 3b2fb16c6416b5c6314c396f03275fd20ff8f24b */mnt/sdb2/rand2.10M |
454 | | }}} |
455 | | 1. テストデータの用意 |
456 | | * sudo dd if=/dev/urandom of=/mnt/sdb1/rand1.900M bs=512 count=921600 |
457 | | * sudo dd if=/dev/urandom of=/mnt/sdb2/rand2.2900M bs=1024 count=2969600 |
458 | | * sudo dd if=/dev/urandom of=/mnt/sdb1/rand1.max bs=512 |
459 | | * sudo dd if=/dev/urandom of=/mnt/sdb2/rand2.max bs=512 & |
460 | | * df -h |
461 | | {{{ |
462 | | /dev/sdb1 1.1G 1.1G 20K 100% /mnt/sdb1 |
463 | | /dev/sdb2 3.0G 3.0G 20K 100% /mnt/sdb2 |
464 | | }}} |
465 | | * sha1sum -b /mnt/sdb*/rand* > checksum.sha1 |
466 | | 1. remake partition |
467 | | * sudo umount /dev/sdb![123] |
468 | | * sudo fdisk /dev/sdb |
469 | | {{{ |
470 | | Command (m for help): d |
471 | | Partition number (1-4): 1 |
472 | | |
473 | | Command (m for help): d |
474 | | Selected partition 2 |
475 | | |
476 | | Command (m for help): n |
477 | | Command action |
478 | | e extended |
479 | | p primary partition (1-4) |
480 | | p |
481 | | Partition number (1-4): 1 |
482 | | First cylinder (1-522, default 1): |
483 | | Using default value 1 |
484 | | Last cylinder, +cylinders or +size{K,M,G} (1-522, default 522): |
485 | | Using default value 522 |
486 | | |
487 | | /dev/sdb1 1 522 4192933+ 83 Linux |
488 | | }}} |
489 | | * sudo mount /dev/sdb1 /mnt/sdb1 |
490 | | * sha1sum -c checksum.sha1 |
491 | | {{{ |
492 | | /mnt/sdb1/rand1.10M: OK |
493 | | /mnt/sdb1/rand1.900M: OK |
494 | | /mnt/sdb1/rand1.max: OK |
495 | | sha1sum: /mnt/sdb2/rand2.10M: No such file or directory |
496 | | /mnt/sdb2/rand2.10M: FAILED open or read |
497 | | sha1sum: /mnt/sdb2/rand2.2900M: No such file or directory |
498 | | /mnt/sdb2/rand2.2900M: FAILED open or read |
499 | | sha1sum: /mnt/sdb2/rand2.max: No such file or directory |
500 | | /mnt/sdb2/rand2.max: FAILED open or read |
501 | | sha1sum: WARNING: 3 of 6 listed files could not be read |
502 | | }}} |
503 | | * 旧sdb1の内容がmountされる |
504 | | 1. copy sdb2 to sdb1 with dd |
505 | | * sudo umount /dev/sdb![123] |
506 | | * sudo dd if=/dev/sdb of=/dev/sdb bs=512 count=6265350 seek=63 skip=2120580 & |
507 | | {{{ |
508 | | /dev/sdb1 63 2120579 1060258+ 83 Linux |
509 | | /dev/sdb2 2120580 8385929 3132675 83 Linux |
510 | | }}} |
511 | | * seek=BLOCKS |
512 | | * skip BLOCKS obs-sized blocks at start of output |
513 | | * skip=BLOCKS |
514 | | * skip BLOCKS ibs-sized blocks at start of input |
515 | | * 6265350 = 8385929 - 2120580 + 1 |
516 | | 1. re-mount |
517 | | * sudo mount /dev/sdb1 /mnt/sdb2 |
518 | | * df -h |
519 | | {{{ |
520 | | /dev/sdb1 3.0G 3.0G 20K 100% /mnt/sdb2 |
521 | | }}} |
522 | | 1. verify data |
523 | | * sha1sum -c checksum.sha1 |
524 | | {{{ |
525 | | sha1sum: /mnt/sdb1/rand1.10M: No such file or directory |
526 | | /mnt/sdb1/rand1.10M: FAILED open or read |
527 | | sha1sum: /mnt/sdb1/rand1.900M: No such file or directory |
528 | | /mnt/sdb1/rand1.900M: FAILED open or read |
529 | | sha1sum: /mnt/sdb1/rand1.max: No such file or directory |
530 | | /mnt/sdb1/rand1.max: FAILED open or read |
531 | | /mnt/sdb2/rand2.10M: OK |
532 | | /mnt/sdb2/rand2.2900M: OK |
533 | | /mnt/sdb2/rand2.max: OK |
534 | | sha1sum: WARNING: 3 of 6 listed files could not be read |
535 | | }}} |
536 | | * 問題なく旧sdb2の内容になっている |
537 | | 1. resize xfs filesystem |
538 | | * sudo xfs_growfs /mnt/sdb2 |
539 | | {{{ |
540 | | meta-data=/dev/sdb1 isize=256 agcount=6, agsize=131532 blks |
541 | | = sectsz=512 attr=2 |
542 | | data = bsize=4096 blocks=783168, imaxpct=25 |
543 | | = sunit=0 swidth=0 blks |
544 | | naming =version 2 bsize=4096 ascii-ci=0 |
545 | | log =internal bsize=4096 blocks=2560, version=2 |
546 | | = sectsz=512 sunit=0 blks, lazy-count=1 |
547 | | realtime =none extsz=4096 blocks=0, rtextents=0 |
548 | | data blocks changed from 783168 to 1048233 |
549 | | }}} |
550 | | * df -h |
551 | | {{{ |
552 | | /dev/sdb1 4.0G 3.0G 1.1G 75% /mnt/sdb2 |
553 | | }}} |
| 33 | * see [./xfs_growfs#testingxfs_growfs] |