mount – 想要了解XFS的陌生感

前端之家收集整理的这篇文章主要介绍了mount – 想要了解XFS的陌生感前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
有一个XFS分区,我觉得行为非常奇怪.它在系统下安装得很好但不会安装在其他系统之下 – 我的主系统.因为我是XFS的新手,所以在我忘记XFS之前,我很想听到比我更有经验的用户.

>硬件很好:S.M.A.R.T.显示三个月大的1TB 2.5“Momentus很好;所有属性都像WORST = VALUE.硬盘站在一个Inateck外部铝架上,USB连接到我的任何一台笔记本电脑.
>分区布局是一个死的简单MBR,有四个主分区,XFS分区是我存储所有媒体内容(库)的地方.
三个月前我在Arch i686(内核3.19-ck)下创建了分区.在该系统下访问它没有任何问题.但在Fedora 16 i686下使用较旧的内核,即使在运行xfs_repair后也无法挂载.
>此外,在我正在运行的任何Linux下,在该驱动器上安装其他(ext4 / swap)分区没有问题.
>现在我无法从我的主笔记本电脑上取代i686版本的Arch x86_64安装XFS分区.除了OS版本之外什么都没改变.
>如果我尝试使用linux-3.17.4(i686)在Slackware 14.1下安装相同的分区,它只是……安装?!

这是磁盘布局

# fdisk -l /dev/sdb

Disk /dev/sdb: 931.5 GiB,1000204886016 bytes,1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x531843f8

Device     Boot    Start        End    Sectors   Size Id Type
/dev/sdb1           8192     212991     204800   100M 83 Linux
/dev/sdb2         212992    8200191    7987200   3.8G 82 Linux swap / Solaris
/dev/sdb3        8200192   20488191   12288000   5.9G 83 Linux
/dev/sdb4       20488192 1953523711 1933035520 921.8G 83 Linux

挂载尝试,我的用户给出了这个:

$mount /media/momedia/
mount: mount /dev/sdb4 on /media/momedia Failed: Structure needs cleaning

然后作为根

# mount /media/momedia/
mount: wrong fs type,bad option,bad superblock on /dev/sdb4,missing codepage or helper program,or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.

使用dmesg:

# dmesg | tail
[274136.490862] sd 9:0:0:0: [sdb] 1953525168 512-byte logical blocks: 

(1.00 TB/931 GiB)
[274136.490876] sd 9:0:0:0: [sdb] 4096-byte physical blocks
[274136.491965] sd 9:0:0:0: [sdb] Write Protect is off
[274136.491980] sd 9:0:0:0: [sdb] Mode Sense: 43 00 00 00
[274136.493079] sd 9:0:0:0: [sdb] Write cache: enabled,read cache: enabled,doesn't support DPO or FUA
[274136.519478]  sdb: sdb1 sdb2 sdb3 sdb4
[274136.523459] sd 9:0:0:0: [sdb] Attached SCSI disk
[274162.463851] XFS (sdb4): Version 5 superblock detected. This kernel has EXPERIMENTAL support enabled!
                Use of these features in this kernel is at your own risk!
[274162.463864] XFS (sdb4): Superblock has unknown read-only compatible features (0x1) enabled.
[274162.463869] XFS (sdb4): Attempted to mount read-only compatible filesystem read-write.
                Filesystem can only be safely mounted read only.
