Recovering a volume

Moderator: Lillian.W@AST

sandro_rocha
Posts: 76
youtube meble na wymiar Warszawa
Joined: Wed Feb 05, 2020 10:49 am

Recovering a volume

Post by sandro_rocha »

Good Morning. I received a notification that there was a problem with volume1. The NAS continued to function normally and I only realized that there was a problem when I tried to execute a command on the terminal and received the message that the system was read-only. I restarted the NAS and now volume 1 is inactive. I don't know if the data is still there, I think so because before restarting I was able to access the files over the network and run some applications (Emby, Sonarr, Deluge). How do I fix the file system and reactivate the disk?
User avatar
orion
Posts: 3482
Joined: Wed May 29, 2013 11:09 am

Re: Recovering a volume

Post by orion »

You'll need to find out what's the error. It sounds like volume being full. Did you check logs (ADM web -> System Information -> Log)?
sandro_rocha
Posts: 76
Joined: Wed Feb 05, 2020 10:49 am

Re: Recovering a volume

Post by sandro_rocha »

orion wrote:You'll need to find out what's the error. It sounds like volume being full. Did you check logs (ADM web -> System Information -> Log)?
The disk was not full. It is a 4TB Seagate ST4000DM005 with about 2TB free. According to the log, on 07/17/2020, "There is a data tranfer error on sector 4847872 of the slot disk 1", at 1:23:09 pm. On 08/01/2020, "There is a data transfer error on sector 5377080 of the slot disk 1". On 07/17 I restarted the system at 1:38:20 pm and it worked normally until I received the second error message. As I said, I ignored this second error message and used the system for another three days, until 08/04. Then I saw that the file system was read-only. I restarted and disk 1 appears inaccessible. I ran the command df -H and it shows me only volume2 (disk 2). Need help.

I can remove the NAS disk and put it on another Linux PC to try to recover. As I said, I don't think the files have been lost. I was using the system normally after the first error message, and even after the second error message I was using the applications installed on Volume1 normally.

ps: My NAS is an AS1002T and was using two Seagate drives, ST4000DM005 (disk 1, volume 1) and ST4000DM004 (disk 2, volume 2). Both discs were only about 50% in use. ADM is the latest stable version. Of software, I only use Emby, Sonarr, Deluge, Download Center, Shell in a Box, Youtube-DL, Podfox and JDownloader.
Attachments
AS1002T_Disk_1.jpg
AS1002T_Disk_1.jpg (45.94 KiB) Viewed 6153 times
User avatar
orion
Posts: 3482
Joined: Wed May 29, 2013 11:09 am

Re: Recovering a volume

Post by orion »

OK, you found the problem (bad sectors). You could still access volume-1 before restarted because those bad sectors are not essential (or essential data is still available in DDR) to Linux file system. Anyway, volume-1 failure after restarted proves something important to Linux file system is damaged. That's reality. You'll need another new disk to create a new volume-1. After that, you'll need to re-install all of applications (Apps are allocated onto volume-1). Before the operation, you'd better to recover your data first.

To recover your old volume-1 data, you can use "mdadm" command to create md device and to mount the old bad disk if you know how to use ssh. After mounted, you can copy data to volume-2 (of course, bad sectors are not readable). The other way is to use another Ubuntu PC to recover your data. https://support.asustor.com/index.php?/ ... using-a-pc
sandro_rocha
Posts: 76
Joined: Wed Feb 05, 2020 10:49 am

Re: Recovering a volume

Post by sandro_rocha »

orion wrote:OK, you found the problem (bad sectors). You could still access volume-1 before restarted because those bad sectors are not essential (or essential data is still available in DDR) to Linux file system. Anyway, volume-1 failure after restarted proves something important to Linux file system is damaged. That's reality. You'll need another new disk to create a new volume-1. After that, you'll need to re-install all of applications (Apps are allocated onto volume-1). Before the operation, you'd better to recover your data first.

