I am experiencing the above problem and I have no idea what caused this. Can someone help me figure this out?
1) I have already had my first disk /dev/sda
working properly, now I am trying to create another FS on the 2nd disk:
$fdisk /dev/sdb
[I pressed n, p, w under fdisk]
2) I took a look at the result of fdisk
$fdisk -l
Disk /dev/sda: 1999.0 GB, 1998998994944 bytes
255 heads, 63 sectors/track, 243031 cylinders, total 3904294912 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000a6eb5
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 1953124351 976561152 83 Linux
/dev/sda2 1953126398 2070310911 58592257 5 Extended
/dev/sda5 1953126400 2070310911 58592256 82 Linux swap / Solaris
Disk /dev/sdb: 1999.0 GB, 1998998994944 bytes
31 heads, 7 sectors/track, 17992142 cylinders, total 3904294912 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x49802e7d
Device Boot Start End Blocks Id System
/dev/sdb1 2048 3904294911 1952146432 83 Linux
3) I make the following filesystem
$ mkfs.xfs -i size=1024 /dev/sdb
4) Now I see the problem...
$tune2fs -l /dev/sdb1 |grep -i inode
tune2fs: Bad magic number in super-block while trying to open /dev/sdb1
Couldn't find valid filesystem superblock.
You need to create the FS on
/dev/sdb1
, not/dev/sdb
.(Might just be a typo in the question).
More important:
tune2fs
is meant for ext2/3/4 file systems, not XFS, so this can't work at all. What do you want to do withtune2fs
?Try this:
(
-n
is to not actually write, use--help
) you should find superblocks location. Use this info (a number) to restore superblocks:to restore superblocks.. You might need to try several of the superblocks from the previous step.
Then try again to
mkfs.ext4 /dev/sdX
(or whatever filesystem you want)Just in case someone find this thread and want the right answer.