# experimental fs [solved]

## idella4

out of curiosity I tried to try out nilfs2 fs.  emerged the utils.

```

genny idella # time dd if=/dev/zero of=test.img count=8000 bs=512k oflag=direct 

genny idella # mkfs.nilfs2 test.img 

genny idella # mount -o loop test.img /mnt/tmp

mount: /dev/loop1: can't read superblock

```

So how can I use it if its own utils can't mount a file system in nilfs2?

----------

## aCOSwt

 *idella4 wrote:*   

> 
> 
> ```
> 
> ...
> ...

 

BTW, should'nt your fs be mounted by

# mount -t nilfs2

or

# mount.nilfs2

 :Question: 

----------

## keenblade

 *aCOSwt wrote:*   

> 
> 
> BTW, should'nt your fs be mounted by
> 
> # mount -t nilfs2
> ...

 

yes, he should use something like this:

```

mount -t nilfs2 -o loop test.img /mnt/tmp

```

----------

## idella4

 :Very Happy: 

that was easy   :Surprised: 

tx

----------

## keenblade

Please keep us informed with your nilfs2 experiment. It seems to be an interesting fs.

----------

## idella4

keenblade

If you're interested in it, how about btrfs??  See my other post.  I'm trying ddrescue and I don't quite get there.

I shall re-run the test I ran on btrfs and post you the output.

----------

## idella4

ok,

this test brought btrfs to its knees.  It has done similar to nilfs2 but with a marginally better result

```

genny ftp # time dd if=/dev/zero of=btrfs-fs.img count=10000 bs=512k oflag=direct 

genny ftp # mkfs.nilfs2 btrfs-fs.img

genny ftp # mv btrfs-fs.img test.img

genny ftp # mount -t nilfs2 -o loop test.img /mnt/ftp

genny ftp # cd /mnt/ftp

genny ftp # time dd if=/dev/zero of=tempfile count=7000 bs=512k oflag=direct

genny ftp # time cp -a /usr/portage/[a-t]* . 

.......................

cp: writing `./app-accessibility/brltty/brltty-4.1.ebuild': No space left on device

cp: writing `./app-accessibility/brltty/brltty-4.2.ebuild': No space left on device

cp: writing `./app-accessibility/brltty/ChangeLog': No space left on device

cp: writing `./app-accessibility/brltty/metadata.xml': No space left on device

cp: writing `./app-accessibility/dasher/Manifest': No space left on device

cp: writing `./app-accessibility/dasher/dasher-4.11.ebuild': No space left on device

cp: writing `./app-accessibility/dasher/dasher-4.10.1.ebuild': No space left on device

cp: writing `./app-accessibility/dasher/ChangeLog': No space left on device

genny ftp # df .

genny ftp # df .

Filesystem           1K-blocks      Used Available Use% Mounted on

/dev/loop1             5111804   4874236         0 100% /mnt/ftp

genny ftp # cp /usr/lib/libc.a . 

cp: cannot create regular file `./libc.a': No space left on device

genny ftp # echo 'some new text more' > new.txt 

bash: new.txt: No space left on device

genny ftp # find .|wc -l 

69172

genny ftp # \rm -rf dev-cpp 

genny ftp # df .

Filesystem           1K-blocks      Used Available Use% Mounted on

/dev/loop1             5111804   4874236         0 100% /mnt/ftp

genny ftp # cp /usr/lib/libc.a . 

cp: cannot create regular file `./libc.a': No space left on device

genny ftp # \rm -rf app*/   

genny ftp # df .

Filesystem           1K-blocks      Used Available Use% Mounted on

/dev/loop1             5111804   4874236         0 100% /mnt/ftp

genny ftp # ;s