To recover your old volume-1 data, you can use "mdadm" command to create md device and to mount the old bad disk if you know how to use ssh. After mounted, you can copy data to volume-2 (of course, bad sectors are not readable). The other way is to use another Ubuntu PC to recover your data. https://support.asustor.com/index.php?/ ... using-a-pc
I already bought a new HDD. I'm waiting to arrive. Is there any way to use "mdadm" to mount disk 1 on the NAS itself to copy data to disk 2?

When using the command "df -H" I am presented with this result:
tmpfs 262M 8.2k 262M 1% /tmp
/dev/md0 2.1G 340M 1.7G 18% /volume0
/dev/loop0 974k 7.2k 947k 1% /share
/dev/md2 4.0T 2.1T 2.0T 52% /volume2

In ADM, volume 2 is identified as disk 2 (ST4000DM004) and if I give the command "fdisk -l", it shows me the devices /dev/sda, /dev/sdb, /dev/md0, /dev/md126 and /dev/md2. However, if I use the "smartctl /dev/sda" command, it shows me the information on disk 2 (ST4000DM004). If I use "smartctl /dev/sdb", it shows me disk 1 (ST4000DM005), which is defective.

So, what information should I take into consideration? ADM tells me that disk 2 is ST4000DM004, just as fdisk and df show me that disk 2 is the md2 device and probably /dev/sdb. But smartctl tells me that /dev/sdb is disk 1, not disk 2. What information is correct?

ps: the first disk I installed on the NAS was the DM005, as volume 1, which was defective. After a few months I added the DM004, configured as volume 2.
User avatar
orion
Posts: 3482
Joined: Wed May 29, 2013 11:09 am

Re: Recovering a volume

Post by orion »

Volume-2 is /dev/md2 apparently. You can execute command "cat /proc/mdstat" that will show you all of md2 devices. So you can find out which disk is volume-2. The other disk should be the old volume-1.

The command below can create md8. After that, you can mount /dev/md8 which is your old volume-1.

Code: Select all

mdadm --assemble /dev/md8 </dev/sd?4>
sandro_rocha
Posts: 76
Joined: Wed Feb 05, 2020 10:49 am

Re: Recovering a volume

Post by sandro_rocha »

orion wrote:Volume-2 is /dev/md2 apparently. You can execute command "cat /proc/mdstat" that will show you all of md2 devices. So you can find out which disk is volume-2. The other disk should be the old volume-1.

The command below can create md8. After that, you can mount /dev/md8 which is your old volume-1.

Code: Select all

mdadm --assemble /dev/md8 </dev/sd?4>
cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4]
md2 : active raid1 sda4[0]
3902430208 blocks super 1.2 [1/1]

md126 : active raid1 sdb3[0] sda3[2]
2095104 blocks super 1.2 [2/2] [UU]

md0 : active raid1 sdb2[0]
2095104 blocks super 1.2 [2/1] [U_]

unused devices: <none>

sudo mdadm --detail /dev/md2
/dev/md2:
Version : 1.2
Creation Time : Mon Feb 3 20:44:06 2020
Raid Level : raid1
Array Size : 3902430208 (3721.65 GiB 3996.09 GB)
Used Dev Size : 3902430208 (3721.65 GiB 3996.09 GB)
Raid Devices : 1
Total Devices : 1
Persistence : Superblock is persistent

Update Time : Thu Aug 6 12:28:23 2020
State : clean
Active Devices : 1
Working Devices : 1
Failed Devices : 0
Spare Devices : 0

Name : ASUSTOR:2 (local to host ASUSTOR)
UUID : 05dcef1b:de04740b:ccc2e438:17539bc3
Events : 58

Number Major Minor RaidDevice State
0 8 4 0 active sync /dev/sda4

And now? Which command do I use to mount the disk that is inactive?
sandro_rocha
Posts: 76
Joined: Wed Feb 05, 2020 10:49 am

Re: Recovering a volume

Post by sandro_rocha »

