Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pool exported will not import again if "-d <device directory>" given #214

Open
tps800 opened this issue Sep 26, 2016 · 3 comments
Open

Pool exported will not import again if "-d <device directory>" given #214

tps800 opened this issue Sep 26, 2016 · 3 comments

Comments

@tps800
Copy link

tps800 commented Sep 26, 2016

Wrong documentation or bug?
Following instructions on https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-install-EL7-(CentOS-RHEL)-to-a-Native-ZFS-Root-Filesystem

# zpool create -f -d -o feature@async_destroy=enabled -o feature@empty_bpobj=enabled -o feature@lz4_compress=enabled -o ashift=12 -O compression=lz4 rpool /dev/sdb2
I've used -f to force creation of a new pool overwriting the existing old one.

# zpool export rpool
# zpool import -d /dev/disk/by-id rpool
cannot import 'rpool': no such pool available

Something is wrong with these instructions. Afaik it should import the pool from found device in directory /dev/disk/by-id. But the exported pool cant be found. While

# zpool import rpool

will work.

Going on:
# udevadm trigger
# ls -la /dev/*part*
ls: cannot access /dev/*part*: No such file or directory

Looks like this doesn't create the device as given.

The same goes for the raidz-Pool creation. Exporting doesn't work as creating the device with udevadm trigger.

@tps800
Copy link
Author

tps800 commented Sep 26, 2016

After all I was able to copy my filesystem to zfs, but trying to boot the whole thing:
ol7zfs-2016-09-26-13-36-23

Wrong syntax for mounting zfs-volumes from kernel command line?

@ethermcman
Copy link

ethermcman commented Nov 10, 2016

Short answer : you have to process the dracut command to the pool:
dracut -f -v /rpool/ROOT/boot/initramfs-$(uname -r).img $(uname -r)
Long answer : when you're on your temp system, when you process the dracut command as per instruction, you make this temp system to load the zfs module at boot but you're not making it to the zfs system. So when you're booting your zfs system, it doesn't know that it has to load the zfs module. This is why you have to run the dracut command against your pool.
Sorry for my english : frenchie behind keyboard

@ethermcman
Copy link

ethermcman commented Nov 10, 2016

For the zpool import -d /dev/disk/by-id rpool AND if you're on vmware workstation/player/vpshere, you have to add disk.EnableUUID = "TRUE" to your VM configuration file. Make sure to add it when your VM is shut down if not, VMWare will set it to "FALSE" or delete the entry at reboot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants