-
-
Notifications
You must be signed in to change notification settings - Fork 9
Can't reformat machine when using LVM on RAID1 #10
Comments
Oops, I intended this to be a https://github.com/NixOS/nixops/ issue but filed it in the wrong (or maybe not?) repo. Anyway, as mentioned, this might be a nixpart problem, because I guess |
CC @aszlig |
A similar error can happen with existing non-LVM partitions:
|
Ran into a similar problem in my install script
https://github.com/cleverca22/nix-tests/blob/master/kexec/justdoit.nix#L37
…On Jul 24, 2017 10:20 PM, "Niklas Hambüchen" ***@***.***> wrote:
A similar error can happen with existing non-LVM partitions:
test-node-1> partitioning disks...
test-node-1> bash: warning: setlocale: LC_TIME: cannot change locale ()
test-node-1> /nix/store/yzzvqaa8y7x6xbsz3baik8gkz0qxisc1-pykickstart-1.99.39/lib/python2.7/site-packages/pykickstart/commands/raid.py:321: UserWarning: A RAID device with the name root has already been defined.
test-node-1> warnings.warn(_("A RAID device with the name %s has already been defined.") % rd.device)
test-node-1> Traceback (most recent call last):
test-node-1> File "/nix/store/ni2js4lwp1w6l14azfcjlgwn2im38m1b-nixpart-0.4.1/bin/.nixpart-wrapped", line 166, in <module>
test-node-1> main()
test-node-1> File "/nix/store/ni2js4lwp1w6l14azfcjlgwn2im38m1b-nixpart-0.4.1/bin/.nixpart-wrapped", line 126, in main
test-node-1> ks.initialize()
test-node-1> File "/nix/store/ni2js4lwp1w6l14azfcjlgwn2im38m1b-nixpart-0.4.1/lib/python2.7/site-packages/nixkickstart.py", line 984, in initialize
test-node-1> self.handler.raid.execute(self.storage, self.handler)
test-node-1> File "/nix/store/ni2js4lwp1w6l14azfcjlgwn2im38m1b-nixpart-0.4.1/lib/python2.7/site-packages/nixkickstart.py", line 673, in execute
test-node-1> r.execute(storage, ksdata)
test-node-1> File "/nix/store/ni2js4lwp1w6l14azfcjlgwn2im38m1b-nixpart-0.4.1/lib/python2.7/site-packages/nixkickstart.py", line 780, in execute
test-node-1> raise KickstartValueError(formatErrorMsg(self.lineno, msg="The Software RAID array name \"%s\" is already in use." % devicename))
test-node-1> pykickstart.errors.KickstartValueError: The following problem occurred on line 13 of the kickstart file:
test-node-1>
test-node-1> The Software RAID array name "root" is already in use.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#10 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAzy4W9PlhHyF2yVPhL6TroKLviN2cAsks5sRULqgaJpZM4Oh44s>
.
|
I'm also wondering if I could do the various "turn that off" steps in side that kickstart definition, or if it's necessary that nixops/nixpart do it for me. After all, I do Is there some equivalent to |
Conversation between @cleverca22 and me on IRC on this:
|
This commit is only in master, which is currently unreleased and not in use for NixOps yet. The version in master currently won't work for NixOps at all and is part of NixOS/nixpkgs#21403. |
ah, didn't look into which version nixops was using |
I'm implementing a feature
before the other actions. |
That is NixOS/nixops#948. This might be able to provide the workaround. |
I'm using this on a Hetzner server with
nixops
:I get:
Going into rescue mode manually and running it myself hints at the problem:
Indeed, the problem is that the volume group is active:
After this I can stop:
I think there's something wrong in
blivet
ornixpart
ornixops
, it doesn't know that it should stop all VGs on the device before trying to--stop
it.I think this is because of some failed (or rather, successful?) deployment before that created the current state as shown in
lsblk
; I suspect that when the rescue mode boots, it immediately starts the mdadm array and the LVM volume group.I could work around it by wiping that LVM setup manually:
But I think that nixops should be able to provision Hetzner machines, no matter what's on the disk.
The text was updated successfully, but these errors were encountered: