NetBSD-Users archive

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

Re: disks, partitions, slices, etc.



Hello,

I did another experiment, I decided to create an ext2 partition using e2fsprogs from pkgsrc instead of the NetBSD newfs_ext2 that failed before. Soon I found another problem, first try it was a disaster:

disklabel status:


netbsd-nuc# disklabel sd1
# /dev/rsd1:
type: SCSI
disk:  SanDisk 3.2Gen1
label: fictitious
flags: removable
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 65535
total sectors: 120164352
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: 120164352         0     unused      0     0        # (Cyl.      0 - 119210*)
 e: 120164289        63 Linux Ext2      0     0        # (Cyl.      0*- 119210*)
disklabel: boot block size 0
disklabel: 


I created the filesystem, sorry for the Spanish messages but I only have them in my native language:


netbsd-nuc# mkfs.ext2 /dev/rsd1e
mke2fs 1.47.4 (6-Mar-2025)
atención: no se puede obtener la geometría del dispositivo para /dev/rsd1e
Se está creando un sistema de ficheros con 15020544 bloques de 4k y 3760128 nodos-i
UUID del sistema de ficheros: b8cf226c-eb90-4a5f-84aa-524aedb10928
Respaldos del superbloque guardados en los bloques: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
	4096000, 7962624, 11239424

Reservando las tablas de grupo: hecho                           
mkfs.ext2: El intento de escribir un bloque en el sistema de ficheros resultó en una escritura corta mientras se inicializaba a cero el bloque 15020528 al final del sistema de ficheros
Escribiendo las tablas de nodos-i: hecho                           
Escribiendo superbloques y la información contable del sistema de ficheros:   0/hecho


I ignored messages, mounted it (NetBSD did not complain),  copied several GB of data and when rebooted and tried to mount it in Linux:

root@debian-nuc8i7:~# mount -t ext2 /dev/sdc1 /root/disco_ext4/
mount: /root/disco_ext4: wrong fs type, bad option, bad superblock on /dev/sdc1, missing codepage or helper program, or other error.
       dmesg(1) may have more information after failed mount system call.
root@debian-nuc8i7:~#

dmesg errors:


[   86.542088] EXT4-fs (sdc1): mounting ext2 file system using the ext4 subsystem
[   86.542101] EXT4-fs (sdc1): bad geometry: block count 15020544 exceeds size of device (15020536 blocks)
root@debian-nuc8i7:~#


I realized that the errors shown by mkfs.ext2 when formating the partition with ext2 filesystem made sense. mkfs.ext2 did not automatically get right the size of the partition and was writting beyond the limits of the partition.

I solved it specifying the right size in mkfs.ext2 command.

I copied several GB of data that could be read fine on Linux. I created several GB of directories in Linux that I could read again in NetBSD. I seems to work fine, at least as a initial compatibility test.

Regards.










-- 
Ramiro Aceves <ea1abz%gmail.com@localhost>


Home | Main Index | Thread Index | Old Index