LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-04-2019, 07:52 AM   #1
ddenial
Member
 
Registered: Dec 2016
Distribution: CentOS, Fedora, Ubuntu
Posts: 207

Rep: Reputation: 37
Create XFS partition with bad block pr-echeck


Hello

I want to install CentOS 7 with the XFS filesystem. But I want to do pre-check for bad blocks before creating partitions. In ext4, there is a -c switch which will check for bad blocks before creating the filesystem. How do I do that for the XFS filesystem?

Thanks
 
Old 12-04-2019, 08:01 AM   #2
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: A few
Posts: 3,709

Rep: Reputation: 1010Reputation: 1010Reputation: 1010Reputation: 1010Reputation: 1010Reputation: 1010Reputation: 1010Reputation: 1010
There is a tool named badblocks. See, for example, https://www.tecmint.com/check-linux-...ors-bad-blocks or https://wiki.archlinux.org/index.php/Badblocks. Use badblocks before creating the filesystem.
 
1 members found this post helpful.
Old 12-04-2019, 09:01 AM   #3
ddenial
Member
 
Registered: Dec 2016
Distribution: CentOS, Fedora, Ubuntu
Posts: 207

Original Poster
Rep: Reputation: 37
Quote:
Originally Posted by berndbausch View Post
There is a tool named badblocks. See, for example, https://www.tecmint.com/check-linux-...ors-bad-blocks or https://wiki.archlinux.org/index.php/Badblocks. Use badblocks before creating the filesystem.
Thanks. I read the articles and from that what I understand is you first run badblocks with -o options which will create a text file with bad sector addresses, then use that text file with mkfs.ext4 -l <textfile> option. This will tell the formatting program to skip those addresses.

But the problem is, in mkfs.xfs, -l has a different meaning.

Quote:
$ man mkfs.ext4
-l filename
Read the bad blocks list from filename. Note that the block numbers in the bad block list must be generated using the same block size as used by mke2fs. As a result, the -c option to mke2fs is a much simpler and less error-prone method of checking a disk for bad blocks before formatting it, as mke2fs will automatically pass the correct parameters to the badblocks program.
Quote:
$ man mkfs.xfs
-l log_section_options
These options specify the location, size, and other parameters of the log section of the filesystem. The valid log_section_options are:
 
Old 12-04-2019, 09:17 AM   #4
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: A few
Posts: 3,709

Rep: Reputation: 1010Reputation: 1010Reputation: 1010Reputation: 1010Reputation: 1010Reputation: 1010Reputation: 1010Reputation: 1010
I must have been brain-dead when replying. To my knowledge, XFS doesn't have bad block treatment, although there seems to be a plan to include it in the future.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Centos 7 / xfs : is there a reserved space setting for xfs like there is in ext4? chrism01 Linux - Server 5 09-13-2019 09:03 AM
LXer: Create LVM Partition with XFS/Ext4 File Systems on RHEL and Debian LXer Syndicated Linux News 0 06-05-2018 01:00 AM
Bad disk, bad disk controller, or bad memory? NULL Pointer Linux - General 2 03-01-2009 06:21 PM
Bad mount of .mdf - "wrong fs type, bad option, bad superblock, on /dev/loop0" Maybe-not Linux - General 2 02-29-2008 02:30 PM
kdebase not recognizing XFree86-xfs package as xfs mikeyt_333 Linux - Software 1 08-17-2004 02:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration