Skip to contentSkip to conversation

Understanding DF, etc.

DISCUSSION Helmut Hullen 2 participants 2 messages May 15, 2011 1 message not in the archive Btrfs file system

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hallo, Hugo,

Du meintest am 15.05.11:

Quoted 17 lines
Quoted 9 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
# btrfs fi df /
Data: total=3D74.01GB, used=3D72.77GB
System, DUP: total=3D8.00MB, used=3D16.00KB
System: total=3D4.00MB, used=3D0.00
Metadata, DUP: total=3D1.75GB, used=3D657.48MB
Metadata: total=3D8.00MB, used=3D0.00

I don't know what's the meaning of the type "DUP" (instead of "RAID0" or "RAID1" in my example).

DUP is a form of RAID-1 for single disks. Like RAID-1, it stores
two copies of the data, but where RAID-1 guarantees that the two copies will be on different devices, DUP stores both copies on the same device. btrfs uses DUP by default for metadata on single-device filesystems, so that if part of the FS metadata is damaged (by, say, unrecoverable bad blocks), there's still a good copy.

Quoted 2 lines

If you add another disk to the filesystem and balance, the DUP
chunks are automatically converted to RAID-1.

Sounds very interesting!

In this special case: does that mean that

Quoted 6 lines
root@tethys:~# df -t btrfs
Sys. de fichiers           1K-blocs   Utilis=E9    Dispo. Uti% Mont=E9
sur /dev/mapper/VG1-TETHYS
                     152735744  78383976  71999272  53% /
/dev/mapper/VG1-TETHYS
                     152735744  78383976  71999272  53% /tmp

shows that that device with brutto 150 GByte is nearly full with its 78=
=20
GByte (or 73 GByte) data because it uses this kind of RAID1?

Viele Gruesse!
Helmut
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" = in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw

Le dimanche 15 mai 2011 =C3=A0 19:28 +0200, Helmut Hullen a =C3=A9crit = :

Quoted 2 lines

shows that that device with brutto 150 GByte is nearly full with its 78 GByte (or 73 GByte) data because it uses this kind of RAID1?=20

No. Here's the current situation on same machine :

# btrfs fi df /
Data: total=3D85.01GB, used=3D84.56GB
System, DUP: total=3D8.00MB, used=3D16.00KB
System: total=3D4.00MB, used=3D0.00
Metadata, DUP: total=3D1.75GB, used=3D1.01GB
Metadata: total=3D8.00MB, used=3D0.00

As far as I understood, only metadata (not data) are DUPed, and the DAT= A
zone is allocated as needed by 1GB chunks. So I currently use 84.5 GB and the system has thus allocated 85 GB of filesystem DATA space. When they get full, the system will allocate 1 more GB, etc. Until the devic= e
itself gets full, of course.

You notice here that there's no indication about the device actual size (this df gives developper-useful data, not sysadmin-useful data ;-)) bu= t
this file system resides in :=20

# mount
/dev/mapper/VG1-TETHYS on / type btrfs
(rw,relatime,subvol=3DUBUNTU,compress=3Dzlib)
[...]
# lvs VG1/TETHYS
  LV     VG   Attr   LSize   Origin Snap%  Move Log Copy%  Convert
  TETHYS VG1  -wi-ao 145,66g

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" = in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html