Re: [zfs-discuss] zfs send/receive scenario problem w/ auto-snap service
2011-11-05 2:12, HUGE | David Stahl wrote: Our problem is that we need to use the -R to snapshot and send all the child zvols, yet since we have a lot of data (3.5 TB), the hourly snapshots are cleaned on the sending side, and breaks the script as it is running. In recent OpenSolaris and Illumos releases, you can use zfs hold command to lock a snapshot from deletion. So before sending you'd walk the snapshots you want to send and hold them; after the send is complete you'd unhold them so they can be actually deleted. It would be correct to wrap this all into a script... You can review the latest snapshots for a tree with a one-liner like this: # zfs list -tall -H -o name -r pool/export | grep -v @ | \ while read DS; do zfs list -t snapshot -d1 -r $DS | tail -1; done pool/export@zfs-auto-snap:frequent-2011-11-05-17:00 0 -22K - pool/export/distr@zfs-auto-snap:frequent-2011-11-05-17:00 0 - 4.81G - pool/export/home@zfs-auto-snap:frequent-2011-11-05-17:00 0 - 396M - pool/export/home/jim@zfs-auto-snap:frequent-2011-11-05-17:00 0 - 24.7M - If you only need filesystem OR volume datasets, you can replace the first line with one of these: # zfs list -t filesystem -H -o name -r pool/export | \ # zfs list -t volume -H -o name -r pool/export | \ Probably (for a recursive send) you'd need to catch all the identically-named snapshots in the tree. Another workaround can be to store more copies of the snapshots you need, i.e. not 24 hourlies but 100 or so. That would be like: # svccfg -s hourly listprop | grep zfs/keep zfs/keep astring 24 # svccfg -s hourly setprop zfs/keep = 100 zfs/keep astring 24 # svcadm refresh hourly You could also use zfs-auto-send SMF-instance attributes like zfs/backup-save-cmd to use a script which would place a hold on the snapshot, then send and unhold it. So you have a number of options almost out-of-the-box ;) //Jim ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
[zfs-discuss] ZFS Recovery: What do I try next?
I would like to pick the brains of the ZFS experts on this list: What would you do next to try and recover this zfs pool? I have a ZFS RAIDZ1 pool named bank0 that I cannot import. It was composed of 4 1.5 TiB disks. One disk is totally dead. Another had SMART errors, but using GNU ddrescue I was able to copy all the data off successfully. I have copied all 3 remaining disks as images using dd on to another another filesystem. Using the loopback filesystem I can treat these images as if they were real disks. I've made a snapshot of the filesystem the disk images are on so that I can try things and rollback the changes if needed. gir is the computer these disks are hosted on. It used to be a Nexenta server, but is now Ubuntu 11.10 with the zfs on linux modules. I have tried booting up Solaris Express 11 Live CD and doing zpool import -fFX bank0 which ran for ~6 hours and put out: one or more devices is currently unavailable I have tried zpool import -fFX bank0 on linux with the same results. I have tried moving the drives back into the controller config they where before, and booted my old Nexenta root disk where the /etc/zfs/zpool.cache still had an entry for bank0. I was not able to get the filesystems mounts. I can't remember what errors I got. I can do it again if the errors might be useful. Here is the output of the different utils: root@gir:/bank3/hd# zpool import -d devs pool: bank0 id: 3936305481264476979 state: FAULTED status: The pool was last accessed by another system. action: The pool cannot be imported due to damaged devices or data. The pool may be active on another system, but can be imported using the '-f' flag. see: http://www.sun.com/msg/ZFS-8000-EY config: bank0 FAULTED corrupted data raidz1-0 DEGRADED loop0 ONLINE loop1 ONLINE loop2 ONLINE c10t2d0p0 UNAVAIL root@gir:/bank3/hd# zpool import -d devs bank0 cannot import 'bank0': pool may be in use from other system, it was last accessed by gir (hostid: 0xa1767) on Mon Oct 24 15:50:23 2011 use '-f' to import anyway root@gir:/bank3/hd# zpool import -f -d devs bank0 cannot import 'bank0': I/O error Destroy and re-create the pool from a backup source. root@gir:/bank3/hd# zdb -e -p devs bank0 Configuration for import: vdev_children: 1 version: 26 pool_guid: 3936305481264476979 name: 'bank0' state: 0 hostid: 661351 hostname: 'gir' vdev_tree: type: 'root' id: 0 guid: 3936305481264476979 children[0]: type: 'raidz' id: 0 guid: 10967243523656644777 nparity: 1 metaslab_array: 23 metaslab_shift: 35 ashift: 9 asize: 6001161928704 is_log: 0 create_txg: 4 children[0]: type: 'disk' id: 0 guid: 13554115250875315903 phys_path: '/pci@0,0/pci1002,4391@11/disk@3,0:q' whole_disk: 0 DTL: 57 create_txg: 4 path: '/bank3/hd/devs/loop0' children[1]: type: 'disk' id: 1 guid: 17894226827518944093 phys_path: '/pci@0,0/pci1002,4391@11/disk@0,0:q' whole_disk: 0 DTL: 62 create_txg: 4 path: '/bank3/hd/devs/loop1' children[2]: type: 'disk' id: 2 guid: 9087312107742869669 phys_path: '/pci@0,0/pci1002,4391@11/disk@1,0:q' whole_disk: 0 DTL: 61 create_txg: 4 faulted: 1 aux_state: 'err_exceeded' path: '/bank3/hd/devs/loop2' children[3]: type: 'disk' id: 3 guid: 13297176051223822304 path: '/dev/dsk/c10t2d0p0' devid: 'id1,sd@SATA_ST31500341AS9VS32K25/q' phys_path: '/pci@0,0/pci1002,4391@11/disk@2,0:q' whole_disk: 0 DTL: 60 create_txg: 4 zdb: can't open 'bank0': No such file or directory ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] ZFS Recovery: What do I try next?
Dir you try Zpool clear -F bank0 with tbe latest solaris express? Sent from my iPad On Nov 5, 2011, at 2:35 PM, Myers Carpenter my...@maski.org wrote: I would like to pick the brains of the ZFS experts on this list: What would you do next to try and recover this zfs pool? I have a ZFS RAIDZ1 pool named bank0 that I cannot import. It was composed of 4 1.5 TiB disks. One disk is totally dead. Another had SMART errors, but using GNU ddrescue I was able to copy all the data off successfully. I have copied all 3 remaining disks as images using dd on to another another filesystem. Using the loopback filesystem I can treat these images as if they were real disks. I've made a snapshot of the filesystem the disk images are on so that I can try things and rollback the changes if needed. gir is the computer these disks are hosted on. It used to be a Nexenta server, but is now Ubuntu 11.10 with the zfs on linux modules. I have tried booting up Solaris Express 11 Live CD and doing zpool import -fFX bank0 which ran for ~6 hours and put out: one or more devices is currently unavailable I have tried zpool import -fFX bank0 on linux with the same results. I have tried moving the drives back into the controller config they where before, and booted my old Nexenta root disk where the /etc/zfs/zpool.cache still had an entry for bank0. I was not able to get the filesystems mounts. I can't remember what errors I got. I can do it again if the errors might be useful. Here is the output of the different utils: root@gir:/bank3/hd# zpool import -d devs pool: bank0 id: 3936305481264476979 state: FAULTED status: The pool was last accessed by another system. action: The pool cannot be imported due to damaged devices or data. The pool may be active on another system, but can be imported using the '-f' flag. see: http://www.sun.com/msg/ZFS-8000-EY config: bank0 FAULTED corrupted data raidz1-0 DEGRADED loop0 ONLINE loop1 ONLINE loop2 ONLINE c10t2d0p0 UNAVAIL root@gir:/bank3/hd# zpool import -d devs bank0 cannot import 'bank0': pool may be in use from other system, it was last accessed by gir (hostid: 0xa1767) on Mon Oct 24 15:50:23 2011 use '-f' to import anyway root@gir:/bank3/hd# zpool import -f -d devs bank0 cannot import 'bank0': I/O error Destroy and re-create the pool from a backup source. root@gir:/bank3/hd# zdb -e -p devs bank0 Configuration for import: vdev_children: 1 version: 26 pool_guid: 3936305481264476979 name: 'bank0' state: 0 hostid: 661351 hostname: 'gir' vdev_tree: type: 'root' id: 0 guid: 3936305481264476979 children[0]: type: 'raidz' id: 0 guid: 10967243523656644777 nparity: 1 metaslab_array: 23 metaslab_shift: 35 ashift: 9 asize: 6001161928704 is_log: 0 create_txg: 4 children[0]: type: 'disk' id: 0 guid: 13554115250875315903 phys_path: '/pci@0,0/pci1002,4391@11/disk@3,0:q' whole_disk: 0 DTL: 57 create_txg: 4 path: '/bank3/hd/devs/loop0' children[1]: type: 'disk' id: 1 guid: 17894226827518944093 phys_path: '/pci@0,0/pci1002,4391@11/disk@0,0:q' whole_disk: 0 DTL: 62 create_txg: 4 path: '/bank3/hd/devs/loop1' children[2]: type: 'disk' id: 2 guid: 9087312107742869669 phys_path: '/pci@0,0/pci1002,4391@11/disk@1,0:q' whole_disk: 0 DTL: 61 create_txg: 4 faulted: 1 aux_state: 'err_exceeded' path: '/bank3/hd/devs/loop2' children[3]: type: 'disk' id: 3 guid: 13297176051223822304 path: '/dev/dsk/c10t2d0p0' devid: 'id1,sd@SATA_ST31500341AS9VS32K25/q' phys_path: '/pci@0,0/pci1002,4391@11/disk@2,0:q' whole_disk: 0 DTL: 60 create_txg: 4 zdb: can't open 'bank0': No such file or directory ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss
Re: [zfs-discuss] Stream versions in Solaris 10.
On Fri, Nov 4, 2011 at 6:49 PM, Ian Collins i...@ianshome.com wrote: On 11/ 5/11 02:37 PM, Matthew Ahrens wrote: On Wed, Oct 19, 2011 at 1:52 AM, Ian Collins i...@ianshome.com mailto: i...@ianshome.com wrote: I just tried sending from a oi151a system to a Solaris 10 backup server and the server barfed with zfs_receive: stream is unsupported version 17 I can't find any documentation linking stream version to release, so does anyone know the Update 10 stream version? The stream version here is actually the zfs send stream version, which is different from the zpool (SPA) and zfs (ZPL) version numbers. 17 is DMU_BACKUP_FEATURE_SA_SPILL (42) + DMU_SUBSTREAM (1). The SA_SPILL feature is enabled when sending a filesystem of version 5 (System attributes) or later. So the problem is that you are sending a version 5 zfs filesystem to a system that does not support filesystem version 5. Thank you Matt. Are these DMU details documented anywhere? I'm familiar with the SPA and ZPL defines in zfs.h. Unfortunately, they are not well documented. However, you can read the structure definitions in zfs_ioctl.h. The send structures are right at the beginning. --matt ___ zfs-discuss mailing list zfs-discuss@opensolaris.org http://mail.opensolaris.org/mailman/listinfo/zfs-discuss