QNAP Ghost snapshot thin pool repairing

Check metadata:

Please use thin_check to check the metadata of the pool to confirm what wrongs in the metadata.

pdata_tools_8192( or 4096) thin_check /dev/mapper/vg1-tp1_tmeta –non

# Assume the ghost snapshot happen in vg1/tp1. Please according to happened ghost snapshot pool to adjust vg${#}

-tp${#}_tmetadata

# if the firmware version of QTS is less than 4.3.5, please remove “–non” option

Generally, the metadata has the below wrong:

If the metadata has no such as above wrong, please contact sustain team to analyze.

Backup metadata before repairing the metadata:

Caution!!! This is very important task!!!

Please must make a backup of the metadata to avoid the repairing task fail.

If the repairing task fail, the storage may crash. We can use the backup metadata to restore the storage.

Please use the below guide to make the backup of metadata:

https://drive.google.com/file/d/14HSVV6DWSnqc7FXTSUukzJWB812Q8Tkv/view?usp=sharing

Repairing flow and limitations:

Limitations:

If the storage configuration and QTS firmware versions can not meet the following condition, please contact sustain team to do repairing task.

1. The QTS firmware version is great or equal than 4.3.5.

2. The chunk size of the metadata need to be 8192. Please use the below command to confirm.

echo $((16#`hexdump -s 340 -n 2 /dev/mapper/vg1-tp1_tmeta | awk ‘NR==1{print $2}’`*512))

Repairing steps:

Step 1: Download “pdata_tools” which support thin_rebuild option from the below link and transfer new “pdata_tools” to the NAS.

# Download

wget http://download.qnap.com/Storage/tsd/utility/pdata_tools_X86_64.zip # X86_64 version wget http://download.qnap.com/Storage/tsd/utility/pdata_tools_ARM_64.zip # ARM_64 version

# Unzip

unzip pdata_tools_X86_64.zip unzip pdata_tools_ARM_64.zip

# Please rename to pdata_tools

mv pdata_tools_X86_64 pdata_tools mv pdata_tools_ARM_64 pdata_tools

Step 2: Change “pdata_tools” to executable file.

chmod +x pdata_tools

Step 3: Run pdata_tools with thin_rebuild option.

./pdata_tools thin_rebuild /dev/mapper/vg1-tp1_tmeta # This process will execute about couple minutes or hours. Please wait for the process done patiently.

Step 4: Use thin_check to check metadata again to confirm the “reference counts” wrongs are all fixed. If the result of thin_check still has wrongs, please contact sustain team to do the repairing task.

./pdata_tools thin_check –clear-needs-check-flag /dev/mapper/vg1-tp1_tmeta

Step 5: Restore the storage:

lvchange -ay vg1 # bring up the volume group storage_util –sys_startup_p2 # mount all of volumes

/sbin/daemon_mgr lvmetad start “/sbin/lvmetad” # enable lvm cache

/etc/init.d/services.sh start # start up all of services

 

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...