newly created XFS filesystem is corrupt; mount fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
xfsprogs (Ubuntu) |
Invalid
|
Medium
|
Unassigned |
Bug Description
Binary package hint: xfsprogs
Ubuntu Fiesty 2.6.20-5-386; xfsprogs 2.8.18-1
After creating a software RAID5 array, setting up LVM, and creating an XFS file system on the logical volume, attempting to mount the new file system results in:
# mount /dev/video_
mount: No such file or directory
Below is a transcript showing the process of setting up LVM, and creating the file system, as well as confirmation that both the device and the mount point exist. I also confirmed using strace that indeed the mount(2) system call is returning ENOENT:
mount("
ENOENT (No such file or directory)
The one red flag I'm seeing is:
# xfs_check /dev/video_
bad format 0 for inode 130 type 0
bad magic number 0 for inode 144
bad magic number 0 for inode 145
allocated inode 130 has 0 link count
which is not what I'd expect for a brand new, never mounted file system.
Running xfs_repair crashes, as reported in Bug #81711.
Recreating the XFS file system results in identical output from xfs_check.
Installing an ext3 file system on the same device works fine.
Note that the system currently has a RAID1 array with the same type of file system (XFS) that works fine, suggesting that the file system tools and mount are behaving normally - or at least xfsprogs were when that file system was setup (at the time running Dapper and probably xfsprogs 2.8.10-1).
I'm going to try downgrading to an earlier xfsprogs that has been built for Fiesty (2.8.11-1 I believe) and see if that resolves it. I'll post a follow-up.
-Tom
Setup LVM:
# pvcreate /dev/md1
Physical volume "/dev/md1" successfully created
# vgcreate -s 64M video_vg /dev/md1
Volume group "video_vg" successfully created
# vgdisplay video_vg | grep "Total PE"
Total PE 9538
# lvcreate -l 9538 -nvideo_lv video_vg
Logical volume "video_lv" created
Setup file system:
# mkfs.xfs -b size=4096 -L Videos /dev/video_
meta-data=
blks
= sectsz=512 attr=0
data = bsize=4096 blocks=156270592, imaxpct=25
= sunit=0 swidth=0 blks, unwritten=1
naming =version 2 bsize=4096
log =internal log bsize=4096 blocks=32768, version=1
= sectsz=512 sunit=0 blks
realtime =none extsz=4096 blocks=0, rtextents=0
mount attempts:
# mount /dev/video_
mount: No such file or directory
# mount /dev/video_
mount: No such file or directory
# mount /dev/mapper/
mount: No such file or directory
# mount /dev/mapper/
mount: No such file or directory
Confirming various things:
# ls -al /dev/video_
lrwxrwxrwx 1 root root 29 2007-01-25 01:19 /dev/video_
/dev/mapper/
# ls -al /dev/mapper/
brw-rw---- 1 root disk 253, 6 2007-01-25 01:22 /dev/mapper/
# ls -al /video
total 8
drwxr-xr-x 2 root root 4096 2007-01-25 01:23 .
drwxr-xr-x 24 root root 4096 2007-01-25 07:40 ..
# ls -al /mnt
total 8
drwxr-xr-x 2 root root 4096 2006-05-22 10:00 .
drwxr-xr-x 24 root root 4096 2007-01-25 07:40 ..
# whoami
root
# cat /proc/mdstat
Personalities : [raid1] [raid6] [raid5] [raid4]
md1 : active raid5 sdd1[2] sdc1[1] sdb1[0]
625137152 blocks level 5, 128k chunk, algorithm 2 [3/3] [UUU]
md0 : active raid1 sda1[0]
312568576 blocks [2/1] [U_]
unused devices: <none>
# vgscan
Reading all physical volumes. This may take a while...
Found volume group "video_vg" using metadata type lvm2
# lvmdiskscan
/dev/ram0 [ 64.00 MB]
/dev/md0 [ 298.09 GB]
/dev/evms/hda1 [ 2.00 GB]
/dev/ram1 [ 64.00 MB]
/dev/hda1 [ 2.00 GB]
/dev/md1 [ 596.18 GB] LVM physical volume
/dev/evms/hda2 [ 2.00 GB]
/dev/ram2 [ 64.00 MB]
/dev/hda2 [ 2.00 GB]
/dev/evms/hda3 [ 10.00 GB]
/dev/ram3 [ 64.00 MB]
/dev/hda3 [ 10.00 GB]
/dev/evms/hda4 [ 135.04 GB]
/dev/ram4 [ 64.00 MB]
/dev/hda4 [ 135.04 GB]
/dev/ram5 [ 64.00 MB]
/dev/ram6 [ 64.00 MB]
/dev/
/dev/ram7 [ 64.00 MB]
/dev/ram8 [ 64.00 MB]
/dev/ram9 [ 64.00 MB]
/dev/ram10 [ 64.00 MB]
/dev/ram11 [ 64.00 MB]
/dev/ram12 [ 64.00 MB]
/dev/ram13 [ 64.00 MB]
/dev/ram14 [ 64.00 MB]
/dev/ram15 [ 64.00 MB]
1 disk
25 partitions
0 LVM physical volume whole disks
1 LVM physical volume
# vgdisplay
--- Volume group ---
VG Name video_vg
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 2
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 1
Open LV 0
Max PV 0
Cur PV 1
Act PV 1
VG Size 596.12 GB
PE Size 64.00 MB
Total PE 9538
Alloc PE / Size 9538 / 596.12 GB
Free PE / Size 0 / 0
VG UUID qPvMwV-
# xfs_logprint /dev/video_
xfs_logprint:
data device: 0xfd06
log device: 0xfd06 daddr: 625082400 length: 262144
cycle: 1 version: 1 lsn: 1,0 tail_lsn: 1,0
length of Log Record: 20 prev offset: -1 num ops: 1
uuid: aa2d4295-
h_size: 32768
-------
Oper (0): tid: b0c0d0d0 len: 8 clientid: LOG flags: UNMOUNT
Unmount filesystem
=======
xfs_logprint: skipped 512 cleared blocks in range: 2 - 513
xfs_logprint: skipped 261630 zeroed blocks in range: 514 - 262143
xfs_logprint: physical end of log
=======
xfs_logprint: logical end of log
=======
Strace of mount:
[...]
read(3, "# /etc/fstab: static file system"..., 4096) = 713
read(3, "", 4096) = 0
close(3) = 0
munmap(0xb7d77000, 4096) = 0
readlink("/dev", 0xbf8fb397, 4096) = -1 EINVAL (Invalid argument)
readlink(
readlink(
argument)
readlink(
"../../hda3", 4096) = 10
readlink(
readlink("/dev", 0xbf8fb397, 4096) = -1 EINVAL (Invalid argument)
readlink(
readlink(
argument)
readlink(
"../../hda1", 4096) = 10
readlink(
readlink("/dev", 0xbf8fb397, 4096) = -1 EINVAL (Invalid argument)
readlink(
readlink(
argument)
readlink(
"../../hda4", 4096) = 10
readlink(
readlink("/dev", 0xbf8fb397, 4096) = -1 EINVAL (Invalid argument)
readlink(
readlink(
argument)
readlink(
"../../hda2", 4096) = 10
readlink(
readlink("/dev", 0xbf8fb397, 4096) = -1 EINVAL (Invalid argument)
readlink(
readlink("/dev", 0xbf8fb397, 4096) = -1 EINVAL (Invalid argument)
readlink(
readlink("/dev", 0xbf8fb397, 4096) = -1 EINVAL (Invalid argument)
readlink(
readlink(
4096) = 29
readlink("/dev", 0xbf8fb397, 4096) = -1 EINVAL (Invalid argument)
readlink(
readlink(
(Invalid argument)
stat64(
directory)
rt_sigprocmask(
mount("
ENOENT (No such file or directory)
rt_sigprocmask(
lstat64("/video", {st_mode=
stat64("/video", {st_mode=
stat64(
st_rdev=
dup(2) = 3
fcntl64(3, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE)
fstat64(3, {st_mode=
mmap2(NULL, 4096, PROT_READ|
0) = 0xb7d77000
_llseek(3, 0, 0xbf8fcc64, SEEK_CUR) = -1 ESPIPE (Illegal seek)
open("/
(No such file or directory)
open("/
ENOENT (No such file or directory)
write(3, "mount: No such file or directory"..., 33mount: No such file or
directory) = 33
close(3) = 0
munmap(0xb7d77000, 4096) = 0
exit_group(32) = ?
Process 17781 detached
> I'm going to try downgrading to an earlier xfsprogs
> that has been built for Fiesty (2.8.11-1 I believe)
> and see if that resolves it. I'll post a follow-up.
Downgrading to 2.8.11-1 fails with an identical result:
# mkfs.xfs -b size=4096 -L Videos /dev/video_ vg/video_ lv -f /dev/video_ vg/video_ lv isize=256 agcount=32, agsize=4883456 blks
meta-data=
= sectsz=512 attr=0
data = bsize=4096 blocks=156270592, imaxpct=25
= sunit=0 swidth=0 blks, unwritten=1
naming =version 2 bsize=4096
log =internal log bsize=4096 blocks=32768, version=1
= sectsz=512 sunit=0 blks
realtime =none extsz=65536 blocks=0, rtextents=0
# xfs_check /dev/video_ vg/video_ lv
bad format 0 for inode 130 type 0
bad magic number 0 for inode 144
bad magic number 0 for inode 145
allocated inode 130 has 0 link count
# mount /dev/video_ vg/video_ lv /mnt
mount: No such file or directory
But downgrading to 2.8.10-1 works:
# wget http:// librarian. launchpad. net/4394700/ xfsprogs_ 2.8.10- 1_i386. deb
[...]
# dpkg -i xfsprogs_ 2.8.10- 1_i386. deb 2.8.10- 1_i386. deb) ...
dpkg - warning: downgrading xfsprogs from 2.8.11-1 to 2.8.10-1.
(Reading database ... 135994 files and directories currently installed.)
Preparing to replace xfsprogs 2.8.11-1 (using xfsprogs_
Unpacking replacement xfsprogs ...
Setting up xfsprogs (2.8.10-1) ...
# mkfs.xfs -b size=4096 -L Videos /dev/video_ vg/video_ lv -f /dev/video_ vg/video_ lv isize=256 agcount=32, agsize=4883456 blks
meta-data=
= sectsz=512 attr=0
data = bsize=4096 blocks=156270592, imaxpct=25
= sunit=0 swidth=0 blks, unwritten=1
naming =version 2 bsize=4096
log =internal log bsize=4096 blocks=32768, version=1
= sectsz=512 sunit=0 blks
realtime =none extsz=65536 blocks=0, rtextents=0
# xfs_check /dev/video_ vg/video_ lv
#
# mount /dev/video_ vg/video_ lv /mnt
#