Filesystem check with DSM5

Questions and mods regarding system management may go here
Forum rules
Please note the disclaimer before modifying your Synology Product.
Axel Foley
Rookie
Rookie
Posts: 31
Joined: Fri Apr 27, 2012 9:25 pm
Location: Rome, Italy

Filesystem check with DSM5

Postby Axel Foley » Fri Mar 21, 2014 12:12 pm

Hi, I have a DS1812+ with eight ST3000DM001-9YN166 configured in a single SHR volume. I'm on DSM 5.0-4458.

I had a big issue with 3-4 drives in these last 2 months (will never use Seagate drives again), the last issue was that one replaced drive was rebuilding and towards the end of the rebuild a second drive failed and the volume was declared crashed.

In some way I managed to solve the problem (by myself, Synology support is unresponsive even with severe issues like these, they say they're overwhelmed by DSM5 upgrade issues).

In any case, I managed to solve the crash problem but now that the volume has rebuilt and the status is Normal, I'd like to perform a good filesystem check.

I thought it was an easy task, I also had an email from support who suggested these steps:

Code: Select all

syno_poweroff_task [Press Enter]
vgchange -ay [Press Enter] << This will enable the volume
e2fsck -nvf -C 0 /dev/vg1000/lv [press Enter] << This is optional. It will list out the errors, and will not change anything.
e2fsck -pvf -C 0 /dev/vg1000/lv [Press Enter] << This will try to fix the error.


Unfortunately, support didn't tell me that with the first command SSH is stopped and you get kicked out immediately, so I enabled telnet and retried.

This time the first command went ok, and everything was stopped, but the second command does not work, it does not to anything. I even tried with "vgdisplay" command in order to list the volume groups but it returned nothing, so I guess that with DSM5 things have changed (and support does not know).

So I went the manual way and stopped everything I could in order to be able to unmount volume1, but even if "lsof" tells me there's nothing accessing volume1, the umount /volume1 tells me that the volume is busy.

In the meantime, I'm checking in read-only (e2fsck -nvf -C 0 /dev/vg1000/lv) to at least know IF there are issues.

Can anybody suggest me a working procedure to check/repair the volume with DSM5?

Thanks a lot,

Alex
Ate_Bit
Seasoned
Seasoned
Posts: 578
Joined: Mon Feb 11, 2013 1:55 am

Re: Filesystem check with DSM5

Postby Ate_Bit » Fri Mar 21, 2014 12:56 pm

NAS: DS413 running DSM 6.0
Configuration: SHR, with 1 disk data protection
HDD: 3x4TB
Axel Foley
Rookie
Rookie
Posts: 31
Joined: Fri Apr 27, 2012 9:25 pm
Location: Rome, Italy

Re: Filesystem check with DSM5

Postby Axel Foley » Fri Mar 21, 2014 5:26 pm

Ate_Bit wrote:You should check out this thread.

http://forum.synology.com/enu/viewtopic.php?f=19&t=65340


Thanks, but that's for scrubbing, I knew that (on this blog article: http://boomkicker.wordpress.com/2013/02 ... aid-disks/).

I needed e2fsck on the volume. Anyway I solved it. ;)

Was damn simple...instead of syno_poweroff_task I simply did umount -l /volume1.

With the "lazy" option the volume unmounts and I could run e2fsck. Now it's going...hope not too much data is screwed up.

Anyway...Synology is really an example of bad bad support, if I didn't have sysadmin skills I would have lost all data without them doing anything.

Lesson learned: no more Synology, no more Seagate. ;)
noseboy
Apprentice
Apprentice
Posts: 82
Joined: Sun Jul 01, 2012 7:26 pm

Re: Filesystem check with DSM5

Postby noseboy » Sun Mar 30, 2014 1:03 pm

I thought lazy umount was quite a risky operation?

As you say, seems like synology support aren't aware of the change in behaviour. Does anyone know of any safe way of doing this under DSM 5?
numanmania
Beginner
Beginner
Posts: 22
Joined: Sat Aug 03, 2013 9:33 pm

Re: Filesystem check with DSM5

Postby numanmania » Sat Apr 05, 2014 10:38 pm

My terminal says;

DiskStation> vgchange -ay
DiskStation> e2fsck -pvf -C 0 /dev/vg1000/lv
e2fsck: No such file or directory while trying to open /dev/vg1000/lv
Possibly non-existent device?
DiskStation>

Why can i do??????

Thx
noseboy
Apprentice
Apprentice
Posts: 82
Joined: Sun Jul 01, 2012 7:26 pm

Re: Filesystem check with DSM5

Postby noseboy » Sat Apr 05, 2014 11:09 pm

I discussed with support and they say that syno_poweroff_task unmounts all drives and makes the volume groups inaccessible. This is by design.

I've asked if it might be possible to add an option to do a file system check into the GUI. If you think this would be worthwhile then requesting it as well couldn't hurt.

In the meantime, the only way to do a fsck safely seems to be quite long-winded, as discussed in the thread viewtopic.php?f=39&t=66550
Last edited by noseboy on Sat Apr 05, 2014 11:27 pm, edited 1 time in total.
noseboy
Apprentice
Apprentice
Posts: 82
Joined: Sun Jul 01, 2012 7:26 pm

Re: Filesystem check with DSM5

Postby noseboy » Sat Apr 05, 2014 11:10 pm

If you do vgdisplay (before you try syno_poweroff_task, obviously) then you can check the name of your volume group/s
numanmania
Beginner
Beginner
Posts: 22
Joined: Sat Aug 03, 2013 9:33 pm

Re: Filesystem check with DSM5

