[Solved] Crashed volume by power shortcut

Topics pertaining to volume setup, boot/shutdown, initialization, DSM update, HDD migration.
Forum rules
1) This is a user forum for Synology users to share experience/help out each other: if you need direct assistance from the Synology technical support team, please use the following form:
https://myds.synology.com/support/suppo ... p?lang=enu
2) To avoid putting users' DiskStation at risk, please don't paste links to any patches provided by our Support team as we will systematically remove them. Our Support team will provide the correct patch for your DiskStation model.
Kanashii
Beginner
Beginner
Posts: 20
Joined: Tue Apr 10, 2012 1:21 pm

[Solved] Crashed volume by power shortcut

Postby Kanashii » Wed Feb 18, 2015 9:20 pm

After power shortcut I found my Volumen crashed. I tried to remount the volume with no luck. All disk are ok (SMART OK and normal condition). My conf was SHR RAID 6 in a 1812+ device.

I tried my own to fix (or maybe mount as read only to save data) but I failed.

These are the steep I took:

Firts I searched for PV

Code: Select all

Magatzem> lvm vgscan
  Reading all physical volumes.  This may take a while...
  Found volume group "vg1000" using metadata type lvm2

Then try to enable de VG:

Code: Select all

Magatzem> lvm vgchange -a y vg1000
  1 logical volume(s) in volume group "vg1000" now active

After that, all seems ok, I tried to show de LV:

Code: Select all

Magatzem> vgdisplay
  --- Volume group ---
  VG Name               vg1000
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  4
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               16.35 TB
  PE Size               4.00 MB
  Total PE              4285446
  Alloc PE / Size       4285446 / 16.35 TB
  Free  PE / Size       0 / 0
  VG UUID               JCO8s2-2cKg-wfTT-hRn2-BeB2-XS5H-5T6gCn

Here I miss the LV name, it doesn't appear. I know that LV's name is lv 'cause is on /dev/mapper and tried:

Code: Select all

Magatzem> mount /dev/vg1000/lv /volume1
mount: mounting /dev/vg1000/lv on /volume1 failed: No such device

But seems, as I guessed, the LV is not working. I request for support to Synology but I want to learn how to recover this mess.

Can anyone help? Any help will be very welcome.
Last edited by Kanashii on Thu Feb 19, 2015 11:22 pm, edited 3 times in total.
User avatar
maxxfi
Compiler
Compiler
Posts: 6794
Joined: Sun Dec 27, 2009 12:13 pm
Location: Espoo, Finland

Re: Crashed volume by power shortcut

Postby maxxfi » Thu Feb 19, 2015 6:39 am

"vgdisplay -v" should list you the LV name(s) and also the PVs used by that volume group.

Also, check that the mountpoint exists, and/or make a temporary mountpoint (e.g. /tmp/lv) just to see if the mount operation succeed.

Because what's mounted is the LV, you can also do an fsck to it (before mount, of course), e.g. "fsck /dev/vg1000/lv"
DS-106j > DS-210j > DS-411
Kanashii
Beginner
Beginner
Posts: 20
Joined: Tue Apr 10, 2012 1:21 pm

Re: Crashed volume by power shortcut

Postby Kanashii » Thu Feb 19, 2015 5:26 pm

Code: Select all

Magatzem> vgdisplay -v
    Finding all volume groups
    Finding volume group "vg1000"
  --- Volume group ---
  VG Name               vg1000
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  4
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               16.35 TB
  PE Size               4.00 MB
  Total PE              4285446
  Alloc PE / Size       4285446 / 16.35 TB
  Free  PE / Size       0 / 0
  VG UUID               JCO8s2-2cKg-wfTT-hRn2-BeB2-XS5H-5T6gCn

  --- Logical volume ---
  LV Name                /dev/vg1000/lv
  VG Name                vg1000
  LV UUID                o8jHf1-0s1s-1XGG-DhCt-Pg8B-NMti-1FPdnX
  LV Write Access        read/write
  LV Status              available
  # open                 0
  LV Size                16.35 TB
  Current LE             4285446
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     4096
  Block device           253:0

  --- Physical volumes ---
  PV Name               /dev/md2
  PV UUID               A22snF-uM2l-gjzT-lciG-sonS-c4BR-1hMGSK
  PV Status             allocatable
  Total PE / Free PE    4285446 / 0

The mount point exists but I made another one on /tmp/lv. Same result.

Code: Select all

Magatzem> mkdir /tmp/lv
Magatzem> mount -o ro /dev/vg1000/lv /tmp/lv
mount: mounting /dev/vg1000/lv on /tmp/lv failed: No such device

Then I looked to the device:

Code: Select all

