6

I have two very similar partitions, /dev/sdb1 (labeled 'bigb') and /dev/sdc1 (labeled 'bigc'). I used to be able to mount both of them using mount -n -L bigX /mnt/donottouch/localX (with X being b or c). However, mount has recently started requiring me to specify -t ext4 but only on bigc.

bigb mounts just fine:

# mount -n -L bigb  /mnt/donottouch/localb -vvv
mount: fstab path: "/etc/fstab"
mount: mtab path:  "/etc/mtab"
mount: lock path:  "/etc/mtab~"
mount: temp path:  "/etc/mtab.tmp"
mount: UID:        0
mount: eUID:       0
mount: spec:  "/dev/sdb1"
mount: node:  "/mnt/donottouch/localb"
mount: types: "(null)"
mount: opts:  "(null)"
final mount options: '(null)'
mount: you didn't specify a filesystem type for /dev/sdb1
       I will try type ext4
mount: mount(2) syscall: source: "/dev/sdb1", target: "/mnt/donottouch/localb", filesystemtype: "ext4", mountflags: -1058209792, data: (null)
/dev/sdb1 on /mnt/donottouch/localb type ext4 (rw)

But then bigc errors out:

# mount -n -L bigc  /mnt/donottouch/localc -vvv
mount: fstab path: "/etc/fstab"
mount: mtab path:  "/etc/mtab"
mount: lock path:  "/etc/mtab~"
mount: temp path:  "/etc/mtab.tmp"
mount: UID:        0
mount: eUID:       0
mount: spec:  "/dev/sdc1"
mount: node:  "/mnt/donottouch/localc"
mount: types: "(null)"
mount: opts:  "(null)"
final mount options: '(null)'
mount: you didn't specify a filesystem type for /dev/sdc1
       I will try all types mentioned in /etc/filesystems or /proc/filesystems
mount: you must specify the filesystem type

...unless I specify -t ext4:

# mount -n -L bigc  /mnt/donottouch/localc -vvv -t ext4
mount: fstab path: "/etc/fstab"
mount: mtab path:  "/etc/mtab"
mount: lock path:  "/etc/mtab~"
mount: temp path:  "/etc/mtab.tmp"
mount: UID:        0
mount: eUID:       0
mount: spec:  "/dev/sdc1"
mount: node:  "/mnt/donottouch/localc"
mount: types: "ext4"
mount: opts:  "(null)"
final mount options: '(null)'
mount: mount(2) syscall: source: "/dev/sdc1", target: "/mnt/donottouch/localc", filesystemtype: "ext4", mountflags: -1058209792, data: (null)
/dev/sdc1 on /mnt/donottouch/localc type ext4 (rw)

Mount claims that it will try "all types mentioned in /etc/filesystems or /proc/filesystems", but it clearly isn't doing that, given that those two files contain ext4:

# cat /etc/filesystems 
ext4
ext3
ext2
nodev proc
nodev devpts
iso9660
vfat
hfs
hfsplus

# cat /proc/filesystems 
nodev   sysfs
nodev   rootfs
nodev   bdev
nodev   proc
nodev   cgroup
nodev   cpuset
nodev   tmpfs
nodev   devtmpfs
nodev   binfmt_misc
nodev   debugfs
nodev   securityfs
nodev   sockfs
nodev   usbfs
nodev   pipefs
nodev   anon_inodefs
nodev   inotifyfs
nodev   devpts
nodev   ramfs
nodev   hugetlbfs
        iso9660
nodev   pstore
nodev   mqueue
nodev   rpc_pipefs
nodev   nfs
nodev   nfs4
        ext4
nodev   fuse
        fuseblk
nodev   fusectl
nodev   autofs
nodev   nfsd
        ext3

Besides, why would it decide to try ext4 for bigb, but try all filesystem types for bigc?

To add to the weirdness, blkid is able to detect bigc as ext4:

# blkid -o value -s TYPE /dev/sdb1
ext4
# blkid -o value -s TYPE /dev/sdc1
ext4
# mount -V
mount from util-linux-ng 2.17.2 (with libblkid and selinux support)

tune2fs -l shows that both partitions are essentially the same except for the inode size:

# tune2fs -l /dev/sdb1
tune2fs 1.41.12 (17-May-2010)
Filesystem volume name:   bigb
Last mounted on:          /mnt/donottouch/localb
Filesystem UUID:          2ceadc5b-c302-43d1-b289-047069a15537
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery extent sparse_super large_file uninit_bg
Filesystem flags:         signed_directory_hash 
Default mount options:    (none)
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              122101760
Block count:              488378000
Reserved block count:     24418900
Free blocks:              101141916
Free inodes:              118086875
First block:              0
Block size:               4096
Fragment size:            4096
Reserved GDT blocks:      907
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         8192
Inode blocks per group:   1024
Filesystem created:       Fri May 13 18:08:33 2011
Last mount time:          Fri Jul 19 11:59:32 2013
Last write time:          Fri Jul 19 11:59:32 2013
Mount count:              4
Maximum mount count:      39
Last checked:             Thu Mar 14 15:11:01 2013
Check interval:           15552000 (6 months)
Next check after:         Tue Sep 10 15:11:01 2013
Lifetime writes:          439 GB
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:               512
Required extra isize:     28
Desired extra isize:      28
Journal inode:            8
Default directory hash:   half_md4
Directory Hash Seed:      ad841c26-0111-4f32-bab5-e8ebc9616f18
Journal backup:           inode blocks

