Mar 022016
 

Last night, I moved a SAS card and had to renumber some devices. I also moved two SSDs into the same box (see photos). Those SSDs were the boot drives from the system from which I pulled the SAS drive. That box, tape01, contains the Bacula configuration file I need for this new box.

I know, I know. Why not use Bacula to restore that file.

That would be too easy. I want to try this because I’ve never done this.

Instead, I am going to use zpool import.

$ sudo zpool import
   pool: zroot
     id: 13361499957119293279
  state: ONLINE
 status: The pool was last accessed by another system.
 action: The pool can be imported using its name or numeric identifier and
	the '-f' flag.
   see: http://illumos.org/msg/ZFS-8000-EY
 config:

	zroot       ONLINE
	  mirror-0  ONLINE
	    ada2p3  ONLINE
	    ada1p3  ONLINE

I originally thought I could not import this pool because it had the same name as a pool already on the system. I see now that is not so.

However, if it was the same name, I could still import it via zpool import … id newname.

Let’s do exactly that.

[dan@knew:/mnt] $ sudo zpool import -R /mnt 13361499957119293279 newZroot
cannot import 'zroot': pool may be in use from other system, it was last accessed by  (hostid: 0xd697c68e) on Tue Mar  1 10:25:20 2016
use '-f' to import anyway
[dan@knew:/mnt] $ sudo zpool import -fR /mnt 13361499957119293279 newZroot

That took about 90 seconds to import.

Look here:

[dan@knew:/mnt]$ zpool status
  pool: newZroot
 state: ONLINE
  scan: none requested
config:

	NAME        STATE     READ WRITE CKSUM
	newZroot    ONLINE       0     0     0
	  mirror-0  ONLINE       0     0     0
	    ada2p3  ONLINE       0     0     0
	    ada1p3  ONLINE       0     0     0

errors: No known data errors

  pool: system
 state: ONLINE
  scan: scrub repaired 40.6M in 33h55m with 0 errors on Thu Feb 25 14:25:13 2016
config:

	NAME        STATE     READ WRITE CKSUM
	system      ONLINE       0     0     0
	  raidz2-0  ONLINE       0     0     0
	    da0p3   ONLINE       0     0     0
	    da1p3   ONLINE       0     0     0
	    da2p3   ONLINE       0     0     0
	    da3p3   ONLINE       0     0     0
	    da4p3   ONLINE       0     0     0
	    da5p3   ONLINE       0     0     0
	    ada0p3  ONLINE       0     0     0
	    da6p3   ONLINE       0     0     0
	    ada3p3  ONLINE       0     0     0
	    da7p3   ONLINE       0     0     0

errors: No known data errors

I noticed these in /var/log/messages:

Mar  2 22:57:01 knew devd: Executing 'logger -p kern.notice -t ZFS 'vdev state changed, pool_guid=13361499957119293279 vdev_guid=17238785103866601718''
Mar  2 22:57:01 knew ZFS: vdev state changed, pool_guid=13361499957119293279 vdev_guid=17238785103866601718
Mar  2 22:57:01 knew devd: Executing 'logger -p kern.notice -t ZFS 'vdev state changed, pool_guid=13361499957119293279 vdev_guid=15857689873615724698''
Mar  2 22:57:01 knew ZFS: vdev state changed, pool_guid=13361499957119293279 vdev_guid=15857689873615724698

Let’s find the files:

[dan@knew:/mnt] $ cd /mnt/usr/local/etc/bacula/
[dan@knew:/mnt/usr/local/etc/bacula] $ ls
bacula-barcodes        bacula-dir.conf.sample bacula-fd.conf.sample  bacula-sd.conf.sample  bconsole.conf          mtx-changer.conf
bacula-barcodes.sample bacula-fd.conf         bacula-sd.conf         bacula-sd.conf~        bconsole.conf.sample
[dan@knew:/mnt/usr/local/etc/bacula] $ 

Mission accomplished!

Website Pin Facebook Twitter Myspace Friendfeed Technorati del.icio.us Digg Google StumbleUpon Premium Responsive