Hire me if you like: blake.irvin@gmail.com

Monday, May 14, 2007

Fun with ZFS (replacing a raidz pool disk with a larger disk)

-bash-3.00# mkfile 128m /vdevs/disk1; mkfile 128m /vdevs/disk2; mkfile
128m /vdevs/disk3

-bash-3.00# zpool create pool1 raidz /vdevs/disk1 /vdevs/disk2 /vdevs/disk3
-bash-3.00# zpool status
pool: pool1
state: ONLINE
scrub: none requested
config:

NAME STATE READ WRITE CKSUM
pool1 ONLINE 0 0 0
raidz1 ONLINE 0 0 0
/vdevs/disk1 ONLINE 0 0 0
/vdevs/disk2 ONLINE 0 0 0
/vdevs/disk3 ONLINE 0 0 0

errors: No known data errors
-bash-3.00# zfs create pool1/fs1
-bash-3.00# zfs list
NAME USED AVAIL REFER MOUNTPOINT
pool1 128K 214M 32.6K /pool1
pool1/fs1 32.6K 214M 32.6K /pool1/fs1

-bash-3.00# mkfile 512m /vdevs/bigdisk1; mkfile 512m /vdevs/bigdisk2;
mkfile 512m /vdevs/bigdisk3

-bash-3.00# zpool replace pool1 /vdevs/disk1 /vdevs/bigdisk1
-bash-3.00# zpool status
pool: pool1
state: ONLINE
scrub: resilver completed with 0 errors on Mon May 14 11:01:46 2007
config:

NAME STATE READ WRITE CKSUM
pool1 ONLINE 0 0 0
raidz1 ONLINE 0 0 0
replacing ONLINE 0 0 0
/vdevs/disk1 ONLINE 0 0 0
/vdevs/bigdisk1 ONLINE 0 0 0
/vdevs/disk2 ONLINE 0 0 0
/vdevs/disk3 ONLINE 0 0 0

errors: No known data errors
-bash-3.00# zpool status
pool: pool1
state: ONLINE
scrub: resilver completed with 0 errors on Mon May 14 11:01:46 2007
config:

NAME STATE READ WRITE CKSUM
pool1 ONLINE 0 0 0
raidz1 ONLINE 0 0 0
/vdevs/bigdisk1 ONLINE 0 0 0
/vdevs/disk2 ONLINE 0 0 0
/vdevs/disk3 ONLINE 0 0 0

errors: No known data errors
-bash-3.00# df -h
Filesystem size used avail capacity Mounted on
/dev/dsk/c1d1s0 9.6G 3.5G 6.0G 37% /
/devices 0K 0K 0K 0% /devices
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 825M 692K 825M 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
/usr/lib/libc/libc_hwcap1.so.1
9.6G 3.5G 6.0G 37% /lib/libc.so.1
fd 0K 0K 0K 0% /dev/fd
swap 825M 4K 825M 1% /tmp
swap 825M 24K 825M 1% /var/run
/dev/dsk/c1d1s7 63G 960M 62G 2% /export/home
pool1 214M 34K 214M 1% /pool1
pool1/fs1 214M 32K 214M 1% /pool1/fs1
-bash-3.00# mkfile 512m /vdevs/bigdisk2
-bash-3.00# mkfile 512m /vdevs/bigdisk3
-bash-3.00# zpool replace pool1 /vdevs/disk2 /vdevs/bigdisk2
-bash-3.00# zpool replace pool1 /vdevs/disk3 /vdevs/bigdisk3
-bash-3.00# zpool status
pool: pool1
state: ONLINE
scrub: resilver completed with 0 errors on Mon May 14 11:03:19 2007
config:

NAME STATE READ WRITE CKSUM
pool1 ONLINE 0 0 0
raidz1 ONLINE 0 0 0
/vdevs/bigdisk1 ONLINE 0 0 0
/vdevs/bigdisk2 ONLINE 0 0 0
replacing ONLINE 0 0 0
/vdevs/disk3 ONLINE 0 0 0
/vdevs/bigdisk3 ONLINE 0 0 0

errors: No known data errors
-bash-3.00# zpool status
pool: pool1
state: ONLINE
scrub: resilver completed with 0 errors on Mon May 14 11:03:19 2007
config:

NAME STATE READ WRITE CKSUM
pool1 ONLINE 0 0 0
raidz1 ONLINE 0 0 0
/vdevs/bigdisk1 ONLINE 0 0 0
/vdevs/bigdisk2 ONLINE 0 0 0
/vdevs/bigdisk3 ONLINE 0 0 0

errors: No known data errors
-bash-3.00# df -h
Filesystem size used avail capacity Mounted on
/dev/dsk/c1d1s0 9.6G 3.5G 6.0G 37% /
/devices 0K 0K 0K 0% /devices
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 823M 692K 822M 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
/usr/lib/libc/libc_hwcap1.so.1
9.6G 3.5G 6.0G 37% /lib/libc.so.1
fd 0K 0K 0K 0% /dev/fd
swap 822M 4K 822M 1% /tmp
swap 822M 24K 822M 1% /var/run
/dev/dsk/c1d1s7 63G 1.9G 61G 4% /export/home
pool1 982M 34K 982M 1% /pool1
pool1/fs1 982M 32K 982M 1% /pool1/fs1

No comments:

Archive