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

Unable to create snapshot #2

Closed
slicer69 opened this issue May 30, 2018 · 7 comments
Closed

Unable to create snapshot #2

slicer69 opened this issue May 30, 2018 · 7 comments
Assignees

Comments

@slicer69
Copy link
Contributor

@slicer69 slicer69 commented May 30, 2018

When running "zedenv create on a pool called "mydata" the command returns the error

"Failed to create snapshot mydata/mydata@2018-05-30"

This appears to be a problem with mydata not having a volume also called "mydata". Ideally, the zedenv command should be trying to create a snapshot called "mydata@2018-05-30".

@johnramsden

This comment has been minimized.

Copy link
Owner

@johnramsden johnramsden commented May 30, 2018

How are your datasets setup? Are they in a <pool>/ROOT/<boot environment> hierarchy? If not, that might be the problem.

@johnramsden

This comment has been minimized.

Copy link
Owner

@johnramsden johnramsden commented May 30, 2018

Yeah that's the problem if your root dataset is installed to mydata. Are you able to boot into another system that can use ZFS? You could use your install media that you used to install your system originally.

If so you could rename it to mydata/ROOT/default

You would want to import the pool to an altroot, say /mnt:

zpool import -d /dev/disk/by-id -R /mnt mydata

Rename your root

zfs rename -p mydata mydata/ROOT/default
zfs set mountpoint=none mydata
zfs set mountpoint=none mydata/ROOT 

Make sure your root is set:

zfs set mountpoint=/ mydata/ROOT/default

Set your bootfs

zpool set bootfs=mydata/ROOT/default mydata

Then, you need to edit your bootloader config to point to mydata/ROOT/default. If you're using systemdboot, find the zfs=mydata, and change it to zfs=mydata/ROOT/default, if it was set to zfs=bootfs, it would probably continue to work but you might want to set it to zfs=mydata/ROOT/default.

@slicer69

This comment has been minimized.

Copy link
Contributor Author

@slicer69 slicer69 commented May 31, 2018

You are right, Antergos sets up ZFS without any datasets. Unfortunately this also means that setting up a mydata/ROOT/default set will not work. Since there are no data sets there is nothing to rename or shift over to the new location. The above "zfs rename" command and similar steps to create and move the boot point into a new dataset fail. I think we'll just have to acknowledge Antergos won't work with zedenv.

@johnramsden

This comment has been minimized.

Copy link
Owner

@johnramsden johnramsden commented May 31, 2018

Hmm, with -p I would have thought it would create any parent datasets needed.

You could also just create them manually:

zfs create -o mountpoint=none mydata/ROOT
zfs rename mydata mydata/ROOT/default

If you can't rename them, you could always send them with:

zfs create -o mountpoint=none mydata/ROOT
zfs snapshot mydata@pre-be-snap
zfs send mydata@pre-be-snap | zfs recv mydata/ROOT/default
@johnramsden johnramsden self-assigned this May 31, 2018
@slicer69

This comment has been minimized.

Copy link
Contributor Author

@slicer69 slicer69 commented May 31, 2018

I think, in this case, the zend/recv process is the only one that will work, I'm running into errors trying to create a new set. Thank you for trouble-shooting this.

I've also tried zedenv on FreeBSD. It's working pretty well. It just requires that the LANG environment variable is set before zedenv will run. Otherwise it seems to work just as well as beadm.

@johnramsden

This comment has been minimized.

Copy link
Owner

@johnramsden johnramsden commented May 31, 2018

Glad to hear that. It's really a shame antergos defaults to setting their pool like that without letting you customize it.

Yeah I noticed that I needed to set the Locale and set utf-8 to get it working properly.

@slicer69

This comment has been minimized.

Copy link
Contributor Author

@slicer69 slicer69 commented May 31, 2018

Great, I think we can close this bug. I'll just tweak my Antergos set up to see if I can make it match the expected datasets.

@slicer69 slicer69 closed this May 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.