Magatzem> cd /dev/vg1000/
Magatzem> ls
lv
Magatzem> ls -la
drwxr-xr-x    2 root     root            60 Feb 18 07:00 .
drwxr-xr-x   12 root     root          9000 Feb 18 07:00 ..
lrwxrwxrwx    1 root     root            21 Feb 18 07:00 lv -> /dev/mapper/vg1000-lv

Followed the symlink and...

Code: Select all

Magatzem> ls -la /dev/mapper/vg1000-lv
brw-------    1 root     root      253,   0 Feb 18 07:00 /dev/mapper/vg1000-lv

0 bytes? Probably I must check with fschk as you suggested...
First, look for fstab to discover the fs

Code: Select all

Magatzem> cat /etc/fstab
none /proc proc defaults 0 0
/dev/root / ext4 defaults 1 1
/dev/vg1000/lv /volume1 ext4 usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,synoacl 0 0

Knowing is ext4 I launched a fsck.ext4

Code: Select all

Magatzem> fs
fsck.ext3     fsck.ext4     fsck.hfsplus  fstrim
Magatzem> fsck.ext4 /dev/vg1000/lv

Now I'm waiting to finish the integrity check but some (hopeless) messages appeared soon:

Code: Select all

Journal transaction 3392900 was corrupt, replay was aborted.

Now waiting...
Last edited by Kanashii on Fri Feb 20, 2015 1:18 pm, edited 1 time in total.
Kanashii
Beginner
Beginner
Posts: 20
Joined: Tue Apr 10, 2012 1:21 pm

Re: Crashed volume by power shortcut

Postby Kanashii » Thu Feb 19, 2015 7:57 pm

Code: Select all

Magatzem> fsck.ext4 /dev/vg1000/lv
e2fsck 1.42.6 (21-Sep-2012)
1.42.6-3776: recovering journal
Journal transaction 3392900 was corrupt, replay was aborted.
1.42.6-3776 contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Free blocks count wrong (98931279, counted=98933762).
Fix<y>? yes
Free inodes count wrong (547596913, counted=547597068).
Fix<y>? yes

1.42.6-3776: ***** FILE SYSTEM WAS MODIFIED *****
1.42.6-3776: 943348/548540416 files (5.1% non-contiguous), 4289362942/4388296704                                                                                                                                blocks

Mounting in read only mode to avoid more troubles...

Code: Select all

Magatzem> mount -o ro /dev/vg1000/lv /tmp/lv

Listing the volume...

Code: Select all

Magatzem> cd /tmp/lv
Magatzem> ls
@S2S                 @tmp                 Sergio
@appstore            @tmpbtdl             Sèries
@autoupdate          @transmissiond.core  Xbox
@database            Backup               aquota.group
@download            DVBLink              aquota.user
@php.core            Descarregues         lost+found
@quarantine          Pelis                video
@spool               Plex

Yes, yes and YES!
Now, I'm gonna shutdown the Syno and leave the NAS to mount the LV alone...
Kanashii
Beginner
Beginner
Posts: 20
Joined: Tue Apr 10, 2012 1:21 pm

Re: Crashed volume by power shortcut

Postby Kanashii » Thu Feb 19, 2015 8:08 pm

After reboot..
Image
Yes, all seems normal. Probably I lost some data that was written in the power shortcut moment but all the other files seem fine.
Last edited by Kanashii on Thu Feb 19, 2015 8:12 pm, edited 1 time in total.
Kanashii
Beginner
Beginner
Posts: 20
Joined: Tue Apr 10, 2012 1:21 pm

Re: Crashed volume by power shortcut

Postby Kanashii » Thu Feb 19, 2015 8:11 pm

maxxfi wrote:"vgdisplay -v" should list you the LV name(s) and also the PVs used by that volume group.

Also, check that the mountpoint exists, and/or make a temporary mountpoint (e.g. /tmp/lv) just to see if the mount operation succeed.

Because what's mounted is the LV, you can also do an fsck to it (before mount, of course), e.g. "fsck /dev/vg1000/lv"

I'm really happy right now. Thank you.
User avatar
maxxfi
Compiler
Compiler
Posts: 6794
Joined: Sun Dec 27, 2009 12:13 pm
Location: Espoo, Finland

Re: Crashed volume by power shortcut

Postby maxxfi » Thu Feb 19, 2015 9:43 pm

Kanashii wrote:Yes, all seems normal. Probably I lost some data that was written in the power shortcut moment but all the other files seem fine.

Excellent. Glad you got (most of) your data back.
DS-106j > DS-210j > DS-411

Return to “Installation, Configuration, Migration, Expansion”

Who is online

Users browsing this forum: No registered users and 8 guests