NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: disks, partitions, slices, etc.





El 9/10/26 a las 11:25, Ramiro Aceves escribió:
Interesting thing found here:

https://marc.info/?l=netbsd-users&m=158685461020265&w=2

it recommends to disable dir_index and ext_attr features at the moment of filesystem creation.

mkfs.ext2 -O^dir_index,^ext_attr /dev/device

I am considering to recreate the ext2 filesystem disabling those two parameters for maximum NetBSD/Linux compatibility.

Regards.
Ramiro.

Hello,

I have recreated my shared between Linux and NetBSD ext2 filesystem using e2fsprogs from NetBSD and I have written the backupped data.

I have removed the conflicting ext2  dir_index and ext_attr features during filesystem creation.

I have been testing back and forth Linux and NetBSD mounts, it seems to work. I am going to torture it with rsync in the next days.
Please note that when creating ext2 filesystem I specify fs-size just in case it did not detect automatically partition size as I
experienced with my preliminary pendrive tests.



Netbsd-nuc# fdisk /dev/sd0
fdisk: Cannot determine the number of heads
Disk: /dev/sd0
NetBSD disklabel disk geometry:
cylinders: 1907697, heads: 64, sectors/track: 32 (2048 sectors/cylinder)
total sectors: 3906963456, bytes/sector: 512

BIOS disk geometry:
cylinders: 1023, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
total sectors: 3906963456

Partitions aligned to 2048 sector boundaries, offset 2048

Partition table:
0: Linux native (sysid 131)
    start 2048, size 3906961408 (1907696 MB, Cyls 0-243197/57/60)
        PBR is not bootable: All bytes are identical (0x00)
1: <UNUSED>
2: <UNUSED>
3: <UNUSED>
No active partition.
Drive serial number: 2845861010 (0xa9a06492)


netbsd-nuc# disklabel sd0
# /dev/rsd0:
type: SCSI
disk: Elements 2621
label: fictitious
flags:
bytes/sector: 512
sectors/track: 32
tracks/cylinder: 64
sectors/cylinder: 2048
cylinders: 1907697
total sectors: 3906963456
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0		# microseconds
track-to-track seek: 0	# microseconds
drivedata: 0

5 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 d: 3906963456         0     unused      0     0        # (Cyl.      0 - 1907696)
 e: 3906961408      2048 Linux Ext2      0     0        # (Cyl.      1 - 1907696)
disklabel: boot block size 0
disklabel: super block size 0



netbsd-nuc# mkfs.ext2 -O^dir_index,^ext_attr /dev/rsd0e 1953480704
mke2fs 1.47.4 (6-Mar-2025)
atención: no se puede obtener la geometría del dispositivo para /dev/rsd0e
Se está creando un sistema de ficheros con 488370176 bloques de 4k y 122093568 nodos-i
UUID del sistema de ficheros: 8c32b600-2180-4c55-9c6a-e5b7b4bf134b
Respaldos del superbloque guardados en los bloques:
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
	4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
	102400000, 214990848

Reservando las tablas de grupo: hecho
Escribiendo las tablas de nodos-i: hecho
Escribiendo superbloques y la información contable del sistema de ficheros: hecho


netbsd-nuc# tune2fs -l /dev/sd0e
tune2fs 1.47.4 (6-Mar-2025)
Filesystem volume name:   <none>
Last mounted on:          <not available>
Filesystem UUID:          8c32b600-2180-4c55-9c6a-e5b7b4bf134b
Filesystem magic number:  0xEF53
Filesystem revision #:    1 (dynamic)
Filesystem features:      resize_inode filetype sparse_super large_file
Filesystem flags:         signed_directory_hash
Default mount options:    user_xattr acl
Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              122093568
Block count:              488370176
Reserved block count:     24418508
Overhead clusters:        7680131
Free blocks:              480690039
Free inodes:              122093557
First block:              0
Block size:               4096
Fragment size:            4096
Reserved GDT blocks:      907
Blocks per group:         32768
Fragments per group:      32768
Inodes per group:         8192
Inode blocks per group:   512
Filesystem created:       Sat Oct 17 19:21:28 2026
Last mount time:          n/a
Last write time:          Sat Oct 17 20:58:27 2026
Mount count:              0
Maximum mount count:      -1
Last checked:             Sat Oct 17 19:21:28 2026
Check interval:           0 (<none>)
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group wheel)
First inode:              11
Inode size:               256
Required extra isize:     32
Desired extra isize:      32
Default directory hash:   half_md4
Directory Hash Seed:      a638973d-17b7-42e5-ac6d-1a0e56f35106
netbsd-nuc#


Home | Main Index | Thread Index | Old Index