linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* raid1 not reporting the right size
@ 2010-05-27 19:43 gmack
  2010-05-27 19:51 ` Chris Ball
  2010-05-27 20:04 ` raid1 not reporting the right size Josef Bacik
  0 siblings, 2 replies; 6+ messages in thread
From: gmack @ 2010-05-27 19:43 UTC (permalink / raw)
  To: linux-btrfs

I'm trying to create a raid1 (mirrored) raid using two 1 Tb disks.
The result is something twice as large as it should be fore mirrored raid.

Any ideas? Linux version 2.6.34

# mkfs.btrfs -d raid1 -m raid1 /dev/sdb1 /dev/sdc1 -L fhome

WARNING! - Btrfs Btrfs v0.19 IS EXPERIMENTAL
WARNING! - see http://btrfs.wiki.kernel.org before using

adding device /dev/sdc1 id 2
fs created label fhome on /dev/sdb1
        nodesize 4096 leafsize 4096 sectorsize 4096 size 1.82TB
Btrfs Btrfs v0.19

# mount /dev/sdb1 /mnt/
# df -h /mnt/
Filesystem            Size  Used Avail Use% Mounted on
/dev/sdb1             1.9T   56K  1.9T   1% /mnt

# btrfs-show
failed to read /dev/sr0
Label: none  uuid: a2aa44b8-3168-480a-a155-d510e05853e7
        Total devices 1 FS bytes used 617.45MB
        devid    1 size 29.33GB used 6.79GB path /dev/sda2

Label: fhome  uuid: 128ddab5-224d-4f45-abc0-6a07d0f63d47
        Total devices 2 FS bytes used 28.00KB
        devid    2 size 931.51GB used 2.01GB path /dev/sdc1
        devid    1 size 931.51GB used 2.03GB path /dev/sdb1

--
Gerhard Mack

gmack@innerfire.net

<>< As a computer I find your faith in technology amusing.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: raid1 not reporting the right size
  2010-05-27 19:43 raid1 not reporting the right size gmack
@ 2010-05-27 19:51 ` Chris Ball
  2010-05-28 18:45   ` linux 2.6.34 raid1 btrfs weird mounting issue gmack
  2010-05-27 20:04 ` raid1 not reporting the right size Josef Bacik
  1 sibling, 1 reply; 6+ messages in thread
From: Chris Ball @ 2010-05-27 19:51 UTC (permalink / raw)
  To: gmack; +Cc: linux-btrfs

Hi,

   > I'm trying to create a raid1 (mirrored) raid using two 1 Tb
   > disks.  The result is something twice as large as it should be
   > fore mirrored raid.

https://btrfs.wiki.kernel.org/index.php/FAQ#Why_does_df_show_incorrect_free_space_for_my_RAID_volume.3F

-- 
Chris Ball   <cjb@laptop.org>
One Laptop Per Child

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: raid1 not reporting the right size
  2010-05-27 19:43 raid1 not reporting the right size gmack
  2010-05-27 19:51 ` Chris Ball
@ 2010-05-27 20:04 ` Josef Bacik
  1 sibling, 0 replies; 6+ messages in thread
From: Josef Bacik @ 2010-05-27 20:04 UTC (permalink / raw)
  To: gmack; +Cc: linux-btrfs

On Thu, May 27, 2010 at 03:43:05PM -0400, gmack@innerfire.net wrote:
> I'm trying to create a raid1 (mirrored) raid using two 1 Tb disks.
> The result is something twice as large as it should be fore mirrored raid.
> 
> Any ideas? Linux version 2.6.34
> 
> # mkfs.btrfs -d raid1 -m raid1 /dev/sdb1 /dev/sdc1 -L fhome
> 
> WARNING! - Btrfs Btrfs v0.19 IS EXPERIMENTAL
> WARNING! - see http://btrfs.wiki.kernel.org before using
> 
> adding device /dev/sdc1 id 2
> fs created label fhome on /dev/sdb1
>         nodesize 4096 leafsize 4096 sectorsize 4096 size 1.82TB
> Btrfs Btrfs v0.19
> 
> # mount /dev/sdb1 /mnt/
> # df -h /mnt/
> Filesystem            Size  Used Avail Use% Mounted on
> /dev/sdb1             1.9T   56K  1.9T   1% /mnt
> 
> # btrfs-show
> failed to read /dev/sr0
> Label: none  uuid: a2aa44b8-3168-480a-a155-d510e05853e7
>         Total devices 1 FS bytes used 617.45MB
>         devid    1 size 29.33GB used 6.79GB path /dev/sda2
> 
> Label: fhome  uuid: 128ddab5-224d-4f45-abc0-6a07d0f63d47
>         Total devices 2 FS bytes used 28.00KB
>         devid    2 size 931.51GB used 2.01GB path /dev/sdc1
>         devid    1 size 931.51GB used 2.03GB path /dev/sdb1
> 

Used will show up as twice the amount that is actually used, instead of looking
like you only have 1/2 the capacity.  Thanks,

Josef

^ permalink raw reply	[flat|nested] 6+ messages in thread

* linux 2.6.34 raid1 btrfs weird mounting issue
  2010-05-27 19:51 ` Chris Ball
