[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How file store when using Btrfs on multi-devices? What happen when a device fail?



On Thu, May 3, 2012 at 1:46 PM, Chu Duc Minh <chu.ducminh@xxxxxxxxx> wrote:
> Hi, i have some questions when using Btrfs on multi-devices:
> 1. a large file will always be stored wholely on a device or it may
> spread on some devices/partitions?

IIRC:
- in raid1 mode, it will be written on all disks (or was it TWO disks,
regarless how many device in a mirror? can't remember which).
- in raid10 and raid0, it will always be spread, on a minimum of two devices

> Btrfs has option to specify it
> explicitly?

Not that I know of.

> 2. suppose i have a directory tree like that:
> Dir_1
>  |--> file_1A
>  |--> file_1B
>  |--> Dir_2
>          |--> file_2C
>          |--> file_2D
>
> If Dir_2, file_2C  on a failed device, can i still have access to file_2D?

Unless you're using raid10, my guess is you'll be screwed, as each
file will be spread on multiple devices (including the one that
fails).

> If i use GlusterFS (mirror mode) on two nodes, each nodes run Btrfs on
> multi-device. When a device on a node fail and I replace it, then
> GlusterFS resync it, can i have troubles with data consistency?

This question might be more suitable on glusterfs list. My guess is
that glusterfs will discard all data on the failed node. After you
recreate the storage backend (the btrfs, on a new device), you can
tell glusterfs to copy everything from the good node.

Of course, if you use raid10 mode in btrfs, and only one device fail,
it should be transparent to end users.

-- 
Fajar
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]    [Yosemite Photos]    [Free Online Dating]     [Linux Kernel]     [Linux SCSI]     [XFree86]

Add to Google Powered by Linux