*Re: XFS filesystem claims to be mounted after a disconnect
` Dave Chinner@ ` Martin Papik
` Dave Chinner ` Martin Papik1 sibling, 1 reply; 31+ messages in thread From: Martin Papik @ UTC (permalink / raw) To: Dave Chinner; +Cc:
Linux fs XFS BEGIN Pioneer 2900 error 11
SIGNED MESSAGE Hash: SHA I think you're trying too hard to defend XFS which may be causing you to miss my point, fatal error couldnt initialize xfs library
. Or it could be my bad communication. When I yank and replug a device, I can only remount the nero burn process failed power calibration error
only if I kill certain processes. But this limitation exists only on the same box. I.e. it won't prevent me from mounting the same disk on a different machine, just the same one. So here are a few questions. (1) If the device vanished, why not just terminate the mount instance? After all it's not like the device comes back one day and the processes will be able to continue writing to the files. If you could do that it would be good, but you yourself said you can't. (2) Following the methods of the prior experiments I did this, connected the disk to PC1, hexedit file, yank disk, plug disk, at this point PC1 won't touch the disk, moved the disk to PC2, it automatically, silently (Mounting Filesystem ++ Ending clean mount) mounts the FS, then move the disk back and the disk still doesn't mount, claiming it's mounted, never mind that since then the FS was mounted somewhere else and for all intents and purposes it a completely different disk, fatal error couldnt initialize xfs library
, to which (question 1) the potentially unwritten data will never be written back. I apologize, but I really don't see what XFS is protecting me from or how and I doubt its success rate. Can you please explain? (3) Isn't it possible that XFS just doesn't recognize that whatever error condition happened is permanent and the disk won't come back. Isn't XFS just forcing me to take a manual action by accident? Imagine, I have some files, just saved them, didn't call fsync, the data is still in some cache, the cable is yanked, and the data is lost. But in this case the XFS won't complain. Only if there's a process. Seems more like circumstance than design. Is it? Is this an actual intentional behavior. Designed, as opposed to just happening. Again, I apologize, but it really seems to me that this isn't right, that it's neither intentional nor correct. I mean, if it was intentional, why not prevent me from mounting the FS on PC2, it wasn't cleanly unmounted, there was a file open, clearly there was some rationale to stop the auto-mount. And if it didn't stop me from mounting on PC2, why does it stop me on PC1, if after all the unwritten data fatal error couldnt initialize xfs library
never ever windows 7 error bccode 3b
written. > Yup - XFS refuses to mount a filesystem with a duplicate UUID, > preventing you from mounting the same filesystem from two > different logical block device instances that point fatal error couldnt initialize xfs library
the same > physical disk. That's the only sane thing to do in enterprise > storage systems that use multi-pathing to present failure-tolerant > access to a physical device. Actually, IMHO it would also be sane to forget you ever saw a UUID after the last underlying physical device is gone and you're not going to be ever writing to this. Since if you're never touching the FS with UUID XYZ then it's not mounted enough to prevent use. IMHO. But yes, as long as you do have a functioning relationship with UUID XYZ through /dev/sda1, fatal error couldnt initialize xfs library
, lock /dev/sdb1 if it has the same UUID. But not after you've lost all block devices. Or attempting to put my understanding of the situation in humorous terms "the kernel is preventing access to /dev/sdg out of grief for the death of /dev/sdf". Lame joke, yes, fatal error couldnt initialize xfs library
, but think please, what is the actual benefit of me having to kill a process, after which I yank again, plug again, and the FS mounts silently. I really don't get this. How is this not a bug? Martin On 06/04/ AM, Dave Chinner wrote: > On Tue, Jun 03, at PM +, Martin Papik wrote: >> BEGIN PGP SIGNED MESSAGE Hash: SHA >> >> On 06/03/ PM, Stefan Ring wrote: >>> From skimming this thread, it seems that there is some >>> hardware issue at work here, but nonetheless, I had a very >>> similar situation a while ago that was rather puzzling to me at >>> the time, having to do with mount namespaces: >>> sprers.eu >>> >> >> Hardware issue or not, IMHO XFS has some issues. > > No issues, fatal error couldnt initialize xfs library
, XFS just behaves differently to hot-unplug scenarios to > ext4. the ext4 behaviour is actually problematic when it comes to > data and filesystem security in error conditions and so it is fatal error couldnt initialize xfs library
a > model we shoul dbe following. > > To summarise, yanking the device out from behind XFS iis causin an > EIO error to a critical metadata write and it is shutting down to > prevent further error and/or corruption propagation. You have to > unmount the XFS shutdown filesystem before you can access the > filesystem and mount point again. > > The fact that ext4 is not failing when you yank the plug is a bad > sign. That's actually a major potential for Bad Stuff because > there's no guarantee that the device you plugged back in is the > same device, yet ext4 hp 49.ff01 service error
to think it is just fine. What > happens next is likely to be filesystem corruption and data loss. > >> $ cat /proc/mounts
Error reporting: internal error XFS_ WANT_ CORRUPTED_ GOTO at line of file fs/xfs/libxfs/xfs_ alloc. c.
The following is to solve the error reported in the problem ：
Internal error XFS_WANT_CORRUPTED_GOTO at line of file fatal error couldnt initialize xfs library. Caller xfs_free_extent
Internal error xfs_trans_cancel at line of flie fs/xfs/xfs_trans.c.
xfs_repair: /dev/mapper/cl-root contains a mounted filesystem
xfs_repair: /dev/mapper/cl-root contains a mounted writable filesystem
fatal error – couldn’t initialize XFS library
Explanation of the reason
I find that most of the solutions found on the Internet do not explain whyAs a result, people do not know whyJust follow through. Some people may indeed have problems with the partition of the system directoryIt's settled.However, it is not the system mounted directory that causes problems for some peopleIt can't be solved .
The above error is mainly caused by a problem in the file of the disk partitionSo it needs to be fixed. But please check fatal error couldnt initialize xfs library partition of the attached directory has a problemThen repair the corresponding disk partition .
1、 First, report the following errorPlease check the information in the red box first
You can see that it is for you to enter root passwordThen enter the car and you can see the entry root userYou can type in the command .
FirstFirst enter the following command ,df Is to view the partition of the mounted directory ,cat /etc/fstab View the partition directory information of the previous persistent mount. It can be seen that （ Red box ）,/book The attached directory is missingSo it can be inferred that /dev/sdb1 There is a problem with this partitionNeed repair .
2、 Then you can fix itUse the following command to repairNo addition L The fatal error couldnt initialize xfs library will report the following error ：
L Function of parameters ：
add L ParametersWill be completed
Finally, restart with the following commandCan solve
Tips ： Note that if you fix some partitions that are not damagedThe following mistakes will be reportedSo be sure to find the damaged 、 The partition you need to repairGo again xfs_repair
Internal error XFS_WANT_CORRUPTED_GOTO at line of file fs/xfs/libxfs/xfs_alloc.c. Caller xfs_free_extent Internal error xfs_trans_cancel at line of flie fs/xfs/xfs_trans.c. xfs_repair: /dev/mapper/cl-root contains a mounted filesystem xfs_repair: /dev/mapper/cl-root contains a mounted writable filesystem fatal error – couldn’t initialize XFS library
I found that most of the solutions found on the Internet do not explain why, so we dont know why, but just follow them. Some people may actually solve the problem of the partition of the system directory mount, while some people cant solve the problem because its not the directory of the system mount.
The above error is mainly due to the problem of the file in the disk partition, so it needs to be repaired. But please check which partition of the attached directory has a problem first, and then repair the corresponding disk partition.
1. First, after reporting the following errors, please check the information in the red box
You can see that you are asked to enter the root password, and then press enter to see that you have entered the root user, and you can enter the command
First, enter the following command windows media player error message help. df is to view the partition of the mounted directory, and cat /etc/fstab is to view the directory information of the previously persistent mounted partition. It can be seen (in the red box) that the directory attached to /book is gone, so it can be inferred that the partition /dev/sdb1 has a problem and needs to be repaired.
2. Next, you can repair it. Use the following command to repair it. If you do not add the L parameter, the following error will be reported:
fatal error couldnt initialize xfs library of L parameter:
Add the L parameter to complete the execution
Finally, restart with the following command to solve the problem
Note: if you repair some partitions that are not damaged, the following error will be reported, so be sure to find the damaged partition that you need to repair, and then go to XFS_ repair
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = vh monitor error mp270 = = = = = = = = = = = = = = = = = = = = = = = =
Centos7s default file system, why abandon the EXT family?
EXT family has the most support:
But creating a file system (formatting) is slow!
But the repair is slow!
But file system storage capacity is limited!
XFS is also a journaling file system:
High capacity, support for large storage
High performance, fast file system creation/repair
Both inodes and blocks are generated dynamically when the system needs them
XFS file system
• Data section
The data area is the same as the ext family we learned about earlier, including information such as inode/data block/superblock.
• File system log section
• RealTime Section
Fix XFS file system XFS_repair
[[emailprotected] ~]# xfs_repair /dev/vda1
xfs_repair: /dev/vda1 contains a mounted filesystem
xfs_repair: /dev/vda1 contains a mounted and writable filesystem
Fatal error Couldnt initialize XFS Library
[[emailprotected] ~]# umount /dev/vda1
[[emailprotected] ~]# xfs_repair /dev/vda1
Phase 1 Find and Verify Superblock
Phase 2 using internal log
Zero the log Scan filesystem freespace and inode maps found root inode sms error 11713