General NAS-Central Forums

Welcome to the NAS community
It is currently Wed Aug 23, 2017 9:26 pm

All times are UTC




Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Thu Feb 09, 2017 6:40 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6024
The only way I am aware of is
Code:
e2fsck <device>
Maybe with the -p or -y option to prevent to have to type 'y' numerous times.

Luca127 wrote:
I don't want to risk anything.
You still have a bitwise backup, don't you?

Anyway, I'm curious if e2fsck from Entware-ng succeeds in detecting the right size of the raid array. I think it's not possible to repair if it doesn't. The superblocks are located on certain percentages of the volume size.
If it doesn't show the right size, it should be possible to create a loop device, or to edit the partition table to be able to skip the raid array.


Top
 Profile  
 
PostPosted: Thu Feb 16, 2017 5:46 pm 
Offline

Joined: Thu Jan 26, 2017 3:57 pm
Posts: 9
Yes sure. I executed the repair command and this was the output:

Code:
 e2fsck.new /dev/md0
e2fsck 1.41.14 (22-Dec-2010)
The filesystem size (according to the superblock) is 488249232 blocks
The physical size of the device is 488249198 blocks
Either the superblock or the partition table is likely to be corrupt!
Abort<y>? no

/dev/md0 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
/dev/md0: 496661/122068992 files (9.5% non-contiguous), 423805863/488249232 blocks



And for sda2

Code:
 e2fsck.new /dev/sda2
e2fsck 1.41.14 (22-Dec-2010)
e2fsck.new: Device or resource busy while trying to open /dev/sda2
Filesystem mounted or opened exclusively by another program?


I unmounted sda2, but the message continous to appear.


Top
 Profile  
 
PostPosted: Thu Feb 16, 2017 7:41 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6024
OK, let's try a loop device, to see if e2fsck then can see the right physical size.

According to your mdadm dumps, the data on the raid array starts at 2048 sectors. A sector is 512 bytes, so it starts at 1048576 bytes. Using a loop device we can create a virtual disk, which starts at a relative posiiton on /dev/sda2.

First find out which loop devices are already in use:
Code:
losetup -a
When I remember well, the ZyXEL firmware has 1 loopdevice in use, so loop0 is unavailable. Assuming you can use loop1:
Code:
# stop the array
mdadm --stop /dev/md0
losetup -o 1048576 /dev/loop1 /dev/sda2
e2fsck.new /dev/loop1


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: Bing [Bot], dexhain, discountbreitli, Yahoo [Bot] and 52 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group