[opensuse] invalid blocks on mke2fs?
So I was trying to mount the drive that I removed from the raid partition yesterday (and zeroed the superblock with mdadm), in order to use it for something else. It is formatted as ext4. When I try to mount it, I got an error that said something about the device not being clean and unable to mount. So I ran # e2fsck -y -f -v /dev/sdb5 and it took about 20 minutes to cycle through a ton of block errors, moving things to the lost + found folder, etc. There seems to be some problem, I am sure it is related to this partition being part of a raid before, but no longer. I tried to run this e2fsck again, and it ran again, again taking a long time (like 20 minutes) to fix (again) errors in the partition. So I opened up gparted, formatted the partition as ntfs, then reformatted it to ext4 again. Now when I run e2fsck, it is ok, but I think there is still a problem. Here is why. First, e2fsck: # e2fsck -y -f -v /dev/sdb5 e2fsck 1.42.11 (09-Jul-2014) Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information 11 inodes used (0.00%, out of 1921360) 0 non-contiguous files (0.0%) 0 non-contiguous directories (0.0%) # of inodes with ind/dind/tind blocks: 0/0/0 Extent depth histogram: 3 164604 blocks used (2.14%, out of 7680000) 0 bad blocks 1 large file 0 regular files 2 directories 0 character device files 0 block device files 0 fifos 0 links 0 symbolic links (0 fast symbolic links) 0 sockets ------------ 2 files It mounts ok now, and unmounts ok. But when I try this, there is a problem: # mke2fs -c -L root1bak ext4 -v /dev/sdb5 mke2fs 1.42.11 (09-Jul-2014) mke2fs: invalid blocks '/dev/sdb5' on device 'ext4' What does 'invalid blocks' mean? And how do I fix this? I want to make sure this partition is fully functional before I use it. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
01.02.2017 06:05, george from the tribe пишет:
But when I try this, there is a problem: # mke2fs -c -L root1bak ext4 -v /dev/sdb5 mke2fs 1.42.11 (09-Jul-2014) mke2fs: invalid blocks '/dev/sdb5' on device 'ext4'
What does 'invalid blocks' mean? And how do I fix this?
You are attempting to create filesystem with size "/dev/sdb5" on device "ext4". Is it what you really intend to do? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 01/31/2017 10:38 PM, Andrei Borzenkov wrote:
01.02.2017 06:05, george from the tribe пишет:
But when I try this, there is a problem: # mke2fs -c -L root1bak ext4 -v /dev/sdb5 mke2fs 1.42.11 (09-Jul-2014) mke2fs: invalid blocks '/dev/sdb5' on device 'ext4'
What does 'invalid blocks' mean? And how do I fix this?
You are attempting to create filesystem with size "/dev/sdb5" on device "ext4". Is it what you really intend to do?
Well, yes there is that LOL! If you really really really do want to deal with bad blocks, the ... FIRST run the 'badblocks, tool on the physical device or partition. See BADBLOCKS(8) In particular note the caveat about block size. Depending on the parameters and the size of the drive/partition this may take some time. I once had a new gigadisk that was giving problems and ran this to give evidence to the vendor for returning it. That ran all day and all night. NEXT use the output of that with the 'e2fsck' to fix the file system. Or, if you are doing a 'mkfs.ext4', use the "-l" option to make use of the list generated by 'badblocks'. Yes, 'mkfs.ext4' does have the "-c" parameter to do its own checking. I don't think it is so configurable or as flexible as 'badblocks'. However using it does get around any mismatch issue about blocksize, so the manual page recommends that. YMMV -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
george from the tribe composed on 2017-02-01 11:05 (UTC+0800):
when I try this, there is a problem: # mke2fs -c -L root1bak ext4 -v /dev/sdb5 mke2fs 1.42.11 (09-Jul-2014) mke2fs: invalid blocks '/dev/sdb5' on device 'ext4'
You made ext4 an orphan. I looks ot me like mke2fs thinks the device name is ext4, and /dev/sdb5 has something to do with which blocks you want to check. Put "-t " in front of ext4, or use mkfs.ext4 instead of mke2fs. -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 02/01/2017 11:41 AM, Felix Miata wrote:
george from the tribe composed on 2017-02-01 11:05 (UTC+0800):
when I try this, there is a problem: # mke2fs -c -L root1bak ext4 -v /dev/sdb5 mke2fs 1.42.11 (09-Jul-2014) mke2fs: invalid blocks '/dev/sdb5' on device 'ext4'
You made ext4 an orphan. I looks ot me like mke2fs thinks the device name is ext4, and /dev/sdb5 has something to do with which blocks you want to check. Put "-t " in front of ext4, or use mkfs.ext4 instead of mke2fs.
Thank you to you both. I got it now! -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2017-02-01 04:05, george from the tribe wrote:
So I opened up gparted, formatted the partition as ntfs, then reformatted it to ext4 again.
A format doesn't erase blocks, it only writes a few structures at the start of the disk. Mostly. If you want to do something that clears entirely the disk, just overwrite it with zeroes: dd if=/dev/zero of=/dev/sdb5 just be careful not to write any typo: it will zero anything you tell it even if wrong. -- Cheers / Saludos, Carlos E. R. (from 42.2 x86_64 "Malachite" at Telcontar)
participants (5)
-
Andrei Borzenkov
-
Anton Aylward
-
Carlos E. R.
-
Felix Miata
-
george from the tribe