bash: syntax error near unexpected token `;'

genny ftp # ls

dev-ada       dev-php5      games-arcade      games-sports    kde-misc

dev-db        dev-python    games-board       games-strategy  licenses

dev-dotnet    dev-ruby      games-emulation   games-util      lxde-base

dev-embedded  dev-scheme    games-engines     gnome-base      mail-client

dev-games     dev-tcltk     games-fps         gnome-extra     mail-filter

dev-haskell   dev-tex       games-kids        gnustep-apps    mail-mta

dev-java      dev-texlive   games-misc        gnustep-base    media-fonts

dev-lang      dev-tinyos    games-mud         gnustep-libs    media-gfx

dev-libs      dev-util      games-puzzle      gpe-base        media-libs

dev-lisp      dev-vcs       games-roguelike   gpe-utils       media-plugins

dev-ml        distfiles     games-rpg         header.txt      media-radio

dev-perl      eclass        games-server      java-virtuals   media-sound

dev-php       games-action  games-simulation  kde-base

genny ftp # \rm -rf dev*/

genny ftp # df .

Filesystem           1K-blocks      Used Available Use% Mounted on

/dev/loop1             5111804   4907004         0 100% /mnt/ftp

genny ftp # echo 'some new text more' > new.txt 

bash: new.txt: No space left on device

genny ftp # \rm -rf games*/

genny ftp # echo 'some new text more' > new.txt 

bash: new.txt: No space left on device

genny ftp # df .

Filesystem           1K-blocks      Used Available Use% Mounted on

/dev/loop1             5111804   4931580         0 100% /mnt/ftp

genny ftp # 

```

See the btrfs post by  devsk.

As you can see, the image file is filled, but despite a number of efforts it fails to register the deletions and free the previously used space.

I would next tree to unmount it and remount it and see if it gets to re-read free space correctly.

btrfs buckled badly.  While it did re-allocate freed space, it consistently misreads [under-reads] the correct size of the image file, thereby never using the full space.  Eventually my experimental btrfspartition failed along similar lines, resulting in the other post.

devsk had more drama with it than I did.

----------

## scherz0

 *Quote:*   

> As you can see, the image file is filled, but despite a number of efforts it fails to register the deletions and free the previously used space. 

 

Sounds good (this is a continuous snapshotting FS)

----------

## idella4

```

genny gentoo # mount -t nilfs2 -o loop test-fs.img /mnt/test

mount.nilfs2: WARNING! - The NILFS on-disk format may change at any time.

mount.nilfs2: WARNING! - Do not place critical data on a NILFS filesystem.

genny gentoo # cd /mnt/test

genny test # time dd if=/dev/zero of=btrfs-fs.img count=6000 bs=512k oflag=direct 

6000+0 records in

6000+0 records out

3145728000 bytes (3.1 GB) copied, 209.586 s, 15.0 MB/s

real    3m29.593s

user    0m0.016s

sys     0m6.358s

genny test # ls -l

total 3084100

-rw-r--r-- 1 root root 3145728000 Nov  4 10:10 btrfs-fs.img

/dev/loop0             5111804   3883004    966656  81% /mnt/test

genny test # touch new.txt

genny test # time cp -a /usr/portage/[a-d]* .

real    1m26.640s

user    0m0.276s

sys     0m2.468s

genny test # df .

Filesystem           1K-blocks      Used Available Use% Mounted on

/dev/loop0             5111804   4079612    770048  85% /mnt/test

genny test # time cp -a /usr/portage/[a-d]* .

real    0m21.608s

user    0m0.253s

sys     0m1.819s

genny test # ls   

app-accessibility  app-doc          app-office    dev-cpp       dev-lisp    dev-tex

app-admin          app-editors      app-pda       dev-db        dev-ml      dev-texlive

app-antivirus      app-emacs        app-portage   dev-dotnet    dev-perl    dev-tinyos

app-arch           app-emulation    app-shells    dev-embedded  dev-php     dev-util

app-backup         app-forensics    app-text      dev-games     dev-php5    dev-vcs

app-benchmarks     app-i18n         app-vim       dev-haskell   dev-python  distfiles

app-cdr            app-laptop       app-xemacs    dev-java      dev-ruby    new.txt

app-crypt          app-misc         btrfs-fs.img  dev-lang      dev-scheme

app-dicts          app-mobilephone  dev-ada       dev-libs      dev-tcltk

genny test # df .

Filesystem           1K-blocks      Used Available Use% Mounted on

/dev/loop0             5111804   4276220    573440  89% /mnt/test

genny test # rm -r app*/

genny test # df .

Filesystem           1K-blocks      Used Available Use% Mounted on

/dev/loop0             5111804   4276220    573440  89% /mnt/test

genny test # \rm tempfile 

genny test # df .

Filesystem           1K-blocks      Used Available Use% Mounted on

/dev/loop0             5111804   4325372    524288  90% /mnt/test

genny test # ls

dev-ada     dev-embedded  dev-lang  dev-perl    dev-ruby    dev-texlive  distfiles

dev-cpp     dev-games     dev-libs  dev-php     dev-scheme  dev-tinyos   new.txt

dev-db      dev-haskell   dev-lisp  dev-php5    dev-tcltk   dev-util

dev-dotnet  dev-java      dev-ml    dev-python  dev-tex     dev-vcs

```

