On Wed, Jul 8, 2015 at 3:37 PM, Carlos E. R.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
On 2015-07-08 16:46, Chris Murphy wrote:
And two disk RAID 5 is the same thing as mirroring except also weird so why bother?
A two disk raid 5 is "degraded", and it will complain till you complete it.
mkfs.btrfs does not complain at mkfs time or mount time for a 2 device raid5. [1] mdadm -C does not complain at create time or mkfs time for a 2 device raid5. [2] Neither are considered degraded. However, lvcreate complains at create time for a 2 device raid5. [3] So clearly this depends on implementation. [1] [root@localhost ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sr0 11:0 1 1024M 0 rom vda 252:0 0 40G 0 disk └─vda1 252:1 0 40G 0 part / vdb 252:16 0 10G 0 disk vdc 252:32 0 10G 0 disk [root@localhost ~]# mkfs.btrfs -m raid5 -d raid5 /dev/vdb /dev/vdc btrfs-progs v4.1 See http://btrfs.wiki.kernel.org for more information. Label: (null) UUID: 16fdf954-ad92-4360-93ad-0041664bbd91 Node size: 16384 Sector size: 4096 Filesystem size: 20.00GiB Block group profiles: Data: RAID5 1.01GiB Metadata: RAID5 1.01GiB System: RAID5 12.00MiB SSD detected: no Incompat features: extref, raid56, skinny-metadata Number of devices: 2 Devices: ID SIZE PATH 1 10.00GiB /dev/vdb 2 10.00GiB /dev/vdc [root@localhost ~]# mount /dev/vdb /mnt [root@localhost ~]# btfs fi show /mnt bash: btfs: command not found... [root@localhost ~]# btrfs fi show /mnt Label: none uuid: 16fdf954-ad92-4360-93ad-0041664bbd91 Total devices 2 FS bytes used 640.00KiB devid 1 size 10.00GiB used 2.03GiB path /dev/vdb devid 2 size 10.00GiB used 2.01GiB path /dev/vdc btrfs-progs v4.1 [root@localhost ~]# btrfs fi df /mnt Data, single: total=8.00MiB, used=0.00B Data, RAID5: total=1.00GiB, used=512.00KiB System, single: total=4.00MiB, used=0.00B System, RAID5: total=8.00MiB, used=16.00KiB Metadata, single: total=8.00MiB, used=0.00B Metadata, RAID5: total=1.00GiB, used=112.00KiB GlobalReserve, single: total=16.00MiB, used=0.00B [2] [root@localhost ~]# mdadm -C /dev/md0 -n 2 -l raid5 --assume-clean /dev/vdb /dev/vdc mdadm: Defaulting to version 1.2 metadata mdadm: array /dev/md0 started. [root@localhost ~]# mdadm -E /dev/vdb /dev/vdb: Magic : a92b4efc Version : 1.2 Feature Map : 0x0 Array UUID : 1a6cb32c:84aa0f29:27b255f9:0838034b Name : localhost.localdomain:0 (local to host localhost.localdomain) Creation Time : Thu Jul 9 09:16:22 2015 Raid Level : raid5 Raid Devices : 2 Avail Dev Size : 20955136 (9.99 GiB 10.73 GB) Array Size : 10477568 (9.99 GiB 10.73 GB) Data Offset : 16384 sectors Super Offset : 8 sectors Unused Space : before=16296 sectors, after=0 sectors State : clean Device UUID : 599dc079:b7afcc9e:869a74eb:0831cd84 Update Time : Thu Jul 9 09:16:22 2015 Bad Block Log : 512 entries available at offset 72 sectors Checksum : 8c195d60 - correct Events : 0 Layout : left-symmetric Chunk Size : 512K Device Role : Active device 0 Array State : AA ('A' == active, '.' == missing, 'R' == replacing) [root@localhost ~]# mdadm -D /dev/md0 /dev/md0: Version : 1.2 Creation Time : Thu Jul 9 09:16:22 2015 Raid Level : raid5 Array Size : 10477568 (9.99 GiB 10.73 GB) Used Dev Size : 10477568 (9.99 GiB 10.73 GB) Raid Devices : 2 Total Devices : 2 Persistence : Superblock is persistent Update Time : Thu Jul 9 09:16:22 2015 State : clean Active Devices : 2 Working Devices : 2 Failed Devices : 0 Spare Devices : 0 Layout : left-symmetric Chunk Size : 512K Name : localhost.localdomain:0 (local to host localhost.localdomain) UUID : 1a6cb32c:84aa0f29:27b255f9:0838034b Events : 0 Number Major Minor RaidDevice State 0 252 16 0 active sync /dev/vdb 1 252 32 1 active sync /dev/vdc [root@localhost ~]# cat /proc/mdstat Personalities : [raid6] [raid5] [raid4] md0 : active raid5 vdc[1] vdb[0] 10477568 blocks super 1.2 level 5, 512k chunk, algorithm 2 [2/2] [UU] unused devices: <none> [3] [root@localhost ~]# lvcreate -L 15G -n lv5 --type raid5 rtest Number of stripes must be at least 2 for raid5 -- Chris Murphy -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org