# tune2fs -l /dev/sdc1
tune2fs 1.41.12 (17-May-2010)
Filesystem volume name:   bigc
Last mounted on:          /mnt/donottouch/localc
Filesystem UUID:          74d41e82-d431-4b3d-ae1a-01dcb363a047
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype needs_recovery extent sparse_super large_file uninit_bg
Filesystem flags:         signed_directory_hash 
Default mount options:    (none)
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              122101760
Block count:              488378000
Reserved block count:     24418900
Free blocks:              103460007
Free inodes:              118032588
First block:              0
Block size:               4096
Fragment size:            4096
Reserved GDT blocks:      907
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         8192
Inode blocks per group:   512
Filesystem created:       Wed Apr 27 14:55:53 2011
Last mount time:          Fri Jul 19 12:01:47 2013
Last write time:          Fri Jul 19 12:01:47 2013
Mount count:              6
Maximum mount count:      35
Last checked:             Sat Mar  2 14:09:26 2013
Check interval:           15552000 (6 months)
Next check after:         Thu Aug 29 15:09:26 2013
Lifetime writes:          381 GB
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:               256
Required extra isize:     28
Desired extra isize:      28
Journal inode:            8
Default directory hash:   half_md4
Directory Hash Seed:      f36ed43e-46b4-473c-8af0-07dc2a8d90c8
Journal backup:           inode blocks

Some extra system info:

# cat /etc/system-release
Scientific Linux release 6.4 (Carbon)
# uname -ar
Linux ml44 2.6.32-358.14.1.el6.x86_64 #1 SMP Tue Jul 16 14:24:33 CDT 2013 x86_64 x86_64 x86_64 GNU/Linux

lsblk --fs seems to hiccup on bigc:

# lsblk --fs /dev/sdb1
NAME FSTYPE LABEL UUID                                 MOUNTPOINT
sdb1 ext4   bigb  2ceadc5b-c302-43d1-b289-047069a15537 /mnt/donottouch/localb
# lsblk --fs /dev/sdc1
NAME FSTYPE LABEL UUID MOUNTPOINT
sdc1                   /mnt/donottouch/localc
# e2label /dev/sdc1
bigc

Neither of them are in /etc/fstab or /etc/mtab. They are both clean according to e2fsck. Any ideas? The only significant recent change I can think of is an update from Scientific Linux 6.1 to 6.4.

pflaquerre
  • 171
  • 1
  • 5
  • 1
    This is likely a bug, and I'd first ask Ted Ts'o or [the mailing list](https://ext4.wiki.kernel.org/index.php/Mailinglists) about it. – Michael Hampton Jul 19 '13 at 19:04
  • 1
    what does say tune2fs -l ? especially the "Deafult mount option" for each filesystem? – Olivier S Jul 19 '13 at 19:17
  • The default mount option is `(none)` on both. I've added the rest of the output in the original question. As far as I can tell, the only difference between them is the inode size. – pflaquerre Jul 19 '13 at 19:25
  • 1
    The difference in the "I will try" messages from mount means that for some reason mount didn't find the fs type when it probed the device. Mount does essentially the same thing as your blkid call, so that's still strange. It should give you the same results, but for sanity maybe see if lsblk --fs /dev/sdc1 says the same thing. – Ciclamino Jul 19 '13 at 20:05
  • `lsblk --fs` is indeed different on bigc. I appended the output to the question. – pflaquerre Jul 19 '13 at 20:36
  • 1
    Does `mount -t auto ...` work? That's what I use. – ott-- Jul 19 '13 at 21:09
  • According to the `mount` manpage, `-t auto` is the same as without `-t`. I tried anyway and got the same behaviour (`-t auto` works for bigb, but not bigc). – pflaquerre Jul 19 '13 at 21:28
  • 1
    Ok, at least we've got something other than mount not seeing the right thing (lsblk). lsblk is seeing pretty much nothing, no label, no UUID, no fs type but it's not emitting any sort of error. One more thing that might be useful is a blkid with no cache (-c /dev/null). I'd still wouldn't know the culprit, but it'd at least show that libblkid isn't reading the info. Anything in dmesg relating to problems? And I assume this has persisted across a reboot? I'm out of ideas that don't involve building until-linux with debugging.... – Ciclamino Jul 22 '13 at 15:03
  • 1
    Oh yeah, also make sure you try the e2fsck with the -f option. Otherwise it may be just seeing it's clean and not doing any more checking. Since it mounts fine, I don't expect this to yield anything, but maybe.... – Ciclamino Jul 22 '13 at 15:10
  • `blkid` with `-c /dev/null` outputs nothing for bigc instead of ext4. There's nothing out of the ordinary in dmesg. `e2fsck -f` still comes out clean. Rebooting doesn't help. Hrm... – pflaquerre Jul 22 '13 at 15:59
  • 1
    Ok, so at least we know why lsblk reported something different than blkid -- blkid uses a cache by default. So it must have got it right once. Again, I'm out of ideas without getting to the util-linux code. – Ciclamino Jul 22 '13 at 16:46
  • when you try to mount bigc, what do you see in dmesg? – amrith Aug 18 '13 at 16:03

1 Answers1

1

i think the partition type of sdb1 is set to 83, which indicates a Linux fs like Ext4. While sdc1 seems to be set to some other type, according to your output of lsblk.

you can modify the partition type via utilities like fdisk or cfdisk. if i remember correctly, in fdisk you can change it by using the t command and then entering 83.

replay
  • 3,180
  • 13
  • 16