@ 2010-05-28 18:45   ` gmack
  2010-05-28 18:52     ` Sebastian 'gonX' Jensen
  2010-05-28 19:06     ` Goffredo Baroncelli
  0 siblings, 2 replies; 6+ messages in thread
From: gmack @ 2010-05-28 18:45 UTC (permalink / raw)
  To: linux-btrfs

I had my raid set to mount by uuid but that randomly doesn't work so I 
changed to mounting by the first partition in the raid.. that worked but 
on the next reboot it failed.  Changing the mount to the second partition 
worked until the next reboot when I needed it to change it back to the 
first.  Each change seems to last for one reboot.


# mount /dev/sdb1  /home
mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

# mount /dev/sdb1  /home
mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

mount /dev/sdc1  /home
(worked)
# btrfs-show
failed to read /dev/sr0
Label: none  uuid: a2aa44b8-3168-480a-a155-d510e05853e7
        Total devices 1 FS bytes used 5.46GB
        devid    1 size 29.33GB used 13.29GB path /dev/sda2

Label: fhome  uuid: 128ddab5-224d-4f45-abc0-6a07d0f63d47
        Total devices 2 FS bytes used 8.24GB
        devid    1 size 931.51GB used 21.03GB path /dev/sdb1
        devid    2 size 931.51GB used 21.01GB path /dev/sdc1


	Gerhard


--
Gerhard Mack

gmack@innerfire.net

<>< As a computer I find your faith in technology amusing.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux 2.6.34 raid1 btrfs weird mounting issue
  2010-05-28 18:45   ` linux 2.6.34 raid1 btrfs weird mounting issue gmack
@ 2010-05-28 18:52     ` Sebastian 'gonX' Jensen
  2010-05-28 19:06     ` Goffredo Baroncelli
  1 sibling, 0 replies; 6+ messages in thread
From: Sebastian 'gonX' Jensen @ 2010-05-28 18:52 UTC (permalink / raw)
  To: gmack, linux-btrfs

On 28 May 2010 20:45,  <gmack@innerfire.net> wrote:
> I had my raid set to mount by uuid but that randomly doesn't work so =
I
> changed to mounting by the first partition in the raid.. that worked =
but
> on the next reboot it failed. =C2=A0Changing the mount to the second =
partition
> worked until the next reboot when I needed it to change it back to th=
e
> first. =C2=A0Each change seems to last for one reboot.
>
>
> # mount /dev/sdb1 =C2=A0/home
> mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
> =C2=A0 =C2=A0 =C2=A0 missing codepage or helper program, or other err=
or
> =C2=A0 =C2=A0 =C2=A0 In some cases useful info is found in syslog - t=
ry
> =C2=A0 =C2=A0 =C2=A0 dmesg | tail =C2=A0or so
>
> # mount /dev/sdb1 =C2=A0/home
> mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
> =C2=A0 =C2=A0 =C2=A0 missing codepage or helper program, or other err=
or
> =C2=A0 =C2=A0 =C2=A0 In some cases useful info is found in syslog - t=
ry
> =C2=A0 =C2=A0 =C2=A0 dmesg | tail =C2=A0or so
>
> mount /dev/sdc1 =C2=A0/home
> (worked)
> # btrfs-show
> failed to read /dev/sr0
> Label: none =C2=A0uuid: a2aa44b8-3168-480a-a155-d510e05853e7
> =C2=A0 =C2=A0 =C2=A0 =C2=A0Total devices 1 FS bytes used 5.46GB
> =C2=A0 =C2=A0 =C2=A0 =C2=A0devid =C2=A0 =C2=A01 size 29.33GB used 13.=
29GB path /dev/sda2
>
> Label: fhome =C2=A0uuid: 128ddab5-224d-4f45-abc0-6a07d0f63d47
> =C2=A0 =C2=A0 =C2=A0 =C2=A0Total devices 2 FS bytes used 8.24GB
> =C2=A0 =C2=A0 =C2=A0 =C2=A0devid =C2=A0 =C2=A01 size 931.51GB used 21=
=2E03GB path /dev/sdb1
> =C2=A0 =C2=A0 =C2=A0 =C2=A0devid =C2=A0 =C2=A02 size 931.51GB used 21=
=2E01GB path /dev/sdc1
>
>
> =C2=A0 =C2=A0 =C2=A0 =C2=A0Gerhard
>
>
> --
> Gerhard Mack
>
> gmack@innerfire.net
>
> <>< As a computer I find your faith in technology amusing.
> --
> 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 =C2=A0http://vger.kernel.org/majordomo-info.ht=
ml
>

