Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

LVM logical volume won't mount



I must be missing something simple and obvious here...after creating a 
software RAID5 array, and setting up LVM, attempting to mount the new 
logical volume results in:

# mount /dev/video_vg/video_lv /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.

Further below is a portion of an strace from mount, showing that indeed 
the mount(2) system call is returning ENOENT:

mount("/dev/video_vg/video_lv", "/video", "xfs", MS_MGC_VAL, "") = -1 
ENOENT (No such file or directory)

though the mount(2) man page of course doesn't shed much light on the 
possible causes, or how to determine which of the two paths it is 
complaining about.

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 were when that file system 
was setup (the XFS tools may have since been updated). The system in 
question is running Ubuntu Edgy (kernel version 2.6.20-5), so it is 
possible that there is an actual bug somewhere.

The one red flag I'm seeing is:

# 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

which is not what I'd expect for a brand new, never mounted file system. 
Running xfs_repair crashes:

# xfs_repair /dev/video_vg/video_lv
         - creating 2 worker thread(s)
Phase 1 - find and verify superblock...
         - reporting progress in intervals of 15 minutes
Phase 2 - using internal log
         - zero log...
         - scan filesystem freespace and inode maps...
         - 14:48:36: scanning filesystem freespace - 32 of 32 allocation 
groups done
         - found root inode chunk
Phase 3 - for each AG...
         - scan and clear agi unlinked lists...
         - 14:48:36: scanning agi unlinked lists - 32 of 32 allocation 
groups done
         - process known inodes and perform inode discovery...
[...]
bad magic number 0x0 on inode 130
bad version number 0x0 on inode 130
bad magic number 0x0 on inode 131
bad version number 0x0 on inode 131
[...]
bad magic number 0x0 on inode 130, resetting magic number
bad version number 0x0 on inode 130, resetting version number
bad magic number 0x0 on inode 160, resetting magic number
bad version number 0xfffffff9 on inode 160, resetting version number
[...]
bad magic number 0x0 on inode 177, resetting magic number
bad version number 0x0 on inode 177, resetting version number
         - 14:48:36: process known inodes and inode discovery - 64 of 64 
inodes done
         - process newly discovered inodes...
         - 14:48:36: process newly discovered inodes - 32 of 32 
allocation groups done
Phase 4 - check for duplicate blocks...
         - setting up duplicate extent list...
         - clear lost+found (if it exists) ...
         - 14:48:36: setting up duplicate extent list - 32 of 32 
allocation groups done
         - check for inodes claiming duplicate blocks...
[...]
         - agno = 30
         - agno = 31
         - 14:48:37: check for inodes claiming duplicate blocks - 64 of 
64 inodes done
*** glibc detected *** xfs_repair: double free or corruption (out): 
0x081a8e00 ***


Recreating the file system results in identical output from xfs_check.

  -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_vg/video_lv -f
meta-data=/dev/video_vg/video_lv isize=256    agcount=32, agsize=4883456 
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_vg/video_lv /video
mount: No such file or directory
# mount /dev/video_vg/video_lv /mnt
mount: No such file or directory
# mount /dev/mapper/video_vg-video_lv /video
mount: No such file or directory
# mount /dev/mapper/video_vg-video_lv /mnt
mount: No such file or directory


Confirming various things:

# ls -al /dev/video_vg/video_lv
lrwxrwxrwx 1 root root 29 2007-01-25 01:19 /dev/video_vg/video_lv -> 
/dev/mapper/video_vg-video_lv
# ls -al /dev/mapper/video_vg-video_lv
brw-rw---- 1 root disk 253, 6 2007-01-25 01:22 /dev/mapper/video_vg-video_lv
# 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/video_vg/video_lv [      596.12 GB]
   /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-2eVY-LH3G-YX3C-rH3O-P1V2-pCvirR
