You are not logged in.

#1 2021-06-08 21:37:38

Registered: 2013-04-17
Posts: 10

[SOLVED] btrfs raid0 no more data after umount and mount

EDIT : I must have done a mistake, challenging periods. I did a test, writing data, reboot, data are still there. So no real solution here, but I keep in mind that the issue is somewhere between the chair and the keyboard big_smile


I setup a new raid0 with btrfs, the 3rd in the output. It is related to /dev/mapper because I use encrypted devices with luks. As you can read, there is only 896 KiB used but each devices has 1.51GiB, which is not the size I expect.

sudo btrfs fi show
Label: none  uuid: 582e8442-ddeb-4cf2-9713-d3d1d4af604d
        Total devices 2 FS bytes used 4.26GiB
        devid    1 size 1.82TiB used 3.51GiB path /dev/mapper/wdc-2to-001
        devid    2 size 1.82TiB used 3.51GiB path /dev/mapper/tosh-2to-001

Label: none  uuid: 8fc3d2c7-3fe4-4720-b02e-10bac7ca08e3
        Total devices 1 FS bytes used 369.92GiB
        devid    1 size 698.62GiB used 372.02GiB path /dev/mapper/storage

Label: none  uuid: 7c1fc864-4eb3-490b-adb0-6b663ada9902
        Total devices 2 FS bytes used 896.00KiB
        devid    1 size 3.64TiB used 1.51GiB path /dev/mapper/tosh-4to-001
        devid    2 size 3.64TiB used 1.51GiB path /dev/mapper/tosh-4to-002

I made my raid0 with

sudo mkfs.btrfs -d raid0 -m raid0 /dev/mapper/tosh-4to-001 /dev/mapper/tosh-4to-002

I made a dir in /mnt called tosh-8to-001 and I mount and copy data in. As I changed my mind for the folder name I did umount and change the folder name and mount again. But there is no data, and I was expected more 600GiB of data not even 1.51GiB.

I watched in my history and the umount was done at line 270, where the rm was done at line 401 and the mount to the new folder at line 403.

I am currently using testdisk and photorec, but it will take a long time. Do you know what was happening and a way to fix/prevent this behavior. Or may be, I did something bad and I will learn with the way no pain no gain smile

Last edited by liochan (2021-06-09 11:11:33)


Board footer

Powered by FluxBB