Did you check output from dmesg?
--
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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: linux 2.6.34 raid1 btrfs weird mounting issue
  2010-05-28 18:45   ` linux 2.6.34 raid1 btrfs weird mounting issue gmack
  2010-05-28 18:52     ` Sebastian 'gonX' Jensen
@ 2010-05-28 19:06     ` Goffredo Baroncelli
  1 sibling, 0 replies; 6+ messages in thread
From: Goffredo Baroncelli @ 2010-05-28 19:06 UTC (permalink / raw)
  To: gmack; +Cc: linux-btrfs

Hi Gerhard

On Friday, May 28, 2010, gmack@innerfire.net wrote:
> I had my raid set to mount by uuid but that randomly doesn't work so I 
> changed to mounting by the first partition in the raid.. that worked but 
> on the next reboot it failed.  Changing the mount to the second partition 
> worked until the next reboot when I needed it to change it back to the 
> first.  Each change seems to last for one reboot.


Do you perform a "scan" before mounting the first time (after a reboot) a 
multivolume btrfs filesystem ?
On the basis of your report it seems no.  

Btrfs requires to know where the components of a multi-volume filesystem are. 
To do that, you have to "scan" the devices, explicitly

	# btrfs scan /dev/sdX1 /dev/sdx2 ...

or implicitly

        # btrfs scan

In the last case the btrfs command scans every block device (even the cdrom 
and/or floppy).

For other information you may want to read this thread which suggests how udev 
can perform the scan.

http://kerneltrap.org/mailarchive/linux-btrfs/2010/4/16/6884594

Regards



> 
> 
> # mount /dev/sdb1  /home
> mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
>        missing codepage or helper program, or other error
>        In some cases useful info is found in syslog - try
>        dmesg | tail  or so
> 
> # mount /dev/sdb1  /home
> mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
>        missing codepage or helper program, or other error
>        In some cases useful info is found in syslog - try
>        dmesg | tail  or so
> 
> mount /dev/sdc1  /home
> (worked)
> # btrfs-show
> failed to read /dev/sr0
> Label: none  uuid: a2aa44b8-3168-480a-a155-d510e05853e7
>         Total devices 1 FS bytes used 5.46GB
>         devid    1 size 29.33GB used 13.29GB path /dev/sda2
> 
> Label: fhome  uuid: 128ddab5-224d-4f45-abc0-6a07d0f63d47
>         Total devices 2 FS bytes used 8.24GB
>         devid    1 size 931.51GB used 21.03GB path /dev/sdb1
>         devid    2 size 931.51GB used 21.01GB path /dev/sdc1
> 
> 
> 	Gerhard
> 
> 
> --
> Gerhard Mack
> 
> gmack@innerfire.net
> 
> <>< As a computer I find your faith in technology amusing.
> --
> 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
> 


-- 
gpg key@ keyserver.linux.it: Goffredo Baroncelli (ghigo) <kreijackATinwind.it>
Key fingerprint = 4769 7E51 5293 D36C 814E  C054 BF04 F161 3DC5 0512

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-05-28 19:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-27 19:43 raid1 not reporting the right size gmack
2010-05-27 19:51 ` Chris Ball
2010-05-28 18:45   ` linux 2.6.34 raid1 btrfs weird mounting issue gmack
2010-05-28 18:52     ` Sebastian 'gonX' Jensen
2010-05-28 19:06     ` Goffredo Baroncelli
2010-05-27 20:04 ` raid1 not reporting the right size Josef Bacik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).