ZFS Disc delete/wipe

Alnz

Cadet
Joined
Feb 18, 2022
Messages
9
Hi Guys, How do you wipe a boot drive that you have updated ZFS on so you can roll back?
i have tried zpool and sgdisk --zapp-all. dosnt seem to work
 

morganL

Captain Morgan
Administrator
Moderator
iXsystems
Joined
Mar 10, 2018
Messages
2,694
Hi Guys, How do you wipe a boot drive that you have updated ZFS on so you can roll back?
i have tried zpool and sgdisk --zapp-all. dosnt seem to work
Its hard to wipe a current boot drive.... or have you booted on another drive?
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
If you only updated the ZFS pool on your boot drive, then you need to do;
  • Backup your configuration
  • Make a new install flash drive
  • Re-install TrueNAS back on to your boot drive
  • Boot to that fresh boot drive
  • Restore your configuration
  • All done
If on the other hand, you updated the ZFS pool of your DATA, their is no going back. We here in the forums highly recommend not performing a pool upgrade unless you need a specific feature. And even then, manually enabling only that feature is a good way to go.
 
Joined
Oct 22, 2019
Messages
3,641
We here in the forums highly recommend not performing a pool upgrade

Cough, cough....


Cough, cough, cough, cough, cough...

*more coughing*

Must be the dust.

(You'd think with those votes, and how it's an extremely easy "fix", it shouldn't be hard to implement for the next Core and SCALE upgrade. It doesn't risk breaking anything. It's just a dialog box...)
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
We need 4 more votes... I think 10 is the threshold. Should be easy to get one more, from the original poster.
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
Saw this and just made PR to drop alert priority to NOTICE. NAS-124584
Thank you.

Are you able to review changing the text too?
Or is that something that needs more consensus from other developers?
 
Joined
Oct 22, 2019
Messages
3,641
Are you able to review changing the text too?
Agreed. The wording of the text itself is equally important.

To borrow @Arwen's comment, copy and pasted from the ticket:
@Arwen said:
I would also add a comment in the INFO section that individual ZFS features can be enabled, as needed, without having to enable all new ZFS features. Not sure how to word that.

This might apply if someone is looking to enable a new checksum or compression feature by themselves.
 
Last edited:

Alnz

Cadet
Joined
Feb 18, 2022
Messages
9
Thanks for your responses guys,
I have booted from another drive, yes I also upgraded the pool.‍♂️ this is my backup server so I don’t care if I loose all data, I just need to be able to reformat drives.
 

Alnz

Cadet
Joined
Feb 18, 2022
Messages
9
Are my disks now useless? I still haven’t managed to wipe/destroy them and reload TN
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
No, but you may need to wipe the existing TrueNAS boot disk(s) before re-installing. Their may be a safety feature to prevent over-writing an existing install. How you do that depends on your skill set. I'd use "dd" but that can be error prone if you select the wrong disk.

Whence you have the new OS installation complete, you can re-import your existing DATA pool, (and it's disks). If you truly don't want the DATA pool disks updated, then you can "destroy" that pool and re-use the disks for a new, more compatible pool. Then re-run your backups to this newly empty pool.
 

Alnz

Cadet
Joined
Feb 18, 2022
Messages
9
No, but you may need to wipe the existing TrueNAS boot disk(s) before re-installing. Their may be a safety feature to prevent over-writing an existing install. How you do that depends on your skill set. I'd use "dd" but that can be error prone if you select the wrong disk.

Whence you have the new OS installation complete, you can re-import your existing DATA pool, (and it's disks). If you truly don't want the DATA pool disks updated, then you can "destroy" that pool and re-use the disks for a new, more compatible pool. Then re-run your backups to this newly empty pool.
Thanks for your response Arwen,
I have tried dd but it didn’t work, unless there is a command I don’t know about?
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
Sorry, if you wiped the install disks with "dd", and that did not work, I don't know what would.

As I said, "dd" can be error prone. It has worked 100% of the time for me... but, trying to walk someone else through it can be prone to errors.
 

Alnz

Cadet
Joined
Feb 18, 2022
Messages
9
Sorry, if you wiped the install disks with "dd", and that did not work, I don't know what would.

As I said, "dd" can be error prone. It has worked 100% of the time for me... but, trying to walk someone else through it can be prone to errors.
thanks arwen.
But at this stage any help would be appriciated if the drives are currently in fresh truenas install so i can't stuff anything up. so far i have used this command sudo dd if=/dev/zero of=/dev/sdc1 count=1 bs=512k
and tryed sudo dd if=/dev/zero of="/dev/sdc1" seek=$(( $(blockdev --getsz "/dev/sdc1") - ( ( 256 * 1024 * 2) / $(blockdev --getpbsz "/dev/sdc1") ) )) but didn'nt work.

here is my log file if that gives you or anyone else any clues

Error: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/middlewared/job.py", line 426, in run await self.future File "/usr/lib/python3/dist-packages/middlewared/job.py", line 461, in __run_body rv = await self.method(*([self] + args)) File "/usr/lib/python3/dist-packages/middlewared/schema.py", line 1318, in nf return await func(*args, **kwargs) File "/usr/lib/python3/dist-packages/middlewared/schema.py", line 1186, in nf res = await f(*args, **kwargs) File "/usr/lib/python3/dist-packages/middlewared/plugins/boot.py", line 102, in attach await self.middleware.call('boot.format', dev, format_opts) File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1386, in call return await self._call( File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1335, in _call return await methodobj(*prepared_call.args) File "/usr/lib/python3/dist-packages/middlewared/schema.py", line 1318, in nf return await func(*args, **kwargs) File "/usr/lib/python3/dist-packages/middlewared/plugins/boot_/format.py", line 27, in format disk_details = await self.middleware.call('device.get_disk', dev) File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1386, in call return await self._call( File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1346, in _call return await self.run_in_executor(prepared_call.executor, methodobj, *prepared_call.args) File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1249, in run_in_executor return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs)) File "/usr/lib/python3.9/concurrent/futures/thread.py", line 52, in run result = self.fn(*self.args, **self.kwargs) File "/usr/lib/python3/dist-packages/middlewared/plugins/device_/device_info.py", line 196, in get_disk return self.get_disk_details(context, block_device) File "/usr/lib/python3/dist-packages/middlewared/plugins/device_/device_info.py", line 130, in get_disk_details disk['rotationrate'] = self._get_rotation_rate(f'/dev/{dev.sys_name}') File "/usr/lib/python3/dist-packages/middlewared/plugins/device_/device_info.py", line 223, in _get_rotation_rate rotation_rate = disk.rotation_rate() File "libsgio.pyx", line 540, in libsgio.SCSIDevice.rotation_rate File "libsgio.pyx", line 112, in libsgio.SCSIDevice.raise_error libsgio.SCSIErrorException: ('GOOD', {'device_status': 0, 'driver_status': 0, 'transport_status': 4, 'response_len': 0, 'duration': 0, 'din_resid': 0, 'raw_sense_buffer': []})
 
Top