/[sysadmin-cookbook]/recepies/zfs/10.attach-device
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /recepies/zfs/10.attach-device

Parent Directory Parent Directory | Revision Log Revision Log


Revision 10 - (show annotations)
Thu Apr 30 23:15:42 2009 UTC (14 years, 11 months ago) by dpavlin
File size: 1275 byte(s)
attach new device to zfs pool and turn it into mirror

1 root@opl:/srv/sysadmin-cookbook/recepies/zfs# fdisk -l /dev/nbd0
2
3 Disk /dev/nbd0: 250.0 GB, 250000000000 bytes
4 255 heads, 63 sectors/track, 30394 cylinders
5 Units = cylinders of 16065 * 512 = 8225280 bytes
6 Disk identifier: 0x00000000
7
8 Device Boot Start End Blocks Id System
9 /dev/nbd0p1 1 13374 107426623+ 83 Linux
10
11
12 root@opl:~# zpool status
13 pool: zfs
14 state: ONLINE
15 scrub: scrub completed after 0h19m with 0 errors on Thu Apr 30 22:46:09 2009
16 config:
17
18 NAME STATE READ WRITE CKSUM
19 zfs ONLINE 0 0 0
20 raid0/zfs ONLINE 0 0 0
21
22 errors: No known data errors
23
24
25 root@opl:~# zpool attach zfs /dev/raid0/zfs /dev/nbd0p1
26
27 root@opl:~# zpool status
28 pool: zfs
29 state: ONLINE
30 status: One or more devices is currently being resilvered. The pool will
31 continue to function, possibly in a degraded state.
32 action: Wait for the resilver to complete.
33 scrub: resilver in progress for 0h2m, 3.47% done, 1h5m to go
34 config:
35
36 NAME STATE READ WRITE CKSUM
37 zfs ONLINE 0 0 0
38 mirror ONLINE 0 0 0
39 raid0/zfs ONLINE 0 0 0
40 nbd0p1 ONLINE 0 0 0
41
42 errors: No known data errors

  ViewVC Help
Powered by ViewVC 1.1.26