All of lore.kernel.org
 help / color / mirror / Atom feed
From: Donald Douwsma <donaldd@sgi.com>
To: Hxsrmeng <hxsrmeng@gmail.com>
Cc: linux-xfs@oss.sgi.com
Subject: Re: Newbie question about mkfs.xfs command
Date: Tue, 18 Sep 2007 10:50:01 +1000	[thread overview]
Message-ID: <46EF20B9.2060304@sgi.com> (raw)
In-Reply-To: <12745380.post@talk.nabble.com>

Hxsrmeng wrote:
> What does the second "loop" means in "mkfs.xfs -d file=loop loop"? Thanks.

The final parameter to mkfs.xfs needs to be a block device or a file.

In your case it looks like you intend to create a filesystem on a file
called loop (so you can mount it later as a loopback device?).

You dont need the '-d file=loop' (which is invalid, file= takes 1 or 0),
mkfs.xfs usually figures this out.


So assuming you created a test file with something like

# dd if=/dev/zero of=testfile bs=1k count=100000
100000+0 records in
100000+0 records out
102400000 bytes (102 MB) copied, 0.770193 seconds, 133 MB/s

You make an xfs filesystem with just

# mkfs.xfs testfile
meta-data=bar                    isize=256    agcount=6, agsize=4096 blks
          =                       sectsz=512   attr=0
data     =                       bsize=4096   blocks=24576, imaxpct=25
          =                       sunit=0      swidth=0 blks, unwritten=1
naming   =version 2              bsize=4096
log      =internal log           bsize=4096   blocks=1200, version=1
          =                       sectsz=512   sunit=0 blks, lazy-count=0
realtime =none                   extsz=4096   blocks=0, rtextents=0

And after making a mount point, mount it with

# mount -o loop testfile testmount

The -o loop tells mount to use a loopback device to turn your testfile into
a block device for the mount. This is the only step you need root permissions
for.

Don

      reply	other threads:[~2007-09-18  2:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-17 21:17 Newbie question about mkfs.xfs command Hxsrmeng
2007-09-18  0:50 ` Donald Douwsma [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46EF20B9.2060304@sgi.com \
    --to=donaldd@sgi.com \
    --cc=hxsrmeng@gmail.com \
    --cc=linux-xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.