# xfs_logprint /dev/video_vg/video_lv
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-f5f0-4843-b503-dc02b4d5287d   format: little endian linux
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("/dev/disk", 0xbf8fb397, 4096) = -1 EINVAL (Invalid argument)
readlink("/dev/disk/by-uuid", 0xbf8fb397, 4096) = -1 EINVAL (Invalid 
argument)
readlink("/dev/disk/by-uuid/ce8eb849-4e53-4c0f-bcb7-1b559c6ab3b8", 
"../../hda3", 4096) = 10
readlink("/dev/hda3", 0xbf8fb397, 4096) = -1 EINVAL (Invalid argument)
readlink("/dev", 0xbf8fb397, 4096)      = -1 EINVAL (Invalid argument)
readlink("/dev/disk", 0xbf8fb397, 4096) = -1 EINVAL (Invalid argument)
readlink("/dev/disk/by-uuid", 0xbf8fb397, 4096) = -1 EINVAL (Invalid 
argument)
readlink("/dev/disk/by-uuid/bd78498e-d4b7-465b-b147-d14ef4c9b0d0", 
"../../hda1", 4096) = 10
readlink("/dev/hda1", 0xbf8fb397, 4096) = -1 EINVAL (Invalid argument)
readlink("/dev", 0xbf8fb397, 4096)      = -1 EINVAL (Invalid argument)
readlink("/dev/disk", 0xbf8fb397, 4096) = -1 EINVAL (Invalid argument)
readlink("/dev/disk/by-uuid", 0xbf8fb397, 4096) = -1 EINVAL (Invalid 
argument)
readlink("/dev/disk/by-uuid/638027c7-fd2e-42fc-80a6-967c20e0fa71", 
"../../hda4", 4096) = 10
readlink("/dev/hda4", 0xbf8fb397, 4096) = -1 EINVAL (Invalid argument)
readlink("/dev", 0xbf8fb397, 4096)      = -1 EINVAL (Invalid argument)
readlink("/dev/disk", 0xbf8fb397, 4096) = -1 EINVAL (Invalid argument)
readlink("/dev/disk/by-uuid", 0xbf8fb397, 4096) = -1 EINVAL (Invalid 
argument)
readlink("/dev/disk/by-uuid/082ed3e1-09ef-403c-a195-7522fac3e623", 
"../../hda2", 4096) = 10
readlink("/dev/hda2", 0xbf8fb397, 4096) = -1 EINVAL (Invalid argument)
readlink("/dev", 0xbf8fb397, 4096)      = -1 EINVAL (Invalid argument)
readlink("/dev/hdc", 0xbf8fb397, 4096)  = -1 EINVAL (Invalid argument)
readlink("/dev", 0xbf8fb397, 4096)      = -1 EINVAL (Invalid argument)
readlink("/dev/md0", 0xbf8fb397, 4096)  = -1 EINVAL (Invalid argument)
readlink("/dev", 0xbf8fb397, 4096)      = -1 EINVAL (Invalid argument)
readlink("/dev/video_vg", 0xbf8fb397, 4096) = -1 EINVAL (Invalid argument)
readlink("/dev/video_vg/video_lv", "/dev/mapper/video_vg-video_lv", 
4096) = 29
readlink("/dev", 0xbf8fb397, 4096)      = -1 EINVAL (Invalid argument)
readlink("/dev/mapper", 0xbf8fb397, 4096) = -1 EINVAL (Invalid argument)
readlink("/dev/mapper/video_vg-video_lv", 0xbf8fb397, 4096) = -1 EINVAL 
(Invalid argument)
stat64("/sbin/mount.xfs", 0xbf8fd0c4)   = -1 ENOENT (No such file or 
directory)
rt_sigprocmask(SIG_BLOCK, ~[TRAP SEGV RTMIN RT_1], NULL, 8) = 0
mount("/dev/video_vg/video_lv", "/video", "xfs", MS_MGC_VAL, "") = -1 
ENOENT (No such file or directory)
rt_sigprocmask(SIG_UNBLOCK, ~[TRAP SEGV RTMIN RT_1], NULL, 8) = 0
lstat64("/video", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/video", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
stat64("/dev/video_vg/video_lv", {st_mode=S_IFBLK|0660, 
st_rdev=makedev(253, 6), ...}) = 0
dup(2)                                  = 3
fcntl64(3, F_GETFL)                     = 0x8002 (flags O_RDWR|O_LARGEFILE)
fstat64(3, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 
0) = 0xb7d77000
_llseek(3, 0, 0xbf8fcc64, SEEK_CUR)     = -1 ESPIPE (Illegal seek)
open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT 
(No such file or directory)
open("/usr/share/locale-langpack/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 
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



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.





BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org