Tried to mount a disk (hardware raid) but failed.

#mount -t ext4 /dev/sda /data

mount: wrong fs type, bad option, bad superblock on /dev/sda,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

#dmesg | tail -1
       EXT4-fs (sda): VFS: Can't find ext4 filesystem

what am I doing wrong? I saw that many posters with similar problem were request to post the content of fstab so here it is:

#cat /etc/fstab

# /etc/fstab
# Created by anaconda on Wed Aug  6 11:29:15 2014
# 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=276c97cc-9c5f-496f-a56f-ac3a45c58a26           /           ext4    defaults,usrquota,grpquota  1 1
UUID=3978f122-03d4-48db-adeb-6fc8a2c624c4 /boot                   ext2    defaults        1 2
UUID=1251c6d8-c417-48df-9cf4-2f56e3a823a6 /tmp                    ext4    defaults        1 2
UUID=95fd67df-7172-4ac9-9264-0b50819a203a swap                    swap    defaults        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

CentOs 6


# cat /proc/partitions 
major minor  #blocks  name

   8       32  244198584 sdc
   8       33     102400 sdc1
   8       34    4194304 sdc2
   8       35    2097152 sdc3
   8       36          1 sdc4
   8       37  237802496 sdc5
   8       48  244198584 sdd
   8       49     102400 sdd1
   8       50    4194304 sdd2
   8       51    2097152 sdd3
   8       52          1 sdd4
   8       53  237802496 sdd5
   8        0 21484255232 sda
   8       16 21484255232 sdb
   9        1    4192192 md1
   9        3  237671232 md3
   9        2    2096064 md2
   9        0     102336 md0

#fdisk -l | grep sda
Disk /dev/sda: 21999.9 GB, 21999877357568 bytes
  • What does cat /proc/partitions say? – kasperd Aug 6 '14 at 21:03
  • I've added the output to the question – Niros Aug 7 '14 at 4:38
  • Try commands pvscan, vgscan, lvscan ... perhaps your ext4 resides in LVM volume? – Janne Pikkarainen Aug 7 '14 at 4:49
  • all of these command don't exist on my machine, should I install them? it's a hardware raid 5 – Niros Aug 7 '14 at 4:51
  • Is that two separate RAID-5 arrays? Is there any data on the RAID-5? It would be interesting to see the output of hexdump -C </dev/sda | head -40 and likewise with sdb. – kasperd Aug 7 '14 at 8:52

When using mount you have to mount the partition not the drive itself eg mount -t ext4 /dev/sda1 /data

  • # mount -t ext4 /dev/sda1 /data mount: special device /dev/sda1 does not exist – Niros Aug 6 '14 at 20:56
  • /dev/sda1 was just an example. I would suggest running an fdisk -l to see what drives/partitions are available and then try mounting the one you want from there. – joeg1ff Aug 6 '14 at 20:59
  • in fdisk -l I can see /dav/sda (I've updated my post with the data from fdisk) – Niros Aug 7 '14 at 4:41
  • 4
    I doesn't look like you have created any partitions on that raid. Create a primary partition with fdisk eg fdisk /dev/sda/. When the menu comes up n for a new partition select the defaults if you only want one partition. Select t to change the type of partition you want I believe 83 is Linux then w to write the changes. Then run mkfs.ext4 /dev/sda1 to format the newly created partition. Or if you are not to savvy with command line a GUI utility like gparted will do the trick. – joeg1ff Aug 7 '14 at 13:32
  • Thanks! it did the trick but it appears that fdisk doesn't allow more than 2TB partition and I needed 22TB parition. After some googling I could find this excellent post which solved my problem. – Niros Aug 7 '14 at 16:20

You can get that error in the dmesg when you are creating a new Logical Volume but you forget to run the mkfs command which actually builds the file system. What I am trying to say here is that in order to be able to mount a partition you should make sure first that you ran mkfs after you created the Logical Volume or else it will complain same as in your example.

  1. Create a Logical Volume from the Volume group vg: lvcreate -L 2G --name lv_data vg
  2. Make the file system an ext4 type: mkfs.ext4 /dev/mapper/vg-lv_data
  3. Mount it: mount -t ext4 /dev/mapper/vg-lv_data /data

Jumping/missing step 2 it will complain with the error: VFS: Can't find ext4 filesystem.


It clearly says wrong file system type, give below command and check which file system it is.

file -sL /dev/mapper/datavg-datalv


/dev/mapper/datavg-datalv: SGI XFS filesystem data

Cross check the fs type in /etc/fstab, if it is other than xfs, change it to xfs and in /etc/fstab and then try mounting

Not the answer you're looking for? Browse other questions tagged or ask your own question.