Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
creating btrfs raid5 filesystem
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1210

PostPosted: Fri Feb 12, 2016 1:25 pm    Post subject: creating btrfs raid5 filesystem Reply with quote

I've formattted 4 x 1TB hard disks as follows:
mkfs.btrfs -m raid5 -d raid5 /dev/sdb /dev/sdc /dev/sde /dev/sdf

thinking this is the way to format a 3 TB + 1 TB of parity

I wanted to test out the FS, so I wrote as much zeroes as I can to test the caps of the FS:
dd if=/dev/zero of=test bs=1G count=4096

thinking it would run out of space at 3TB, it did not, I have 3.5 TB and it's still writing.
what am I doing wrong, I want to make sure this FS can tolerate the failure of 1 drive.

thanks
Back to top
View user's profile Send private message
ct85711
Veteran
Veteran


Joined: 27 Sep 2005
Posts: 1725

PostPosted: Fri Feb 12, 2016 1:56 pm    Post subject: Reply with quote

Quote:
I want to make sure this FS can tolerate the failure of 1 drive.


well, I would think the easy way to test that 1 drive failed, by simply unplugging one of the drives. It should fall into a degraded mode once the array is constructed.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6014

PostPosted: Fri Feb 12, 2016 2:00 pm    Post subject: Re: creating btrfs raid5 filesystem Reply with quote

Adel Ahmed wrote:
what am I doing wrong

Giving it a sparse file? Try /dev/full or /dev/urandom instead.
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2971
Location: Germany

PostPosted: Fri Feb 12, 2016 2:10 pm    Post subject: Reply with quote

I don't know how smart btrfs is but zeroes can be optimized away (not writing them in the first place, or compression, or deduplication).

Try with random data instead (shred or cryptsetup on a loop file - urandom is way too slow)
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1210

PostPosted: Fri Feb 12, 2016 4:20 pm    Post subject: Reply with quote

crpa I haed forgotten abo ut compression, I'll try again with shred, thanks
Back to top
View user's profile Send private message
Adel Ahmed
Veteran
Veteran


Joined: 21 Sep 2012
Posts: 1210

PostPosted: Sun Feb 14, 2016 10:57 am    Post subject: Reply with quote

ok so 3 days later, no I/O errors 3 TBs written and everything seems fine.

thanks everyone
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3723
Location: Hamburg

PostPosted: Mon Feb 15, 2016 10:56 am    Post subject: Re: creating btrfs raid5 filesystem Reply with quote

Ant P. wrote:
Try /dev/full or /dev/urandom instead.
Doesn't /dev/full returns '\0' too like /dev/null ?Try this :
Code:
for i in null zero full; do echo $i; dd if=/dev/$i bs=32 count=1 2>/dev/null | base64; done
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum