ext2 or ext3 usage

Antonio Huete Jimenez ahuete.devel at gmail.com
Sun Feb 9 11:03:11 PST 2014


Hi guys,

Soon we expect to have sys/e2fsprogs available in DPorts. After that,
you could just do:

[nas] ~# mkfs.ext2 -O ^resize_inode /dev/vn0s1a
mke2fs 1.42.9 (28-Dec-2013)
success!
Filesystem label=
OS type: BSD
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
65536 inodes, 261879 blocks
13093 blocks (5.00%) reserved for the super user
First data block=0
8 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376

Allocating group tables: done
Writing inode tables: done
Writing superblocks and filesystem accounting information: done

[nas] ~# mount -t ext2fs /dev/vn0s1a /mnt
[nas] /mnt# dd if=/dev/zero of=test.img bs=1m count=256
237+0 records in
236+0 records out
247463936 bytes transferred in 5.989009 secs (41319681 bytes/sec)
256+0 records in
256+0 records out
268435456 bytes transferred in 6.544944 secs (41014171 bytes/sec)
[nas] /mnt# cp -r /bin .
[nas] /mnt# ls t-lhr
ls: t-lhr: No such file or directory
[nas] /mnt# ls -tlhr
total 262424
drwx------  2 root  wheel    16K Feb  9 19:58 lost+found
-rw-r--r--  1 root  wheel   256M Feb  9 19:59 test.img
drwxr-xr-x  2 root  wheel   4.0K Feb  9 19:59 bin
[nas] /mnt# df -T .
Filesystem   Type   1K-blocks   Used  Avail Capacity  Mounted on
/dev/vn0s1a  ext2fs   1031028 278876 699780    28%    /mnt

Our ext2fs code is quite old, and there is at least one known issue
with double buffers, which would panic when bufcache buffers overlap.
Although not recommended you could "ignore" it by setting
vfs.hammer.double_buffer to 1.

Cheers,
Antonio Huete

2014-02-09 11:25 GMT+01:00 Matthias Rampke <matthias.rampke at googlemail.com>:
> Hi,
>
> this may have changed somewhat recently, but last time I attempted to
> use ext2/3 under *BSD (which AFAIK mostly share the driver) the
> situation was:
>
> * ext3 won't work
> * ext2 created with the default mke2fs settings won't work (unsupported options)
> * very basic, oldskool ext2 might work, but I haven't found the right
> settings yet
>
> I didn't pursue it further at the time.
>
> Best,
> Matthias
>
> On Tue, Dec 24, 2013 at 6:32 AM, Andrey Oktyabrskiy <ano at bestmx.net> wrote:
>> Good day.
>>
>> Is it possible to mount ext2 or (better) ext3 FS in r/w mode under dfly?
>> I've tried to mount both with the same result:
>> $ sudo mount_ext2fs /dev/da0s2 /UNIT
>> mount_ext2fs: /dev/da0s2: Invalid argument
>> $ sudo fdisk /dev/da0
>> ******* Working on device /dev/da0 *******
>> parameters extracted from device are:
>> cylinders=121126 heads=256 sectors/track=63 (16128 blks/cyl)
>>
>> Figures below won't work with BIOS for partitions not in cyl 1
>> parameters to be used for BIOS calculations are:
>> cylinders=121126 heads=256 sectors/track=63 (16128 blks/cyl)
>>
>> Media sector size is 512
>> Warning: BIOS sector numbering starts with sector 1
>> Information from DOS bootblock is:
>> The data for partition 1 is:
>> sysid 165,(DragonFly/FreeBSD/NetBSD/386BSD)
>>     start 2079, size 134204931 (65529 Meg), flag 80 (active)
>>         beg: cyl 0/ head 33/ sector 1;
>>         end: cyl 1023/ head 255/ sector 63
>> The data for partition 2 is:
>> sysid 131,(Linux filesystem)
>>     start 134219776, size 1819303936 (888332 Meg), flag 0
>>         beg: cyl 1023/ head 254/ sector 63;
>>         end: cyl 1023/ head 254/ sector 63
>> The data for partition 3 is:
>> <UNUSED>
>> The data for partition 4 is:
>> <UNUSED>
>>
>> What I do wrong?


More information about the Users mailing list