All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: "Carlos E. R." <robin.listas@telefonica.net>,
	Linux-XFS mailing list <linux-xfs@vger.kernel.org>
Subject: Re: Sanity check - need a second pair of eyes ;-)
Date: Wed, 24 Jul 2019 15:21:52 -0500	[thread overview]
Message-ID: <4a352054-9a04-433f-979c-d28584e13b4c@sandeen.net> (raw)
In-Reply-To: <alpine.LSU.2.21.1907241443520.12992@Telcontar.valinor>


[-- Attachment #1.1: Type: text/plain, Size: 2496 bytes --]

> 
> 
> Hi,
> 
> I'm trying to create an XFS image to be written on a Blue Ray disk, encrypted. I'm told that DVDs have a sector size of 2 KiB, thus it is beter to tell the formatting utility of that, because when creating the image file it is on a hard disk where sector size is 512B.
> 
> Basic procedure:
> 
> truncate -s 50050629632 image_1_50.img
> losetup -f image_1_50.img
> cryptsetup luksFormat --type luks2 --label blueray50img /dev/loop0
> cryptsetup luksOpen /dev/loop0 cr_nombre
> 
> 
> So now I have the image file loop mounted on /dev/mapper/cr_nombre, and I do (this is the step I ask about):
> 
> Telcontar:/home_aux/BLUERAY_OPS # mkfs.xfs -L ANameUnseen -b size=2048 /dev/mapper/cr_nombre
                                                             ^^^ block size

> meta-data=/dev/mapper/cr_nombre  isize=512    agcount=4, agsize=6109184 blks
>          =                       sectsz=512   attr=2, projid32bit=1
>          =                       crc=1        finobt=1, sparse=0, rmapbt=0
>          =                       reflink=0
> data     =                       bsize=2048   blocks=24436736, imaxpct=25
                                   ^^^ block size
>          =                       sunit=0      swidth=0 blks
> naming   =version 2              bsize=4096   ascii-ci=0, ftype=1
> log      =internal log           bsize=2048   blocks=11932, version=2
>          =                       sectsz=512   sunit=0 blks, lazy-count=1
> realtime =none                   extsz=4096   blocks=0, rtextents=0
> Telcontar:/home_aux/BLUERAY_OPS #
> 
> 
> Is that the correct command line to achieve written sectors of 2 KiB?

If you want to set the sector size, the instructions are in the man page for
mkfs.xfs ;)

       -s sector_size
              This  option  specifies  the  fundamental  sector  size  of  the
              filesystem.  The sector_size is specified either as a  value  in
              bytes  with  size=value  or  as  a base two logarithm value with
              log=value.  The default sector_size is 512  bytes.  The  minimum
              value for sector size is 512; the maximum is 32768 (32 KiB). The
              sector_size must be a power of 2 size and cannot be made  larger
              than the filesystem block size.

-Eric

> I ask because I see isize=512 and sectsz=512 and I wonder.
> 
> 
> -- Cheers,
>        Carlos E. R.
>        (from openSUSE 15.0 x86_64 at Telcontar)
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 873 bytes --]

  reply	other threads:[~2019-07-24 20:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-24 12:55 Sanity check - need a second pair of eyes ;-) Carlos E. R.
2019-07-24 20:21 ` Eric Sandeen [this message]
2019-07-25  6:04   ` Carlos E. R.
2019-07-25 12:11     ` Carlos Maiolino
2019-07-25 16:53       ` Sanity check - need a second pair of eyes ;-) -- DVD mount error Carlos E. R.

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=4a352054-9a04-433f-979c-d28584e13b4c@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=linux-xfs@vger.kernel.org \
    --cc=robin.listas@telefonica.net \
    /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.