Can't mount disk (VFS: Can't find ext4 filesystem) [closed]
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
Updates:
# 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
Solution 1:
When using mount you have to mount the partition not the drive itself eg mount -t ext4 /dev/sda1 /data
Solution 2:
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.
- Create a Logical Volume from the Volume group vg: lvcreate -L 2G --name lv_data vg
- Make the file system an ext4 type: mkfs.ext4 /dev/mapper/vg-lv_data
- 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.