LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-18-2019, 06:15 AM   #1
pdevunuri
LQ Newbie
 
Registered: Apr 2019
Posts: 10

Rep: Reputation: Disabled
unable to mount the partition


Hello,
I have configured Linux on DELL Power edge T 430 server machine with mirroring image.
I have root partition, home partition, temp partition, u01 partition and swap partition all the partitions are created with ext4 filesystem.
All of a sudden my machine rebooted, I am able to boot into the machine and able to access the rest of the partitions (root, home and temp) except one partition. When i trying to follow the path, their is nothing to visible, I tried to mount the partition but no luck (mount /dev/sda* /u01). All the data and applications installed with that partition.
Could you please help in fixing the mount point or recover the data from the mirror drive.



I have tried to execute the command mount /dev/sda* /u01

[root@idmhost ~]# mount /dev/sda6
mount: can't find /dev/sda6 in /etc/fstab or /etc/mtab
[root@idmhost ~]# fsck /dev/sda6
fsck from util-linux-ng 2.17.2
e2fsck 1.43-WIP (20-Jun-2013)
ext2fs_open2: Bad magic number in super-block
fsck.ext2: Superblock invalid, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/sda6

The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
 
Old 04-18-2019, 07:00 AM   #2
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Slackware 14.2 current / Linux Mint / Debian / Void Linux
Posts: 8,508

Rep: Reputation: 1775Reputation: 1775Reputation: 1775Reputation: 1775Reputation: 1775Reputation: 1775Reputation: 1775Reputation: 1775Reputation: 1775Reputation: 1775Reputation: 1775
I'd say check SMART on the drive, and its partition table maybe corrupt, for starters, while backing up everything you deem important on it.
 
Old 04-18-2019, 07:17 AM   #3
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora, Alpine, Cirros, OpenSuse/SLES
Posts: 2,957

Rep: Reputation: 766Reputation: 766Reputation: 766Reputation: 766Reputation: 766Reputation: 766Reputation: 766
Quote:
Originally Posted by pdevunuri View Post
Could you please help in fixing the mount point or recover the data from the mirror drive.
You mean a mirror for /dev/sda6 exists? What is the name of the mirror drive? How is the mirror configured?

Quote:
Code:
[root@idmhost ~]# mount /dev/sda6
mount: can't find /dev/sda6 in /etc/fstab or /etc/mtab
Usually, administrators create an entry in the filesystem table for drives that need to be mounted permanently. Are you sure that /dev/sda6 is the correct drive?

To clear up the mystery, you could run these commands:
Code:
# cat /etc/fstab
# lsblk
# blkid
# pvs
# vgs
# lvs
and post the results here.

Don't worry: None of the commands is destructive. All they do is report information.
 
Old 04-18-2019, 07:50 AM   #4
pdevunuri
LQ Newbie
 
Registered: Apr 2019
Posts: 10

Original Poster
Rep: Reputation: Disabled
Unhappy

Quote:
Originally Posted by berndbausch View Post
You mean a mirror for /dev/sda6 exists? What is the name of the mirror drive? How is the mirror configured?


Usually, administrators create an entry in the filesystem table for drives that need to be mounted permanently. Are you sure that /dev/sda6 is the correct drive?

To clear up the mystery, you could run these commands:
Code:
# cat /etc/fstab
# lsblk
# blkid
# pvs
# vgs
# lvs
and post the results here.

Don't worry: None of the commands is destructive. All they do is report information.
Hi berndbausch,

Mirror image was configured for all the partitions. Mirror configuration was done has shown in the url " https://pubs.vmware.com/vsphere-50/i...EA66236F3.html "


Usually, administrators create an entry in the filesystem table for drives that need to be mounted permanently. Are you sure that /dev/sda6 is the correct drive?

for the above point the result is as follows
[root@idmhost ~]# fdisk -l (for this command result is given below)
Device Boot Start End Blocks Id System
/dev/sda1 * 1 12749 102400000 83 Linux
/dev/sda2 12749 25497 102400000 83 Linux
/dev/sda3 25497 31871 51200000 83 Linux
/dev/sda4 31871 243069 1696447488 5 Extended
/dev/sda5 31871 34421 20480000 82 Linux swap / Solaris
/dev/sda6 34421 243069 1675966432+ 83 Linux

