LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-15-2010, 04:29 AM   #1
ethereal1m
Member
 
Registered: Jan 2010
Distribution: Ubuntu
Posts: 312

Rep: Reputation: 31
Question Using mkfs to format device


Dear all,
I'm trying to format a device into XFS filesystem using mkfs command. Suppose I have a /dev/sda1 device with 4096 block and I want to format the whole thing, how can I execute the command? I keep getting various errors while executing it...

Regards,
ethereal1m
 
Old 09-15-2010, 04:37 AM   #2
eco
Member
 
Registered: May 2006
Location: BE
Distribution: Debian/Gentoo
Posts: 412

Rep: Reputation: 48
Hi,
we'll need to get the commands you tried and the errors you got to be able to help you. I suspect however that a quick read of the man page should help solve your problem.
 
Old 09-15-2010, 04:57 AM   #3
ethereal1m
Member
 
Registered: Jan 2010
Distribution: Ubuntu
Posts: 312

Original Poster
Rep: Reputation: 31
I read the manual.
Ok last time I tried:
Code:
mkfs -t xfs -b size=4096b /dev/sda1
I got:
Code:
blocksize not available yet
That is one one them... any suggestion?
 
Old 09-15-2010, 05:06 AM   #4
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Rep: Reputation: 129Reputation: 129
According to "man mkfs.xfs" your command is not correct.
 
Old 09-15-2010, 05:29 AM   #5
ethereal1m
Member
 
Registered: Jan 2010
Distribution: Ubuntu
Posts: 312

Original Poster
Rep: Reputation: 31
hm, when I do
Code:
mkfs.xfs /dev/sda1
I got
Code:
agsize (2008b) is too small, neet at least 4096 block
when I do
Code:
mkfs.xfs -d agsize=4096 /dev/sda1
I got
Code:
blocksize not available yet
Any idea?
 
Old 09-15-2010, 05:47 AM   #6
ethereal1m
Member
 
Registered: Jan 2010
Distribution: Ubuntu
Posts: 312

Original Poster
Rep: Reputation: 31
but when I do
Code:
mkfs -t ext3 /dev/sda1
this works, how come?
 
Old 09-15-2010, 05:58 AM   #7
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Something strange is going on because the default block size is 4096.
 
1 members found this post helpful.
Old 09-15-2010, 06:18 AM   #8
ethereal1m
Member
 
Registered: Jan 2010
Distribution: Ubuntu
Posts: 312

Original Poster
Rep: Reputation: 31
ok this is my bad, this
Quote:
default block size is 4096.
makes me realize that I partitioned the device incorrectly (it was 8M size space).

Thanks for the help
 
  


Reply



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
Difference between mkfs.vfat and mkfs.msdos? EmrldDrgn Linux - Newbie 6 07-23-2009 03:27 AM
how to format a usb device? topheraholic Linux - Newbie 6 05-10-2009 08:16 AM
format of logical disk device names ahmedb72 Solaris / OpenSolaris 2 07-07-2007 11:49 PM
bash cant find format or mkfs command Dunadan1821 Linux - Software 3 08-12-2004 01:27 PM
Format a device in Linux? subnet Linux - General 8 09-17-2003 04:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:01 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
Open Source Consulting | Domain Registration