Thus file system just fails to free space of deleted content.

----------

## keenblade

 *idella4 wrote:*   

> keenblade
> 
> If you're interested in it, how about btrfs??  See my other post.  I'm trying ddrescue and I don't quite get there.
> 
> I shall re-run the test I ran on btrfs and post you the output.

 

Thanks for sharing. I already gave up btrfs after following New filesystem: Btrfs! thread and others for a long time. For the "Edward and Chris's discussion", I think Edward is right and btrfs can not be trusted. Right now I am sticking with reiserfs that I am using since 2004 without a hitch. But I want to migrate to an up to date fs.

I thought that btrfs would be the next great thing. I was wrong. It seems, it is hard to find a fs with these options;  fast, reliable, has working recovery tools and online defrag.

Anyway, many thanks to you, devsk and others who test, spend time and share the results with us.

----------

## aCOSwt

 *keenblade wrote:*   

> It seems, it is hard to find a fs with these options;  fast, reliable, has working recovery tools and online defrag.

 

UFS2 ! 

- Fast...er than zfs  :Wink: 

- Reliable : Experimented for one year one system crash a week because of overheating and a couple of power failures, never lost any data, never crashed any FS.

- Working recovery tools... Hmmm... Not really needed !

- Online defrag... Hmmm... defrag ? What's defrag ? Meaningless with UFS2s !   :Twisted Evil: 

Well OK... I am off topic and support for this FS under Linux is... less than suboptimal... However...

I like spamming in favor of UFS2 !   :Twisted Evil: 

----------

## idella4

aCOSwt,

yes, off the topic pre se.  But isn't ufs the solaris file system?  The rare times I tried solaris, it had only ufs and had no std supply of drivers for any other file system, so could not access linux systems.

----------

## aCOSwt

 *idella4 wrote:*   

> But isn't ufs the solaris file system?

 

<trolling>well... I always thought it was a PlayStation invention...   :Twisted Evil:  </trolling>

UFS is a BSD invention.

I played with under a 4.2 hmmm... 25 years ago... about...  :Rolling Eyes: 

It was then ported / adapted to System V

From there... went to Solaris and FreeBSD

(And... incidentally !... to the PS as well ! True !)

I personally use UFS2+ under my FreeBSD servers.

On my OpenSolaris, I use ZFS which is now the standard for Solaris.

Rock Solid is its first characteristic but not as fast as UFS2 !

I am currently on my way, locally and personally on my spare time, trying to improve UFS2 support under Linux.

----------

## idella4

aCOSwt

I see.  25 years ago!  Oh.  You're way ahead of me.  I just type on my home pc.  I take it it's not yet available in any form for linux yet.  An emerge search reveals aufs2 which I can't tell if it's the same.

If you're that familiar with files systems, do you know how to help me in my other btrfs post to retrieve data so I can delete my 48 Gig image file of the corrupted btrfs file?

----------

## aCOSwt

 *idella4 wrote:*   

> I take it it's not yet available in any form for linux yet.

 

Well, approximately but not exactly right.

There is some beginning of native support in the kernel with the CONFIG_UFS_FS , CONFIG_UFS_FS_WRITE... flags (under FileSystems / Miscellaneous file systems )

Write support being rightly marked dangerous !

BTW, aufs is union fs which I know nothing about apart that this is a completely different matter...   :Twisted Evil: 

 *idella4 wrote:*   

> If you're that familiar with files systems, do you know how to help me in my other btrfs post to retrieve data so I can delete my 48 Gig image file of the corrupted btrfs file?

 

Well... I am familiar with file systems in the way that I know that I cannot be familiar with... more than one at a time...   :Rolling Eyes: 

I am afraid that I do not know btrfs enough to tell anything else than bs about it. (And BTW definitely forgot any interest in in it since the considerable 2.6.35 performance drops.)

Regarding your problem and where you are with it, I would quickly suggest to start a quick & dirty C program defining the Btree data stuctures as described in the specs and apply them to what you can take back with dd or cpio... But that just my 2 cts that are worth even less with btrfs.

----------

