* Sanity check - need a second pair of eyes ;-)
@ 2019-07-24 12:55 Carlos E. R.
2019-07-24 20:21 ` Eric Sandeen
0 siblings, 1 reply; 5+ messages in thread
From: Carlos E. R. @ 2019-07-24 12:55 UTC (permalink / raw)
To: Linux-XFS mailing list
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
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
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
= 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?
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)
-----BEGIN PGP SIGNATURE-----
iHoEARECADoWIQQZEb51mJKK1KpcU/W1MxgcbY1H1QUCXThVKRwccm9iaW4ubGlz
dGFzQHRlbGVmb25pY2EubmV0AAoJELUzGBxtjUfVwjkAn2q9VguiYTMF82FiN73c
p2HXDpo7AJ0ahR27m9vhfI0NYVePM6h91CtH8w==
=uH+3
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Sanity check - need a second pair of eyes ;-)
2019-07-24 12:55 Sanity check - need a second pair of eyes ;-) Carlos E. R.
@ 2019-07-24 20:21 ` Eric Sandeen
2019-07-25 6:04 ` Carlos E. R.
0 siblings, 1 reply; 5+ messages in thread
From: Eric Sandeen @ 2019-07-24 20:21 UTC (permalink / raw)
To: Carlos E. R., Linux-XFS mailing list
[-- 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 --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Sanity check - need a second pair of eyes ;-)
2019-07-24 20:21 ` Eric Sandeen
@ 2019-07-25 6:04 ` Carlos E. R.
2019-07-25 12:11 ` Carlos Maiolino
0 siblings, 1 reply; 5+ messages in thread
From: Carlos E. R. @ 2019-07-25 6:04 UTC (permalink / raw)
To: Linux-XFS mailing list
[-- Attachment #1.1: Type: text/plain, Size: 2744 bytes --]
On 24/07/2019 22.21, Eric Sandeen wrote:
...
>> 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.
Thanks.
(Yes, I looked at the manual but did not /see/ aka understand what I really needed).
My page is a little bit different:
-s sector_size_options
This option specifies the fundamental sector size of
the filesystem. The valid sector_size_option is:
size=value
The sector size is specified with a value
in bytes. 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.
To specify any options on the command line
in units of sectors, this option must be
specified first so that the sector size is
applied consistently to all options.
Thus the final command line was:
# mkfs.xfs -L ANameUnseen -s size=2048 /dev/mapper/cr_nombre
meta-data=/dev/mapper/cr_nombre isize=512 agcount=4, agsize=3054592 blks
= sectsz=2048 attr=2, projid32bit=1
= crc=1 finobt=1, sparse=0, rmapbt=0
= reflink=0
data = bsize=4096 blocks=12218368, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0, ftype=1
log =internal log bsize=4096 blocks=5966, version=2
= sectsz=2048 sunit=1 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
--
Cheers / Saludos,
Carlos E. R.
(from 15.0 x86_64 at Telcontar)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Sanity check - need a second pair of eyes ;-)
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.
0 siblings, 1 reply; 5+ messages in thread
From: Carlos Maiolino @ 2019-07-25 12:11 UTC (permalink / raw)
To: Carlos E. R.; +Cc: Linux-XFS mailing list
>
> Thanks.
>
> (Yes, I looked at the manual but did not /see/ aka understand what I really needed).
>
> My page is a little bit different:
>
> -s sector_size_options
> This option specifies the fundamental sector size of
> the filesystem. The valid sector_size_option is:
>
> size=value
> The sector size is specified with a value
> in bytes. 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.
>
> To specify any options on the command line
> in units of sectors, this option must be
> specified first so that the sector size is
> applied consistently to all options.
There was an update on the manpage past year which changed this section, the
usage is the same.
>
> Thus the final command line was:
>
> # mkfs.xfs -L ANameUnseen -s size=2048 /dev/mapper/cr_nombre
Looks correct.
But I apologize if it's a dumb question, but what do you expect to achieve by
setting the sector size here? You will be essentially writing the fs image file
over the BluRay Filesystem (which IIRC uses UDF), so, the sector size set on
your xfs filesystem image won't matter much, unless I'm missing something, which
is exactly why I'm asking it :)
Cheers
> meta-data=/dev/mapper/cr_nombre isize=512 agcount=4, agsize=3054592 blks
> = sectsz=2048 attr=2, projid32bit=1
> = crc=1 finobt=1, sparse=0, rmapbt=0
> = reflink=0
> data = bsize=4096 blocks=12218368, imaxpct=25
> = sunit=0 swidth=0 blks
> naming =version 2 bsize=4096 ascii-ci=0, ftype=1
> log =internal log bsize=4096 blocks=5966, version=2
> = sectsz=2048 sunit=1 blks, lazy-count=1
> realtime =none extsz=4096 blocks=0, rtextents=0
>
>
> --
> Cheers / Saludos,
>
> Carlos E. R.
> (from 15.0 x86_64 at Telcontar)
>
--
Carlos
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Sanity check - need a second pair of eyes ;-) -- DVD mount error
2019-07-25 12:11 ` Carlos Maiolino
@ 2019-07-25 16:53 ` Carlos E. R.
0 siblings, 0 replies; 5+ messages in thread
From: Carlos E. R. @ 2019-07-25 16:53 UTC (permalink / raw)
To: Linux-XFS mailing list
[-- Attachment #1.1: Type: text/plain, Size: 4248 bytes --]
On 25/07/2019 14.11, Carlos Maiolino wrote:
> But I apologize if it's a dumb question, but what do you expect to achieve by
> setting the sector size here? You will be essentially writing the fs image file
> over the BluRay Filesystem (which IIRC uses UDF), so, the sector size set on
> your xfs filesystem image won't matter much, unless I'm missing something, which
> is exactly why I'm asking it :)
Not dumb question - I'm burning directly the XFS image raw to the DVD, as if it were an ISO :-)
But the image is encrypted with LUKS - that's the purpose, to get encrypted DVDs. password protected UDF would be fine, though, but no such thing exists.
I have not used the procedure for years, though. DVD are too small; now I got a blueray writer I'm trying again after a decade.
The basic procedure is this: <https://www.frederickding.com/posts/2017/08/luks-encrypted-dvd-bd-data-disc-guide-273316/>, but my procedure is older than that, I created it myself IIRC.
This is the configuration; file /etc/crypttab contains:
crmm_dvd.l /dev/dvd.l none noauto,loop
crmm_dvd.lr /dev/dvd.lr none noauto,loop
crmm_dvd.lx /dev/dvd.lx none noauto,loop
(tried also without "loop")
/dev/dvd.lx is a symlink to /dev/dvd
/etc/fstab:
/dev/mapper/crmm_dvd.l /mnt/dvd.crypta.l auto ro,noauto,user,lazytime 0 0
/dev/mapper/crmm_dvd.lr /mnt/dvd.crypta.lr reiserfs ro,noauto,user,lazytime,barrier=flush 0 0
/dev/mapper/crmm_dvd.lx /mnt/dvd.crypta.lx xfs ro,noauto,user,lazytime 0 0
(I have a script to automate decoding and mount, but this time I'm doing manually to show the steps)
I'm getting a problem on mount, though :
... # cryptsetup luksOpen /dev/dvd crmm_dvd.lx
Enter passphrase for /dev/dvd:
... # l /dev/mapper/
total 0
drwxr-xr-x 2 root root 120 Jul 25 18:17 ./
drwxr-xr-x 22 root root 7580 Jul 25 18:16 ../
crw------- 1 root root 10, 236 Jul 23 11:41 control
...
lrwxrwxrwx 1 root root 7 Jul 25 18:17 crmm_dvd.lx -> ../dm-2
... #
... # mount -v /dev/mapper/crmm_dvd.lx /mnt/dvd.crypta.lx
mount: /mnt/dvd.crypta.lx: mount(2) system call failed: Function not implemented. <=============== HERE ==============
#
Possible related to this log entry:
<0.4> 2019-07-25 18:19:19 Telcontar kernel - - - [127181.795181] XFS (dm-2): device supports 2048 byte sectors (not 512)
This worked years ago with plain DVDs. I can mount the dd image out of the dvd into the hard disk, though:
dd if=/dev/dvd of=out.img bs=16M
BLUERAY_OPS # losetup -f out.img
BLUERAY_OPS # losetup -a
/dev/loop1: [2087]:1209048961 (/home_aux/BLUERAY_OPS/out.img)
/dev/loop0: [2087]:1209048958 (/home_aux/BLUERAY_OPS/image_1_50.img)
BLUERAY_OPS # cryptsetup luksOpen /dev/loop1 cr_dvdimage
Enter passphrase for /dev/loop1:
BLUERAY_OPS # md mnt2
BLUERAY_OPS # mount -v /dev/mapper/cr_dvdimage ./mnt2
mount: /dev/mapper/cr_dvdimage mounted on /home_aux/BLUERAY_OPS/mnt2.
BLUERAY_OPS #
BLUERAY_OPS # file out.img
out.img: LUKS encrypted file, ver 2 [, , sha256] UUID: 0f73c10a-b3e0-4b1b-b124-567abef92fa1
Telcontar:/home_aux/BLUERAY_OPS #
BLUERAY_OPS # file -s /dev/mapper/cr_dvdimage
/dev/mapper/cr_dvdimage: symbolic link to ../dm-3
BLUERAY_OPS # file -s /dev/dm-3
/dev/dm-3: SGI XFS filesystem data (blksz 2048, inosz 512, v2 dirs)
BLUERAY_OPS #
BLUERAY_OPS # file -s /dev/dm-2 # that's the decoded DVD
/dev/dm-2: SGI XFS filesystem data (blksz 2048, inosz 512, v2 dirs)
BLUERAY_OPS
Telcontar:/home_aux/BLUERAY_OPS # df -h ./mnt2
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/cr_dvdimage 47G 47G 183M 100% /home_aux/BLUERAY_OPS/mnt2
Telcontar:/home_aux/BLUERAY_OPS #
Telcontar:/home_aux/BLUERAY_OPS # df -H ./mnt2
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/cr_dvdimage 51G 50G 192M 100% /home_aux/BLUERAY_OPS/mnt2
Telcontar:/home_aux/BLUERAY_OPS #
--
Cheers / Saludos,
Carlos E. R.
(from 15.0 x86_64 at Telcontar)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-07-25 16:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-24 12:55 Sanity check - need a second pair of eyes ;-) Carlos E. R.
2019-07-24 20:21 ` Eric Sandeen
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.
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.