Warning; Please Dont Use This Guide If You Dont Have An Idea.. This May Cause You Data Loose..
I – What is Unmounted Status and How Can We Fix This
II – Error Allocating Block Bitmap (4) : Memory Allocation Failed. e2fsck Aborted; How To Increase Swap Memory To Start e2fsck Command
III – Problem; Device Seems Unmounted, Storage_boot_init 2 Command Doesnt Work, Ands System Cannot Be Mounted;
IV – How To Fix and Mount Volume?
.
I – What is Unmounted Status and How Cna We Fix This
1 – Volume has Unmounted status, What to do:
-
Check if any filesystem superblock is found:
-
# dumpe2fs_64 -h /dev/md0
-
-
If superblock is found, try to check filesystem for errors
-
# e2fsck_64 -fp /dev/md0
-
May need to increase swap memory first
-
-
If no superblock found:
-
It could be the volume removed accidentally by user
- Or, the RAID re-created incorrectly with mdadm -CfR –assume-clean command
-
.
2 – How to increase swap space
Example: NAS has 8 bays and HDD /dev/sda ~ /dev/sdh
# swapoff /dev/md8
# mdadm -S /dev/md8
# for i in {a..h}; do mkswap /dev/sd${i}2; swapon /dev/sd${i}2; done
.
3 – What to do if no superblock:
-
You can also try to use the backup superblock
[~] # dumpe2fs /dev/md0 | grep superblock -i
dumpe2fs 1.41.4 (27-Jan-2009)
Primary superblock at 0, Group descriptors at 1-44
Backup superblock at 32768, Group descriptors at 32769-32812
Backup superblock at 98304, Group descriptors at 98305-98348
Backup superblock at 163840, Group descriptors at 163841-163884
….
-
Check if backup superblock is existing:
[~] # dumpe2fs -h -o superblock=32768 /dev/md0
-
Repair filesystem using backup superblock
[~] # e2fsck -f -b 32768 /dev/md0
.
II – Error Allocating Block Bitmap (4) : Memory Allocation Failed. e2fsck Aborted; How To Increase Swap Memory To Start e2fsck Command
You can unmount volume manually, and start check process;
For Old Firmware (3.8.0 – 4.0.5)
/etc/init
.d
/services
.sh stop
/etc/init
.d
/opentftp
.sh stop
/etc/init
.d
/Qthttpd
.sh stop
umount
/dev/md0
e2fsck -f -
v
-C 0
/dev/md0
mount
/dev/md0
reboot
http://dev.mensfeld.pl/2013/08/qnap-nas-file-system-not-clean-examination-failed-cannot-unmount-disk/
.
For New Firmware (4.1.0 and later) (64 Bit)
/etc/init.d/services.sh stop
/etc/init.d/opentftp.sh stop
/etc/init.d/Qthttpd.sh stop
umount /dev/mapper/cachedev1
e2fsck_64 -f -v -C 0 /dev/mapper/cachedev1
mount -t ext4 /dev/mapper/cachedev1 /share/CACHEDEV1_DATA
reboot
https://forum.qnap.com/viewtopic.php?t=123461
.
For NewFirmware (4.1.0 and later) (32 Bit)
/etc/init.d/services.sh stop
/etc/init.d/opentftp.sh stop
/etc/init.d/Qthttpd.sh stop
/etc/init.d/rsnap.sh stop
umount /dev/mapper/cachedev1
e2fsck -f -v -C 0 /dev/mapper/cachedev1
But If you Got This Error;
After this command; e2fsck -fy /dev/md0
.
Solution;
.
Step by Step Command Lines;
1)# swapoff /dev/md6
-> (mdX, X – bays’ amount. If you have 6 HDD, use md6, ıf you have 8 HDD, use md8)
2)# mdadm -S /dev/md6
-> (to stop mdadm)
3) # mkswap /dev/sda2
-> (and for sdb2/sdc2/sdd2 too)
But before that, please check you mkswap right part. For this, type;
md_checker
.
So we can start from sda2;
And type these;
mkswap /dev/sdb2
mkswap /dev/sdc2
mkswap /dev/sdd2
mkswap /dev/sde2
mkswap /dev/sdf2
.
Results;
.
4) # swapon /dev/sda2
-> (and for sdb2/sdc2/sdd2 too)
So type;
swapon /dev/sdb2
swapon /dev/sdb2
swapon /dev/sdc2
swapon /dev/sde2
swapon /dev/sdf2
5) # free (to check available space)
6) # Type e2fsck command again..
.
III – Problem; Device Seems Unmounted, Storage_boot_init 2 Command Doesnt Work, Ands System Cannot Be Mounted;
1 – RAID seems ok, but System Seems Unmounted, and here is md_checker output;
.
2 – storage_boot_init 2 output -> system cannot be mounted!
.
3 - mount -t ext4 /dev/md0 /share/MD0_DATA output -> “wrong fs type, bad option, bad superblock n /dev/md0″ error
.
4 - dmesg output -> ”group descriptors corrupted” error
[ 2135.183884] RAID conf printout:
[ 2135.183885] — level:6 rd:8 wd:8
[ 2135.183887] disk 0, o:1, dev:sda3
[ 2135.183889] disk 1, o:1, dev:sdb3
[ 2135.183891] disk 2, o:1, dev:sdc3
[ 2135.183893] disk 3, o:1, dev:sdd3
[ 2135.183895] disk 4, o:1, dev:sde3
[ 2135.183897] disk 5, o:1, dev:sdf3
[ 2135.183898] disk 6, o:1, dev:sdg3
[ 2135.183900] disk 7, o:1, dev:sdh3
[ 2135.183959] md0: detected capacity change from 0 to 11992753373184
[ 2136.413722] md0: unknown partition table
[ 2153.646719] EXT4-fs (md0): Mount option “noacl” will be removed by 3.5
[ 2153.646721] Contact linux-ext4@vger.kernel.org if you think we should keep it .
[ 2153.646723]
[ 2153.793580] EXT4-fs (md0): ext4_check_descriptors: Checksum for group 256 fai led (4769!=5083)
[ 2153.794496] EXT4-fs (md0): group descriptors corrupted!
[ 2698.792870] EXT4-fs (md0): ext4_check_descriptors: Checksum for group 256 fai led (4769!=5083)
[ 2698.794011] EXT4-fs (md0): group descriptors corrupted!
[/share] #
.
5 - e2fsck_64 -fp -C 0 /dev/md0 output; -> Process is killed!
.
II – How To Fix and Mount Volume?
1 – I type this command;
e2fsck -f -b 32768 /dev/md0
.
2 – Then try to mount volume manually;
mount -t ext4 /dev/md0 /share/MD0_DATA
.
3 – And after rebooting system;
RAID Seems Unmounted and Mounting Volume Failed; How To Start e2fsck Command And Mount VolumeRAID Yapım Unmounted Görünüyor; e2fsck Komutuyla Nasıl Sistemi Tekrar Mount Edebilirsiniz;,