[274162.463878] ffff880079931000: 58 46 53 42 00 00 10 00 00 00 00 00 0e 66 f9 00  XFSB.........f..
[274162.463884] ffff880079931010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
[274162.463889] ffff880079931020: ed 2d 1b 3d be 8e 4a 99 94 48 1e 50 b3 63 8a 3b  .-.=..J..H.P.c.;
[274162.463895] ffff880079931030: 00 00 00 00 08 00 00 08 00 00 00 00 00 00 00 60  ...............`
[274162.463901] XFS (sdb4): Internal error xfs_sb_read_verify at line 730 of file fs/xfs/xfs_mount.c.  Caller 0xffffffffa0714635

[274162.463910] cpu: 0 PID: 81 Comm: kworker/0:1H Not tainted 3.10.94-1-lts310-ck #1
[274162.463915] Hardware name: Dell Inc. Inspiron 1012/00D2K7,BIOS A11 11/12/2010
[274162.463942] Workqueue: xfslogd xfs_buf_iodone_work [xfs]
[274162.463947]  0000000000000001 ffff880078f25d88 ffffffff814bec2d ffff880078f25dc8
[274162.463956]  ffffffffa07172d3 ffffffffa0714635 ffffffffa0795945 ffff88007002a100
[274162.463963]  0000000000000016 ffff88007985d800 0000000000001000 ffff880078f25e08
[274162.463971] Call Trace:
[274162.463985]  [<ffffffff814bec2d>] dump_stack+0x19/0x1b
[274162.464007]  [<ffffffffa07172d3>] xfs_corruption_error+0x93/0xa0 [xfs]
[274162.464028]  [<ffffffffa0714635>] ? xfs_buf_iodone_work+0x75/0xa0 [xfs]
[274162.464059]  [<ffffffffa076da02>] xfs_sb_read_verify+0x112/0x130 [xfs]
[274162.464081]  [<ffffffffa0714635>] ? xfs_buf_iodone_work+0x75/0xa0 [xfs]
[274162.464102]  [<ffffffffa0714635>] xfs_buf_iodone_work+0x75/0xa0 [xfs]
[274162.464112]  [<ffffffff8107558a>] process_one_work+0x17a/0x4e0
[274162.464120]  [<ffffffff81076093>] worker_thread+0x123/0x430
[274162.464128]  [<ffffffff814c2dc3>] ? preempt_schedule+0x43/0x60
[274162.464137]  [<ffffffff81075f70>] ? manage_workers.isra.8+0x290/0x290
[274162.464144]  [<ffffffff8107c6f0>] kthread+0xc0/0xd0
[274162.464152]  [<ffffffff8107c630>] ? kthread_worker_fn+0x170/0x170
[274162.464161]  [<ffffffff814cbe48>] ret_from_fork+0x58/0x90
[274162.464168]  [<ffffffff8107c630>] ? kthread_worker_fn+0x170/0x170
[274162.464174] XFS (sdb4): Corruption detected. Unmount and run xfs_repair
[274162.464193] XFS (sdb4): SB validate Failed with error 22.

file -s标识文件系统整洁清晰

[root@gwenael ~]# file -s /dev/sdb4
/dev/sdb4: SGI XFS filesystem data (blksz 4096,inosz 512,v2 dirs)

我在分区的开头检查了数据,发现它很整洁(但我不是十六进制的专家)

[root@gwenael ~]# dd if=/dev/sdb4 bs=512 count=64 iflag=direct | hexdump -C
64+0 records in
64+0 records out
32768 bytes (33 kB) copied,0.0252469 s,1.3 MB/s
00000000  58 46 53 42 00 00 10 00  00 00 00 00 0e 66 f9 00  |XFSB.........f..|
00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000020  ed 2d 1b 3d be 8e 4a 99  94 48 1e 50 b3 63 8a 3b  |.-.=..J..H.P.c.;|
00000030  00 00 00 00 08 00 00 08  00 00 00 00 00 00 00 60  |...............`|
00000040  00 00 00 00 00 00 00 61  00 00 00 00 00 00 00 62  |.......a.......b|
00000050  00 00 00 01 03 99 be 40  00 00 00 04 00 00 00 00  |.......@........|
00000060  00 01 cc df bc a5 10 00  02 00 00 08 6d 6f 6d 65  |............mome|
00000070  64 69 61 73 00 00 00 00  0c 0c 09 03 1a 00 00 19  |dias............|
00000080  00 00 00 00 00 03 f8 00  00 00 00 00 00 00 01 22  |..............."|
00000090  00 00 00 00 09 77 78 90  00 00 00 00 00 00 00 00  |.....wx.........|
000000a0  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
000000b0  00 00 00 00 00 00 00 04  00 00 00 00 00 00 00 00  |................|

下次安装尝试,输出更改回我的用户

# mount -t xfs /dev/sdb4 /media/momedia/
mount: mount /dev/sdb4 on /media/momedia Failed: Structure needs cleaning

安全检查找到超级块

# xfs_repair -n /dev/sdb4
Phase 1 - find and verify superblock...
Phase 2 - using internal log
        - zero log...
        - scan filesystem freespace and inode maps...
        - found root inode chunk
         <SNIP SNIP>
        - moving disconnected inodes to lost+found ...
Phase 7 - verify link counts...
Maximum Metadata LSN (1:402600) is ahead of log (1:8).
Would format log to cycle 4.

由于它没有挂载,我使用与上面相同的输出运行xfs_repair / dev / sdb4但是

Phase 5 - rebuild AG headers and trees...
        - reset superblock...

然而我也无法安装它

# mount -t xfs /dev/sdb4 /media/momedia/
mount: wrong fs type,or other error

然后我用相同的结果运行xfs_repair / dev / sdb4.

我第一次见到这样一个敏感的FS,你知道我能做些什么才能以更标准/兼容的方式安装这个?

已编辑以显示mount命令的完整系统日志.
另外,根据日志的建议将其设为只读,在Arch上失败:

# mount -t xfs -o ro /dev/sdb4 /mnt/tmp/
mount: mount /dev/sdb4 on /mnt/tmp Failed: Structure needs cleaning

解决方法

mkfs.xfs(从xfsprogs的3.2.4版本开始)最近默认为版本5超级块,具有许多新的增强功能,如元数据CRC校验和.版本5超级块需要3.16内核或更好.这个错误很典型,你试图在不支持v5超级块的内核上安装卷,即.即3.16之前的版本.

使用xfsprogs最新版本和旧内核时要小心.您必须使用这些选项来创建v4文件系统:

mkfs.xfs -m crc=0,finobt=0 /your/device

请注意,finobt选项可能没有必要.

另一方面,如果您需要检查或修复文件系统,最好使用最新的xfsprogs版本.

猜你在找的Linux相关文章