Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

[freebsd] étrangeté avec ZFS

3 réponses
Avatar
patpro ~ Patrick Proniewski
Bonjour,

Je suis en train de jouer avec un serveur en pré-prod sous FreeBSD.
J'ai un disque de 150 Go, formaté d'un seul tenant en ZFS :

zpool create tank da1
zfs set compression=gzip tank

J'ai créé les FS "user" et "Sites" :
zfs create tank/user
zfs set mountpoint=/user tank/user
zfs create tank/Sites
zfs set mountpoint=/Sites tank/Sites

puis les FS de "second niveau" :
zfs create tank/Sites/asso
zfs create tank/Sites/recherche
zfs create tank/Sites/sites

+ un tas d'autres pour un total de 251 file systems

À ce stade j'avais bien tank, tank/user, tank/Sites avec 147 Go d'espace
total chacun.
Quand j'ai commencé à remplir tank/Sites à partir des données du serveur
de prod, l'espace total disponible sur tank/user s'est mis à diminuer.
Cet espace total disponible est calculé comme étant la somme
usedbydataset + usedbychildren + usedbysnapshots + usedbyrefreservation
+ available , ça correspond donc à la taille du "disque", pour un FS
classique.

De même, quand j'ai transféré les données de prod dans tank/user, c'est
tank/Sites qui a commencé à rétrécir.
tank/Sites affiche maintenant un espace total de 95,7 Go dont 17,5 Go
utilisés (usedbychildren uniquement).
tank/user affiche 129,2 Go dont 51 Go utilisés (usedbychildren
uniquement)
tank quant à lui dispose toujours d'un espace total de 147 Go.

Je n'avais pas constaté ce comportement avant. Est-ce normal, ou est ce
que c'est un bug de mon install ? (FreeBSD 8.2 RC3)

patpro

--
A vendre ! http://www.patpro.net/blog/index.php/2008/01/12/133

3 réponses

Avatar
Philippe Michel
On 2011-02-18, patpro ~ Patrick Proniewski wrote:

Je n'avais pas constaté ce comportement avant. Est-ce normal, ou est ce
que c'est un bug de mon install ? (FreeBSD 8.2 RC3)



Je n'ai jamais utilisé ZFS sous FreeBSD mais je parierais que c'était
déjà le cas avant et que tu n'y avais pas fait attention.

Les filesystems ZFS sont quelque-chose de plus "léger" que les filesystems
traditionnels, essentiellment un sous-ensemble du pool qui a telles ou
telles propriétés.


http://www.sun.com/bigadmin/features/articles/zfs_overview.jsp :

"ZFS file systems will grow to the size of their storage pools
automatically.

ZFS file systems must be built in one and only one storage pool, but a
storage pool may have more than one defined file system. Each file system
in a storage pool has access to all the unused space in the storage pool.
As any one file system uses space, that space is reserved for that file
system until the space is released back to the pool by removing the
file(s) occupying the space. During this time, the available free space on
all the file systems based on the same pool will decrease."
Avatar
talon
Philippe Michel wrote:
ZFS file systems must be built in one and only one storage pool, but a
storage pool may have more than one defined file system. Each file system
in a storage pool has access to all the unused space in the storage pool.
As any one file system uses space, that space is reserved for that file
system until the space is released back to the pool by removing the
file(s) occupying the space. During this time, the available free space on
all the file systems based on the same pool will decrease."



Chez moi:

niobe% zpool list
NAME SIZE USED AVAIL CAP HEALTH ALTROOT
jails 18,1G 9,95G 8,18G 54% ONLINE -

jails 7.9G 24K 7.9G 0% /jails
jails/jail1 17G 9.3G 7.9G 54% /jails/jail1
jails/jail2 8.5G 626M 7.9G 7% /jails/jail2
/jails/jail1/usr/ports 17G 9.3G 7.9G 54%
/jails/jail2/usr/ports


Donc les chiffres ne sont pas limpides.
Il sembleque l'espace disponible est moindre que l'espace rééllement
disponible, peut être une réserve?


--

Michel TALON
Avatar
patpro ~ patrick proniewski
In article <ijml3q$l9$,
Philippe Michel wrote:

http://www.sun.com/bigadmin/features/articles/zfs_overview.jsp :

"ZFS file systems will grow to the size of their storage pools
automatically.

ZFS file systems must be built in one and only one storage pool, but a
storage pool may have more than one defined file system. Each file system
in a storage pool has access to all the unused space in the storage pool.
As any one file system uses space, that space is reserved for that file
system until the space is released back to the pool by removing the
file(s) occupying the space. During this time, the available free space on
all the file systems based on the same pool will decrease."



ça ressemble bien à ce que je constate. Heureusement que j'ai mis des
quotas sur tous les FS de dernière niveau pour pas que ça dégénère :)

patpro

--
A vendre : KVM IP 16 ports APC
http://patpro.net/blog/index.php/2008/01/12/133