How to do a system reset of the SSD caching

Moderator: Lillian.W@AST

dstel
Posts: 19
youtube meble na wymiar Warszawa
Joined: Thu Oct 15, 2020 2:07 am

How to do a system reset of the SSD caching

Post by dstel »

Hello,
Because of the 5401 bug (Ticket 37294), I would like to know if there is a way, including by ssh commands, to reset the state of the drives so I can use them again.

I already rebooted, and I don't want to open the NAS to go format those drives on another server.

EDIT, SOLUTION (workaround)

Disclaimer: this is my workaround. I found it by doing some stuff on my NAS. It worked for me, it is not an official solution given by the support.

Connect with ssh.

Find in /dev/mapper maps that are not complete for the cache : you need:
mdX_m
mdX_s
and if successful you also have a
mdX_c
but if you have a problem, you don't see it.

The problem is, when it fails you only have a mdX_m and mdX_s but not the mdX_c and I guess the system refuse to recreate them when you do the creation with the menu.

So you have to :

Code: Select all

dmsetup remove mdX_m
dmsetup remove mdX_s
and reboot. Then you can use the menu to create a cache.
Last edited by dstel on Thu Nov 05, 2020 2:30 am, edited 3 times in total.
User avatar
orion
Posts: 3482
Joined: Wed May 29, 2013 11:09 am

Re: How to do a system reset of the SSD caching

Post by orion »

Do you mean to remove SSD cache? Found a guide here: https://www.asustor.com/en-gb/online/Co ... ?topic=202

(B) Do not remove SSDs without ejecting safely. If SSD Caching is no longer required, the SSD must be ejected first before removal. Click SSD Cache under Management. Do not turn off the NAS before the ejection completes.
dstel
Posts: 19
Joined: Thu Oct 15, 2020 2:07 am

Re: How to do a system reset of the SSD caching

Post by dstel »

No, it's something deeper because of a bug. I needed some ssh trick. But now after creation/deletion from the interface and weird period when I've got 0byte/0available on my volume and then a reset, I was able to create the SSD cache again. However there is still a potential issue for future user, so the ticket is still open. It's not an incident anymore, it's just a problem that need a fix.
User avatar
Johnson23
Posts: 1
Joined: Sat Oct 24, 2020 3:04 pm
Contact:

Re: How to do a system reset of the SSD caching

Post by Johnson23 »

Are you not afraid to destroy all data on the SSD? Be cautious!
dstel
Posts: 19
Joined: Thu Oct 15, 2020 2:07 am

Re: How to do a system reset of the SSD caching

Post by dstel »

Edited with the workaround.
TheDesignated1
Posts: 1
Joined: Mon Nov 20, 2023 7:36 am

Re: How to do a system reset of the SSD caching

Post by TheDesignated1 »

Is the 5401 bug regarding SSD caching still a thing? I think I'm a "victim" of it.

Created SSD cache to attach to Volume 1. It creates, mounts, gives 5401 error, then lists my volume as 0B/0B.

Not sure how the workaround is executed (I'm still a noob in ssh/linux). I go to the /dev/mapper, but the only thing listed is "control."

Any help would be great. Thank you. :-)
krhyatt
Posts: 1
Joined: Sun Aug 07, 2022 10:16 pm

Re: How to do a system reset of the SSD caching

Post by krhyatt »

Similar problem (only control listed in that folder).
While I can run can dmsetup -- when I do the remove part I get this msg:
--/dev/mapper $ dmsetup remove mdX_m
/dev/mapper/control: open failed: Permission denied
Failure to communicate with kernel device-mapper driver.
Incompatible libdevmapper 1.02.171 (2020-03-26) and kernel driver (unknown version).
Command failed.

Running it with sudo in front prompts this:
sudo: dmsetup: command not found

So still trying to figure it out.
User avatar
Nazar78
Posts: 2002
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: How to do a system reset of the SSD caching

Post by Nazar78 »

The path is /usr/builtin/sbin/dmsetup.

If you only see control in the /dev/mapper when you want to perform the remove command that means the cache wasn't created at all but ADM updated the settings thinking it was. So you'll have to revert back the settings to remove the cache in these two locations, /usr/etc/volume.conf and /volumeX/.@system/volume.conf where X is the volume number attempting to cache. Non-caching sample as per below, need not reboot after modifying:

Code: Select all

Cachemode = 0
CLevel = 0
CState = -1
CDirty = 0
CUUID = 
Cnumber = 0
CIndex = 
Cseqcut = No
CsizeMB = 0
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
ARTy
Posts: 2
Joined: Tue Feb 06, 2024 3:48 am

Re: How to do a system reset of the SSD caching

Post by ARTy »

Disabled the cache. Now I can't turn it on again. Error 5401
What should I do?
User avatar
Nazar78
Posts: 2002
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore
Contact:

Re: How to do a system reset of the SSD caching

Post by Nazar78 »

ARTy wrote: Tue Feb 06, 2024 3:51 am Disabled the cache. Now I can't turn it on again. Error 5401
What should I do?
Reboot, show us the screenshot if it's still there.
AS5304T - 16GB DDR4 - ADM-OS modded on 2GB RAM
Internal:
- 4x10TB Toshiba RAID10 Ext4-Journal=Off
External 5 Bay USB3:
- 4x2TB Seagate modded RAID0 Btrfs-Compression
- 480GB Intel SSD for modded dm-cache (initramfs auto update patch) and Apps

When posting, consider checking the box "Notify me when a reply is posted" to get faster response
Post Reply

Return to “ADM general”