I''ve tried setting up a raid1 on two drives like this:
mkfs.btrfs -m raid1 -d raid1 /dev/sdb /dev/sdc
Then I copy my old install onto the new drives, and check the drives''
status:
# mount | grep "on / "
/dev/sdb on / type btrfs (rw,noatime)
# btrfs fi df /
Data, RAID1: total=259.00GB, used=256.64GB
Data: total=8.00MB, used=0.00
System, RAID1: total=8.00MB, used=44.00KB
System: total=4.00MB, used=0.00
Metadata, RAID1: total=4.50GB, used=1.27GB
Metadata: total=8.00MB, used=0.00
# btrfs fi show
Label: none uuid: c6c89292-ea29-484c-ad29-9003a5fedf90
Total devices 2 FS bytes used 257.93GB
devid 1 size 931.51GB used 263.53GB path /dev/sdb
devid 2 size 931.51GB used 263.51GB path /dev/sdc
Label: none uuid: 6f2f8317-3012-4e79-a82d-ab2e8eaa6cd6
Total devices 1 FS bytes used 354.99GB
devid 1 size 465.65GB used 465.65GB path /dev/sda2
My interpretation of the above data is that /dev/sdb and /dev/sdc are
exact mirrors of each other, and contain my / root partition.
This would make complete sense if it wasn''t for the fact that
I''ve
copied all the data from /dev/sda2 onto /dev/sdb. From the information
above, it looks like the data has been split like in raid-0, instead
of the what I expect, mirrored like in raid-1.
I tried reading the FAQ about "Why are there so many ways to check the
amount of free space?" hoping this would make it more clear, but it
doesn''t. Can anyone tell me what''s going on?
I found one thread with a similar question that went unanswered, and
it was also back in 2008 so the answer might differ quite a bit
anyway.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs"
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Sun, May 1, 2011 at 12:33 PM, Claes Gyllenswärd <letharion@gmail.com> wrote:> I''ve tried setting up a raid1 on two drives like this: > > mkfs.btrfs -m raid1 -d raid1 /dev/sdb /dev/sdc > > Then I copy my old install onto the new drives, and check the drives'' status: > > # mount | grep "on / " > /dev/sdb on / type btrfs (rw,noatime) > # btrfs fi df / > Data, RAID1: total=259.00GB, used=256.64GB > Data: total=8.00MB, used=0.00 > System, RAID1: total=8.00MB, used=44.00KB > System: total=4.00MB, used=0.00 > Metadata, RAID1: total=4.50GB, used=1.27GB > Metadata: total=8.00MB, used=0.00 > # btrfs fi show > Label: none uuid: c6c89292-ea29-484c-ad29-9003a5fedf90 > Total devices 2 FS bytes used 257.93GB > devid 1 size 931.51GB used 263.53GB path /dev/sdb > devid 2 size 931.51GB used 263.51GB path /dev/sdc > > Label: none uuid: 6f2f8317-3012-4e79-a82d-ab2e8eaa6cd6 > Total devices 1 FS bytes used 354.99GB > devid 1 size 465.65GB used 465.65GB path /dev/sda2 > > My interpretation of the above data is that /dev/sdb and /dev/sdc are > exact mirrors of each other, and contain my / root partition. > > This would make complete sense if it wasn''t for the fact that I''ve > copied all the data from /dev/sda2 onto /dev/sdb. From the information > above, it looks like the data has been split like in raid-0, instead > of the what I expect, mirrored like in raid-1. > > I tried reading the FAQ about "Why are there so many ways to check the > amount of free space?" hoping this would make it more clear, but it > doesn''t. Can anyone tell me what''s going on? > > I found one thread with a similar question that went unanswered, and > it was also back in 2008 so the answer might differ quite a bit > anyway.How did you copy it exactly? I see 100gb missing, which makes me wonder if you maybe had subvolumes on sdb, and used the -x option to rsync or similar: subvolumes count as different mounts for the purposes of --one-file-system''like options. Can you provide the df -h output for both filesystems, as well as the btrfs fi df for /dev/sda2? The total reported by du -sh for each would be useful as well as a sanity check. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
2011/5/1 cwillu <cwillu@cwillu.com>:> On Sun, May 1, 2011 at 12:33 PM, Claes Gyllenswärd <letharion@gmail.com> wrote: >> I''ve tried setting up a raid1 on two drives like this: >> >> mkfs.btrfs -m raid1 -d raid1 /dev/sdb /dev/sdc >> >> Then I copy my old install onto the new drives, and check the drives'' status: >> >> # mount | grep "on / " >> /dev/sdb on / type btrfs (rw,noatime) >> # btrfs fi df / >> Data, RAID1: total=259.00GB, used=256.64GB >> Data: total=8.00MB, used=0.00 >> System, RAID1: total=8.00MB, used=44.00KB >> System: total=4.00MB, used=0.00 >> Metadata, RAID1: total=4.50GB, used=1.27GB >> Metadata: total=8.00MB, used=0.00 >> # btrfs fi show >> Label: none uuid: c6c89292-ea29-484c-ad29-9003a5fedf90 >> Total devices 2 FS bytes used 257.93GB >> devid 1 size 931.51GB used 263.53GB path /dev/sdb >> devid 2 size 931.51GB used 263.51GB path /dev/sdc >> >> Label: none uuid: 6f2f8317-3012-4e79-a82d-ab2e8eaa6cd6 >> Total devices 1 FS bytes used 354.99GB >> devid 1 size 465.65GB used 465.65GB path /dev/sda2 >> >> My interpretation of the above data is that /dev/sdb and /dev/sdc are >> exact mirrors of each other, and contain my / root partition. >> >> This would make complete sense if it wasn''t for the fact that I''ve >> copied all the data from /dev/sda2 onto /dev/sdb. From the information >> above, it looks like the data has been split like in raid-0, instead >> of the what I expect, mirrored like in raid-1. >> >> I tried reading the FAQ about "Why are there so many ways to check the >> amount of free space?" hoping this would make it more clear, but it >> doesn''t. Can anyone tell me what''s going on? >> >> I found one thread with a similar question that went unanswered, and >> it was also back in 2008 so the answer might differ quite a bit >> anyway. > > How did you copy it exactly? I see 100gb missing, which makes me > wonder if you maybe had subvolumes on sdb, and used the -x option to > rsync or similar: subvolumes count as different mounts for the > purposes of --one-file-system''like options. > > Can you provide the df -h output for both filesystems, as well as the > btrfs fi df for /dev/sda2? > The total reported by du -sh for each would be useful as well as a sanity check. >My apologies, it appears that I''ve made a mistake and mixed up my numbers. Your remark that I was missing 100gb made me re reformat the raid and copy over my data again. This time everything looks as expected. Thank you for your time. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html