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

Buggy detection of BEOLD and BENEW when two rpool layouts are present #2

Open
jimklimov opened this issue Sep 11, 2019 · 1 comment

Comments

@jimklimov
Copy link
Owner

While cloning an rpool to a new backup pool (nvpool) I found that the script gets puzzled about naming and so errors out with guesswork, detecting two entries for each:

=== Will clone hipster_2018.10-20190322T085637Z
hipster_2018.10-20190322T085637Z into hipster_2018.10
hipster_2018.10-20190911T051049Z, ok? Using these settings:
BENEW=$'hipster_2018.10\nhipster_2018.10-20190911T051049Z'
BENEW_DS=$'rpool/ROOT/hipster_2018.10\nhipster_2018.10-20190911T051049Z'
BENEW_MNT=/a
BENEW_MPT=/a
BEOLD=$'hipster_2018.10-20190322T085637Z\nhipster_2018.10-20190322T085637Z'
BEOLD_DS=$'rpool/ROOT/hipster_2018.10-20190322T085637Z\nhipster_2018.10-20190322T085637Z'
BEOLD_MNT=/
...

Unsurprisingly, beadm refused to process these arguments and the script died quickly.

To be fair, beadm list is also puzzled, showing entries from both pools, not just the original rpool. Had to export the nvpool to upgrade the original system. Probably could also specify the variables manually carefully, but did not try :-)

@jimklimov
Copy link
Owner Author

FWIW, here is how beadm sees the world with the nvpool (zfs-sent replica of rpool) just imported:

root@jimoi:/root# beadm list
BE                                        Active Mountpoint    Space Policy Created
firefly_0215                              -      -             84.7M static 2016-10-03 16:50
hipster_2016.10_mate                      -      -             2.48M static 2016-11-05 10:59
hipster_2016.10_mate_drm-20170430T155411Z -      -             7.68M static 2017-04-30 17:54
hipster_2017.04                           -      -             2.61M static 2017-05-03 06:49
hipster_2017.04-20170903T231101Z          -      -             2.81M static 2017-09-04 01:11
hipster_2017.10                           -      -             2.73M static 2017-11-12 19:40
hipster_2017.10-20171227T103659Z          -      -             2.69M static 2017-12-27 11:37
hipster_2017.10-20171227T103659Z-nv       -      -             2.34M static 2017-12-30 11:46
hipster_2017.10-20180203T155526Z          -      -             3.68M static 2018-02-03 16:55
hipster_2018.04-20180503T141758Z          -      -             3.08M static 2018-05-03 16:19
hipster_2018.04-20180724T112647Z          -      -             5.35M static 2018-07-24 13:26
hipster_2018.10-20181113T103249Z          -      -             1.31M static 2018-11-13 10:32
firefly_0215a                             -      /mnt/1        0     static 2019-01-23 12:06
hipster_2018.10-20190213T012200Z          -      -             5.45M static 2019-02-13 02:22
hipster_2018.10-20190322T085637Z          -      -             1.13M static 2019-03-22 09:56
hipster_2018.10-20190322T085637Z          -      -             56.1G static 2019-09-10 20:06
hipster_2018.04-20180503T141758Z          -      -             3.17M static 2019-09-10 22:56
hipster_2017.04                           -      -             2.66M static 2019-09-10 23:02
hipster_2017.10-20171227T103659Z          -      -             2.82M static 2019-09-10 23:13
hipster_2018.10-20181113T103249Z          -      -             1.52M static 2019-09-10 23:21
hipster_2017.10                           -      -             2.82M static 2019-09-10 23:31
hipster_2016.10_mate                      -      -             2.58M static 2019-09-10 23:34
hipster_2017.04-20170903T231101Z          -      -             2.86M static 2019-09-10 23:49
hipster_2018.10-20190129T091404Z          -      -             1.26G static 2019-09-10 23:51
hipster_2017.10-20180203T155526Z          -      -             3.86M static 2019-09-10 23:56
firefly_0215                              -      -             84.6M static 2019-09-10 23:58
hipster_2018.04-20180724T112647Z          -      -             5.53M static 2019-09-10 23:58
hipster_2016.10_mate_drm-20170430T155411Z -      -             7.78M static 2019-09-11 00:01
hipster_2017.10-20171227T103659Z-nv       -      -             2.39M static 2019-09-11 00:03
hipster_2018.10-20190213T012200Z          -      -             5.67M static 2019-09-11 00:06
firefly_0215a                             -      /nvpool/mnt/1 0     static 2019-09-11 00:08
hipster_2018.10-20190911T051459Z          NR     /             60.8G static 2019-09-11 07:15

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

1 participant