sandro_rocha wrote:
orion wrote:Volume-2 is /dev/md2 apparently. You can execute command "cat /proc/mdstat" that will show you all of md2 devices. So you can find out which disk is volume-2. The other disk should be the old volume-1.

The command below can create md8. After that, you can mount /dev/md8 which is your old volume-1.

Code: Select all

mdadm --assemble /dev/md8 </dev/sd?4>
cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4]
md2 : active raid1 sda4[0]
3902430208 blocks super 1.2 [1/1]

md126 : active raid1 sdb3[0] sda3[2]
2095104 blocks super 1.2 [2/2] [UU]

md0 : active raid1 sdb2[0]
2095104 blocks super 1.2 [2/1] [U_]

unused devices: <none>

sudo mdadm --detail /dev/md2
/dev/md2:
Version : 1.2
Creation Time : Mon Feb 3 20:44:06 2020
Raid Level : raid1
Array Size : 3902430208 (3721.65 GiB 3996.09 GB)
Used Dev Size : 3902430208 (3721.65 GiB 3996.09 GB)
Raid Devices : 1
Total Devices : 1
Persistence : Superblock is persistent

Update Time : Thu Aug 6 12:28:23 2020
State : clean
Active Devices : 1
Working Devices : 1
Failed Devices : 0
Spare Devices : 0

Name : ASUSTOR:2 (local to host ASUSTOR)
UUID : 05dcef1b:de04740b:ccc2e438:17539bc3
Events : 58

Number Major Minor RaidDevice State
0 8 4 0 active sync /dev/sda4

And now? Which command do I use to mount the disk that is inactive?

I created md8 but was unable to mount the file system. I restarted the system, got the message "System is restarting" and "Successfully synced from NTP server" but nothing after that. I can no longer access the NAS. I'm out of town, I was accessing remotely. What do I do?
User avatar
orion
Posts: 3482
Joined: Wed May 29, 2013 11:09 am

Re: Recovering a volume

Post by orion »

Your old volume-1 is located onto /dev/sda4. So you created md8 using /dev/sda4. What's the error when you mounted? If it's not a command syntax error, it might mean that the important data in your old volume-1 is damaged.

I believe it's another problem such that you could not access NAS. Based on the operations above, I guess you missed plenty of details. It's not suitable for you to do manual operations. I think you'd better to ask for asustor support directly. https://support.asustor.com/
sandro_rocha
Posts: 76
Joined: Wed Feb 05, 2020 10:49 am

Re: Recovering a volume

Post by sandro_rocha »

orion wrote:Your old volume-1 is located onto /dev/sda4. So you created md8 using /dev/sda4. What's the error when you mounted? If it's not a command syntax error, it might mean that the important data in your old volume-1 is damaged.

I believe it's another problem such that you could not access NAS. Based on the operations above, I guess you missed plenty of details. It's not suitable for you to do manual operations. I think you'd better to ask for asustor support directly. https://support.asustor.com/
After more than an hour the NAS started and volume 1 was accessed again. It seems that it took a while because the system was running fsck or e2fsck. But volume 2 is apparently / dev / sda4. A year ago I had a problem deleting files from volume 1; did not free up space after deleting files. So I had to redo volume 1. I think the system associated the new volume 1 with /dev/sdb4.

cat /proc/mdstat

md2: active raid1 sda4 [0] 3902430208 blocks super 1.2 [1/1]

md1: active raid1 sdb4 [0] 3902430208 blocks super 1.2 [1/1]

md126: active raid1 sdb3 [0] sda3 [2] 2095104 blocks super 1.2 [2/2] [UU]

md0: active raid1 sdb2 [0] 2095104 super blocks 1.2 [2/1] [U_]

unused devices: <none>

I will take advantage that the volume is accessible and copy the files to volume 2. Thank you very much for your help.

I just need one more tip: after creating md8, which command do I give to be able to access the volume? Knowing this would help me a lot in the future, in case something like this happens again.
Post Reply

Return to “[Official] For AS10XX Series”