[root@idmhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 96G 3.9G 88G 5% /
tmpfs 32G 0 32G 0% /dev/shm
/dev/sda2 96G 27G 65G 30% /home
/dev/sda3 48G 52M 46G 1% /tmp

For the commands which you have requested the result is as follows:

[root@idmhost ~]# cat /etc/fstab

#
# /etc/fstab
# Created by anaconda on Mon Jan 7 12:58:06 2019
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
UUID=c31a49d1-49c3-4597-99bf-1f1b92519852 / ext4 defaul ts 1 1
UUID=61720736-c6a2-4072-a049-f5580aa6bc34 /home ext4 defaul ts 1 2
UUID=66591f92-d76f-4035-854c-aa42c2601547 /tmp ext4 defaul ts 1 2
UUID=d65d1f8c-7542-4b14-aa8d-39a30a7a507c swap swap defaul ts 0 0
tmpfs /dev/shm tmpfs defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
sysfs /sys sysfs defaults 0 0
proc /proc proc defaults 0 0
[root@idmhost ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 1.8T 0 disk
├─sda1 8:1 0 97.7G 0 part /
├─sda2 8:2 0 97.7G 0 part /home
├─sda3 8:3 0 48.8G 0 part /tmp
├─sda4 8:4 0 1K 0 part
├─sda5 8:5 0 19.5G 0 part [SWAP]
└─sda6 8:6 0 1.6T 0 part
sr0 11:0 1 1024M 0 rom
[root@idmhost ~]# pvs
[root@idmhost ~]# vgs
[root@idmhost ~]# lvs
[root@idmhost ~]#
 
Old 04-18-2019, 09:17 AM   #5
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora, Alpine, Cirros, OpenSuse/SLES
Posts: 2,957

Rep: Reputation: 766Reputation: 766Reputation: 766Reputation: 766Reputation: 766Reputation: 766Reputation: 766
You forgot blkid, but I don't think it would add information.

Indeed, neither sda6 not its UUID is in /etc/fstab. I suppose something has happened that destroyed the primary superblock on this filesystem.

To recover the data, even partially, you need to know where the redundant superblocks are. This is not hard to find out using the internet. While I have never tried it, there seems to be a tool dumpe2fs, which scans the disk for superblocks.

Once you have addresses of redundant superblocks, you can run fsck -b SUPERBLOCK-LOCATION to check the filesystem. fsck will re-create the primary superblock, which will allow you to mount it.

However, fsck may destroy data (although it will always ask you whether it has your permission). Before running it, I would create a backup of /dev/sda6, just in case.
 
Old 04-18-2019, 10:16 AM   #6
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora, Alpine, Cirros, OpenSuse/SLES
Posts: 2,957

Rep: Reputation: 766Reputation: 766Reputation: 766Reputation: 766Reputation: 766Reputation: 766Reputation: 766
Quote:
Originally Posted by pdevunuri View Post
Could you please help in fixing the mount point or recover the data from the mirror drive.
You configured a RAID (we donít know which RAID level), which protects your data against disk failure. My guess is that disks didnít fail, but something overwrote your filesystem superblock. The RAID doesnít help you in such a situation. A backup would help.
 
Old 04-18-2019, 10:56 AM   #7
pdevunuri
LQ Newbie
 
Registered: Apr 2019
Posts: 10

Original Poster
Rep: Reputation: Disabled
Unhappy

Quote:
Originally Posted by berndbausch View Post
You forgot blkid, but I don't think it would add information.

Indeed, neither sda6 not its UUID is in /etc/fstab. I suppose something has happened that destroyed the primary superblock on this filesystem.

To recover the data, even partially, you need to know where the redundant superblocks are. This is not hard to find out using the internet. While I have never tried it, there seems to be a tool dumpe2fs, which scans the disk for superblocks.

Once you have addresses of redundant superblocks, you can run fsck -b SUPERBLOCK-LOCATION to check the filesystem. fsck will re-create the primary superblock, which will allow you to mount it.

However, fsck may destroy data (although it will always ask you whether it has your permission). Before running it, I would create a backup of /dev/sda6, just in case.

Hi Berndbausch,

Here i am providing the result for blkid , dumpe2fs and fsck -b /dev/sda6 commands;

[root@idmhost ~]# blkid
/dev/sda1: UUID="c31a49d1-49c3-4597-99bf-1f1b92519852" TYPE="ext4"
/dev/sda2: UUID="61720736-c6a2-4072-a049-f5580aa6bc34" TYPE="ext4"
/dev/sda3: UUID="66591f92-d76f-4035-854c-aa42c2601547" TYPE="ext4"
/dev/sda5: UUID="d65d1f8c-7542-4b14-aa8d-39a30a7a507c" TYPE="swap"
[root@idmhost ~]#

[root@idmhost ~]# dumpe2fs /dev/sda4
dumpe2fs 1.43-WIP (20-Jun-2013)
dumpe2fs: Attempt to read block from filesystem resulted in short read while trying to open /dev/sda4
Couldn't find valid filesystem superblock.
[root@idmhost ~]# dumpe2fs /dev/sda6
dumpe2fs 1.43-WIP (20-Jun-2013)
dumpe2fs: Bad magic number in super-block while trying to open /dev/sda6
Couldn't find valid filesystem superblock.
[root@idmhost ~]#
[root@idmhost ~]# fsck -b /dev/sda6
fsck from util-linux-ng 2.17.2

Invalid non-numeric argument to -b ("/dev/sda6")

[root@idmhost ~]#

Please I appreciate if I can get chat or remote help to fix the issue.

--
Pavankumar
 
Old 04-18-2019, 11:11 AM   #8
dc.901
Member
 
Registered: Aug 2018
Location: Atlanta, GA - USA
Distribution: CentOS 6-7; SuSE 8-12
Posts: 381

Rep: Reputation: 101Reputation: 101
You did not mention how this RAID was created? Is it software or hardware RAID?
And, did you look at smartctl information?
Anything about sda in /var/log/messages?
 
Old 04-18-2019, 11:57 AM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 18,456

Rep: Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653
To find the backup superblocks run the command
dumpe2fs /dev/sda6 | grep -i superblock

Just out of curiosity run the command
file -s /dev/sda6

The output blkid does not show a UUID or filesystem type for /dev/sda6 so the filesystem is probably corrupted.

Do you have a backup?
 
Old 04-18-2019, 05:05 PM   #10
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora, Alpine, Cirros, OpenSuse/SLES
Posts: 2,957

Rep: Reputation: 766Reputation: 766Reputation: 766Reputation: 766Reputation: 766Reputation: 766Reputation: 766
dumpe2fs is probably not the right tool. The location of superblocks is given by mke2fs -n /dev/sdb6. Be very careful to include the -n option, otherwise you will destroy your filesystem.

Google suggestion: search ext superblocks. I found https://unix.stackexchange.com/quest...t4-superblocks.
 
Old 04-18-2019, 05:25 PM   #11
michaelk
Moderator
 
Registered: Aug 2002
Posts: 18,456

Rep: Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653Reputation: 2653
Not sure why you think dumpe2fs isn't the right tool.

Code:
mke2fs -n /dev/sdb1
....
Superblock backups stored on blocks: 
    32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
    4096000, 7962624
Code:
dumpe2fs /dev/sdb1 | grep -i superblock
dumpe2fs 1.42.5 (29-Jul-2012)
  Primary superblock at 0, Group descriptors at 1-3
  Backup superblock at 32768, Group descriptors at 32769-32771
  Backup superblock at 98304, Group descriptors at 98305-98307
  Backup superblock at 163840, Group descriptors at 163841-163843
  Backup superblock at 229376, Group descriptors at 229377-229379
  Backup superblock at 294912, Group descriptors at 294913-294915
  Backup superblock at 819200, Group descriptors at 819201-819203
  Backup superblock at 884736, Group descriptors at 884737-884739
  Backup superblock at 1605632, Group descriptors at 1605633-1605635
  Backup superblock at 2654208, Group descriptors at 2654209-2654211
  Backup superblock at 4096000, Group descriptors at 4096001-4096003
  Backup superblock at 7962624, Group descriptors at 7962625-7962627
No command so far can detect a UUID or valid filesystem signature which means that /sda6 is probably corrupted.
 
Old 04-18-2019, 07:43 PM   #12
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora, Alpine, Cirros, OpenSuse/SLES
Posts: 2,957

Rep: Reputation: 766Reputation: 766Reputation: 766Reputation: 766Reputation: 766Reputation: 766Reputation: 766
Quote:
Originally Posted by michaelk View Post
Not sure why you think dumpe2fs isn't the right tool.
(...)
No command so far can detect a UUID or valid filesystem signature which means that /sda6 is probably corrupted.
Thatís my point. dumpe2fs works nicely on a filesystem that has an intact primary superblock. Which is not the case here. The problem is how to find secondary superblocks if the primary one is broken.
 
Old 04-18-2019, 09:58 PM   #13
pdevunuri
LQ Newbie
 
Registered: Apr 2019
Posts: 10

Original Poster
Rep: Reputation: Disabled
Unhappy

Quote:
Originally Posted by dc.901 View Post
You did not mention how this RAID was created? Is it software or hardware RAID?
And, did you look at smartctl information?
Anything about sda in /var/log/messages?
Hi ,

We have configured Hardware Raid.

for smartctl command

[root@idmhost ~]# smartctl -i /dev/sda
smartctl 5.43 2016-09-28 r4347 [x86_64-linux-4.1.12-124.24.1.el6uek.x86_64] (local build)
Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net

Smartctl open device: /dev/sda failed: DELL or MegaRaid controller, please try adding '-d megaraid,N'
[root@idmhost ~]# smartctl -i /dev/sda1
smartctl 5.43 2016-09-28 r4347 [x86_64-linux-4.1.12-124.24.1.el6uek.x86_64] (local build)
Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net

Smartctl open device: /dev/sda1 failed: DELL or MegaRaid controller, please try adding '-d megaraid,N'
[root@idmhost ~]# smartctl -i /dev/sda6
smartctl 5.43 2016-09-28 r4347 [x86_64-linux-4.1.12-124.24.1.el6uek.x86_64] (local build)
Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net

Smartctl open device: /dev/sda6 failed: DELL or MegaRaid controller, please try adding '-d megaraid,N'
[root@idmhost ~]#

And attached /var/log/messages result as var_Log_message.
Attached Files
File Type: txt var_log_messages.txt (180.1 KB, 3 views)
 
Old 04-18-2019, 10:01 PM   #14
pdevunuri
LQ Newbie
 
Registered: Apr 2019
Posts: 10

Original Poster
Rep: Reputation: Disabled
Unhappy

Quote:
Originally Posted by michaelk View Post
To find the backup superblocks run the command
dumpe2fs /dev/sda6 | grep -i superblock

Just out of curiosity run the command
file -s /dev/sda6

The output blkid does not show a UUID or filesystem type for /dev/sda6 so the filesystem is probably corrupted.

Do you have a backup?
Hi michael,

result for the dumpe2fs /dev/sda6 | grep -i superblock

[root@idmhost ~]# dumpe2fs /dev/sda6 | grep -i superblock
dumpe2fs 1.43-WIP (20-Jun-2013)
dumpe2fs: Bad magic number in super-block while trying to open /dev/sda6
Couldn't find valid filesystem superblock.
[root@idmhost ~]#
 
Old 04-19-2019, 12:40 AM   #15
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora, Alpine, Cirros, OpenSuse/SLES
Posts: 2,957

Rep: Reputation: 766Reputation: 766Reputation: 766Reputation: 766Reputation: 766Reputation: 766Reputation: 766
Suggestion: Read error messages and follow any advice given:
Quote:
Originally Posted by pdevunuri View Post
Smartctl open device: /dev/sda6 failed: DELL or MegaRaid controller, please try adding '-d megaraid,N'
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to boot RHEL 5.2 and Unable to mount root file system in rescue mode vknemannavar Red Hat 5 01-29-2010 09:05 AM
Booting stops after: Unable to access resume device, mount: could not mount ... lespaul047 Linux - Newbie 2 04-06-2009 05:50 PM
Why unable to mount my nas in fstab get "mount error(5) Input/output error fi5ban Linux - Networking 0 04-01-2009 10:42 AM
Mount. Umount. Mount. Umount. Mount. Umount. Mount.. cwizardone Slackware 10 03-22-2007 09:30 AM
Unable to Build ELDK3.1 for kernel 2.4.25. On Booting Unable to mount root fs.. kannath Debian 0 05-11-2006 09:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration