I ran into this message two days ago=:tune2fs: Bad magic number in super-block while trying to open /dev/vdc1Couldn't find valid filesystem superblock.The system is Ubuntu, a KVM virtual machine under CentOS (host). And I have to add a new XFS file system on a new virtual hard drive.The new virtual hard drive is displayed as /dev/vdc, I created a new partition:fdisk /dev/vdc    n    p    default    +20G    wThen I use mkfs to change the partition into XFS:mkfs.xfs -i size=1024 /dev/vdc1And this is the result of fdisk -l:root@server1:/# fdisk -l....Disk /dev/vdc: 21.5 GB, 21474836480 bytes3 heads, 34 sectors/track, 411206 cylinders, total 41943040 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisk identifier: 0xc6bdd34aDevice Boot      Start         End      Blocks   Id  System/dev/vdc1            2048    41943039    20970496   83  Linux....And this is the result of blkid (/dev/vdc1 is XFS):root@server1:/# blkid/dev/vda1: UUID=2a5dd605-7774-4977-8f6c-79f70f222a65 TYPE=ext2 /dev/vda5: UUID=aBuqo9-bgg0-gRLK-g5aG-xC9c-tdRx-znG819 TYPE=LVM2_member /dev/vdb: UUID=8L5N3N-EDmg-716P-Kk0t-4DID-x686-Ytlh2y TYPE=LVM2_member /dev/vdc1: UUID=468ec0df-089b-4225-8519-fd4022db24ed TYPE=xfs /dev/mapper/ubuntu--vg-root: UUID=61e644ad-2975-4017-879d-bb7933c7d6e9 TYPE=ext4 /dev/mapper/ubuntu--vg-swap_1: UUID=01ca2938-35aa-4c5c-8de4-ed37dc971cd3 TYPE=swap And /dev/vdc1 is mountable, which means there is no SuperBlock Errors:root@server1:/# mkdir /data_testroot@server1:/# mount /dev/vdc1 /data_test(mounted)And this is the result of df -h after mount /dev/vdc1:root@server1:/# df -hFilesystem                   Size  Used Avail Use% Mounted onudev                         990M   12K  990M   1% /devtmpfs                        201M  456K  200M   1% /run/dev/mapper/ubuntu--vg-root   47G  2.2G   43G   5% /none                         4.0K     0  4.0K   0% /sys/fs/cgroupnone                         5.0M     0  5.0M   0% /run/locknone                        1001M     0 1001M   0% /run/shmnone                         100M     0  100M   0% /run/user/dev/vda1                    236M   38M  186M  17% /boot/dev/vdc1                     20G   33M   20G   1% /data_testBut when I use tune2fs, it told me that /dev/vdc1 has superblock error:root@server1:/# tune2fs -l /dev/vdc1 | grep -i inodetune2fs: Bad magic number in super-block while trying to open /dev/vdc1Couldn't find valid filesystem superblock.How can I fix this error? I tried other commands such as xfs_repair, xfs_check, but they all not work
Use tune2fs on XFS filesystem, get Couldn't find valid filesystem superblock.
filesystems;storage;fdisk;xfs;mkfs
tune2fs applies only to ext[2-4] filesystems; not to XFS ones.  The Bad magic number in super-block simply means that tune2fs doesn't understand the filesystem type.  As you noted, the fact that your filesystem can be mounted confirms that it's viable.