Postby numanmania » Sat Apr 05, 2014 11:27 pm

noseboy wrote:If you do vgdisplay (before you try syno_poweroff_task, obviously) then you can check the name of your volume group/s


It´s correct, vg1000...

DiskStation> vgdisplay
--- Volume group ---
VG Name vg1000
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 1
Max PV 0
Cur PV 2
Act PV 2
VG Size 19.98 TB
PE Size 4.00 MB
Total PE 5238149
Alloc PE / Size 5238149 / 19.98 TB
Free PE / Size 0 / 0
noseboy
Apprentice
Apprentice
Posts: 82
Joined: Sun Jul 01, 2012 7:26 pm

Re: Filesystem check with DSM5

Postby noseboy » Sat Apr 05, 2014 11:32 pm

Are you doing the syno_poweroff_task as mentioned in the original post?

If so then, as I said, support say that this makes volume groups inaccessible and that this is intentional.
fmb
Trainee
Trainee
Posts: 11
Joined: Mon May 14, 2012 7:31 pm

Re: Filesystem check with DSM5

Postby fmb » Mon Apr 28, 2014 8:53 pm

Axel Foley wrote:...
With the "lazy" option the volume unmounts and I could run e2fsck. Now it's going...hope not too much data is screwed up.
...

I am having issues fixing volume_1, which has crashed according to DSM 5. I am using the latest build DSM 5.0-4482 at the moment, but the volume crashed with the previous build. There are no SMART errors with the HDD, so I hope I can fix the problem with the terminal.

But no luck so far, I cannot get e2fsck to run (only in read-only mode). Guess I need to wait for the e2fsck to finish in read-only mode and see what it finds, but I already get a lot "Unattached inode".

I don't understand why I get the follwing message when trying to run "e2fsck -v -f -y /dev/vg1/volume_1"

Code: Select all

/dev/vg1/volume_1 is in use.
e2fsck: Cannot continue, aborting.


I've ran "umount -l /volume1" with succes, it doesn't show anymore after a "mount" of "df" command, but something is keeping /dev/vg1/volume_1 busy. How can I find out hat?
Apsalar
I'm New!
I'm New!
Posts: 2
Joined: Mon Jan 19, 2009 5:50 pm

Re: Filesystem check with DSM5

Postby Apsalar » Wed Sep 10, 2014 8:52 pm

Hello,

It was so simple... You have to run syno_poweroff_task in debug mode :

Code: Select all

> syno_poweroff_task -h
DS shutdown progress.

usage: syno_poweroff_task [OPTIONS]

  -h            display this help
  -d            debug mode

Then the rest as said above :

Code: Select all

> syno_poweroff_task -d
> vgchange -ay
> fsck.ext4 -pvf -C 0 /dev/vg1000/lv

If you get the message "UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY", try :

Code: Select all

> fsck.ext4 -yvf -C 0 /dev/vg1000/lv

I'm running version 5.0-4493 Update 5

Good luck,
Aps.
sup2069
I'm New!
I'm New!
Posts: 9
Joined: Sat Oct 11, 2014 10:29 pm

Re: Filesystem check with DSM5

Postby sup2069 » Sat Oct 11, 2014 10:37 pm

Apsalar wrote:Hello,

It was so simple... You have to run syno_poweroff_task in debug mode :

Code: Select all

> syno_poweroff_task -h
DS shutdown progress.

usage: syno_poweroff_task [OPTIONS]

  -h            display this help
  -d            debug mode

Then the rest as said above :

Code: Select all

> syno_poweroff_task -d
> vgchange -ay
> fsck.ext4 -pvf -C 0 /dev/vg1000/lv

If you get the message "UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY", try :

Code: Select all

> fsck.ext4 -yvf -C 0 /dev/vg1000/lv

I'm running version 5.0-4493 Update 5

Good luck,
Aps.



DUDE THANKYOU!!

I've spent 5 hours trying to get this work!


For the options on fsck is "-C" is for fd flaged disks? Not sure what the 0 is.
dafart
I'm New!
I'm New!
Posts: 3
Joined: Sun Mar 02, 2014 8:54 pm

Re: Filesystem check with DSM5

Postby dafart » Mon Nov 24, 2014 11:15 pm

Thanks for the usefull tips.

I seem to be unable to run e2fsck / fsck.ext4 because just like fmb 2 posts above I'm also getting the Warning! "/dev/vg1000/lv is in use" error and I'm only able to read and not repai the filesystem.
the volume is unmounted and I have no clue how to dod a filesystem check with the -p option.

Anyone any ideas how to figure this out?

It's also rather strange / disturbing that synology, unlike other big NAS producing companies, doesn't have the option to manuall do a datascrubbing action and / or a filesystem check..

Thanks in advance, DaF
goubda
I'm New!
I'm New!
Posts: 6
Joined: Thu Mar 28, 2013 12:17 pm

Re: Filesystem check with DSM5

Postby goubda » Sun Nov 30, 2014 6:07 pm

Hi DaF

Did you ever get a resolution to this. I am also having the same issue with the Volume still in use despite it being dismounted a number of ways.

Dave
_Nico_
I'm New!
I'm New!
Posts: 1
Joined: Thu Aug 16, 2012 11:14 am

Re: Filesystem check with DSM5

Postby _Nico_ » Sun Nov 30, 2014 6:14 pm

Hi,

I had the same issue after an upgrade to 5.1. It's not a solution but I've contacted the synology support : they remotely used some magical commands which made the e2fsck command work...

Unfortunately they refused to send the commands they used...

Regards

Return to “System Managment Mods”

Who is online

Users browsing this forum: No registered users and 5 guests