I''m a new user of ZFS and I have an external USB drive which contains a ZFS pool with file system. It seems that it does not get auto mounted when I plug in the drive. I''m running osol-0811. How can I manually mount this drive? It has a pool named rpool on it. Is there any diagnostics commands that can be used to investigate the contents of the pool or repair a damaged file system ? rmformat shows that the physical name of the USB device is: /dev/rdsk/c4t0d0p0 If I try ''# zpool import" I get: pool: rpool id: 3765122753259138111 state: UNAVAIL status: The pool was last accessed by another system. action: The pool cannot be imported due to damaged devices or data. see: http://www.sun.com/msg/ZFS-8000-EY config: rpool UNAVAIL newer version c4t0d0s0 ONLINE I suppose this means that the data is corrupted in some way although I never observed any write errors when it was created. This drive was formatted with zfs by the osol-0906 installer. Another question is about backward compatibility of ZFS. If I create a ZFS system under say osol-0906 can I access this system on older nv builds and Solaris 10 ? Thanks /Karl D -- This message posted from opensolaris.org
Hua-Ying Ling
2009-Jul-07 20:48 UTC
[zfs-discuss] Problem with mounting ZFS from USB drive
I''m no expert but I think you need to export a zfs volume before you remove it or it''ll complain when you try to import it on another system. "zfs admin guide pg. 89" zfs export poolName You can do a zfs -f import to import it anyway. Hua-Ying On Tue, Jul 7, 2009 at 4:34 PM, Karl Dalen<no-reply at opensolaris.org> wrote:> I''m a new user of ZFS and I have an external USB drive which contains > a ZFS pool with file system. It seems that it does not get auto mounted > when I plug in the drive. I''m running osol-0811. > > How can I manually mount this drive? It has a pool named rpool on it. > Is there any diagnostics commands that can be used to investigate the > contents of the pool or repair a damaged file system ? > > rmformat shows that the physical name of the USB device is: /dev/rdsk/c4t0d0p0 > If I try ''# zpool import" I get: > ?pool: rpool > ? ?id: 3765122753259138111 > ?state: UNAVAIL > status: The pool was last accessed by another system. > action: The pool cannot be imported due to damaged devices or data. > ? see: http://www.sun.com/msg/ZFS-8000-EY > config: > ? ? ? ?rpool ? ? ? UNAVAIL ?newer version > ? ? ? ? ?c4t0d0s0 ?ONLINE > > I suppose this means that the data is corrupted in some way > although I never observed any write errors when it was created. > This drive was formatted with zfs by the osol-0906 installer. > > Another question is about backward compatibility of ZFS. If I create > a ZFS system under say osol-0906 can I access this system on older > nv builds and Solaris 10 ? > > Thanks > /Karl D > -- > This message posted from opensolaris.org > _______________________________________________ > zfs-discuss mailing list > zfs-discuss at opensolaris.org > http://mail.opensolaris.org/mailman/listinfo/zfs-discuss >
Darren J Moffat
2009-Jul-08 08:30 UTC
[zfs-discuss] Problem with mounting ZFS from USB drive
Karl Dalen wrote:> I''m a new user of ZFS and I have an external USB drive which contains > a ZFS pool with file system. It seems that it does not get auto mounted > when I plug in the drive. I''m running osol-0811. > > How can I manually mount this drive? It has a pool named rpool on it. > Is there any diagnostics commands that can be used to investigate the > contents of the pool or repair a damaged file system ? > > rmformat shows that the physical name of the USB device is: /dev/rdsk/c4t0d0p0 > If I try ''# zpool import" I get: > pool: rpool > id: 3765122753259138111 > state: UNAVAIL > status: The pool was last accessed by another system. > action: The pool cannot be imported due to damaged devices or data. > see: http://www.sun.com/msg/ZFS-8000-EY > config: > rpool UNAVAIL newer version > c4t0d0s0 ONLINEDid you try this: zpool import -f rpool someothername I think there are two reasons it won''t import: 1) It was last accessed by another system (or maybe the same one but it had a different hostid at the time) so you need to use the -f flag. 2) There is probably another pool called rpool (the one you are running from), right ? -- Darren J Moffat
Victor Latushkin
2009-Jul-08 08:47 UTC
[zfs-discuss] Problem with mounting ZFS from USB drive
On 08.07.09 12:30, Darren J Moffat wrote:> Karl Dalen wrote: >> I''m a new user of ZFS and I have an external USB drive which contains >> a ZFS pool with file system. It seems that it does not get auto mounted >> when I plug in the drive. I''m running osol-0811. >> >> How can I manually mount this drive? It has a pool named rpool on it. >> Is there any diagnostics commands that can be used to investigate the >> contents of the pool or repair a damaged file system ? >> >> rmformat shows that the physical name of the USB device is: >> /dev/rdsk/c4t0d0p0 >> If I try ''# zpool import" I get: >> pool: rpool >> id: 3765122753259138111 >> state: UNAVAIL >> status: The pool was last accessed by another system. >> action: The pool cannot be imported due to damaged devices or data. >> see: http://www.sun.com/msg/ZFS-8000-EY >> config: >> rpool UNAVAIL newer version >> c4t0d0s0 ONLINE > > Did you try this: > > zpool import -f rpool someothername > > I think there are two reasons it won''t import: > 1) It was last accessed by another system (or maybe the same > one but it had a different hostid at the time) so you need > to use the -f flag. > 2) There is probably another pool called rpool (the one you > are running from), right ?I think this pool is just too modern for the system you are trying to import it on as it is UNAVAIL due to newer version. Here''s an example: root at jax # mkfile -n 64m version root at jax # zpool create version /var/tmp/version root at jax # zpool upgrade version This system is currently running ZFS pool version 10. Pool ''version'' is already formatted using the current version. root at jax # root at jax # rcp version theorem:/var/tmp On the other host: root at theorem # zpool upgrade This system is currently running ZFS version 4. All pools are formatted using this version. root at theorem # zpool import -d /var/tmp pool: version id: 2589325003567752919 state: FAULTED status: The pool is formatted using an incompatible version. action: The pool cannot be imported. Access the pool on a system running newer software, or recreate the pool from backup. see: http://www.sun.com/msg/ZFS-8000-A5 config: version UNAVAIL newer version /var/tmp/version ONLINE root at theorem # There''s a difference in messages though, but older host in my case is running Solaris 10 U4, so it may explain it. Anyway, I think pool version is the real reason here. Victor
Thanks for the great tips. I did some more testing and indeed it was a version issue. The pool was created under: # zpool upgrade This system is currently running ZFS version 14. whereas I tried it on systems with versions 10 and 12. It could be imported on a newer system using -f option. I suppose it did not auto mount the pool because it had the same name as existing pools. Is this a known issue with ZFS ? I assume because of this portability issue ZFS is not really suitable for use on removable media such as USB drives that are intended to be mounted on different hosts which may have different Solaris versions. It may be better to stick with UFS for this case. /KarlD -- This message posted from opensolaris.org