On 2013-02-19 17:02, Victor Latushkin wrote:
On 2/19/13 6:32 AM, Jim Klimov wrote:
On 2013-02-19 14:24, Konstantin Kuklin wrote:
zfs set canmount=off zroot/var/crash

i can`t do this, because zfs list empty


I'd argue that in your case it might be desirable to evacuate data and
reinstall the OS - just to be certain that ZFS on-disk structures on
new installation have no defects.

To evacuate data, a read-only import would suffice:

This is a good idea but ..


# zpool import -f -N -R /a -o ro zroot

This command will not achieve readonly import.

For readonly import one needs to use 'zpool import -o readonly=on
<poolname>' as 'zpool import -o ro <poolname>' will import in R/W mode
and just mount filesystems readonly.

Oops, my bad. Do what the guru says! Really, I was mistaken
in this fast-typing ;)

Feel free to add other options (-f, -N, etc) as needed.



This should import the pool without mounting its datasets (-N).
Using "zfs mount zpool/ROOT/myrootfsname" and so on you can mount just
the datasets which hold your valuable data individually (under '/a' in
this example), and rsync it to some other storage.

After you've saved your data, you can try to "repair" the pool by roll
back:

# zpool export zpool
# zpool import -F -f -N -R /a zroot

This should try to roll back 10 transaction sets or so, possibly giving
you an intact state of ZFS data structures and a usable pool. Maybe not.

//Jim

_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


--


+============================================================+
|                                                            |
| Климов Евгений,                                 Jim Klimov |
| технический директор                                   CTO |
| ЗАО "ЦОС и ВТ"                                  JSC COS&HT |
|                                                            |
| +7-903-7705859 (cellular)          mailto:jimkli...@cos.ru |
|                        CC:ad...@cos.ru,jimkli...@gmail.com |
+============================================================+
| ()  ascii ribbon campaign - against html mail              |
| /\                        - against microsoft attachments  |
+============================================================+



_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to