3 Поддерживаемые файловые системы

3 Поддерживаемые файловые системы

To use the advanced features of Samba4 you need a filesystem that supports both the "user" and "system" xattr namespaces.

Для использования расширенных возможностей Samba4 требуется файловая система, поддерживающая расширенные атрибуты доступа к файлам xattr, такие как "user" и "system". Eng.

3.1 Файловые системы ext3/ext4

If you are using either ext3 or ext4 for your file system you will need to include the options "user_xattr","acl" and "barrier=1" in your /etc/fstab. For example:

При использовании ext3 или ext4 разделов в вашей файловой системе, необходимо добавить в файл /etc/fstab следующие опции "user_xattr","acl" и "barrier=1". Например: Eng.

/dev/hda3 /home ext3 user_xattr,acl,barrier=1 1 1

Simply change ext3 to ext4 if you are using it. Normally you will want to just modify the existing line to add those options. Please use caution when modifying your fstab as it can lead to an un-bootable system if the wrong thing is modified.

Просто измените в этой строке ext3 на ext4. Чтобы добавить дополнительные возможности к вашей файловой системе, просто измените как выше строку в файле. Будьте внимательны при внесении изменений в файл fstab. Изменение содержимого этого файла может привести к тому, что ваша операционная система окажется неработоспособной. Eng.

The barrier=1 option ensures that tdb transactions are safe against unexpected power loss. A number of sites have corrupted their AD database in sam.ldb by not having this option enabled.

Параметр barrier=1 гарантирует, что tdb транзакции будут защищены от случайного отключения электропитания сервера. Включите эту опцию для того чтобы не допустить повреждения базы данных AD в файле sam.ldb. Eng.

You also need to compile your kernel with the XATTR, SECURITY, and POSIX_ACL options for your filesystem. For ext3 (change the 3 to a 4 for ext4) that means you need:

Также необходимо собрать ваше ядро с поддержкой XATTR, SECURITY и POSIX_ACL для вашей ОС. Для ext3 ( измените 3 на 4 для ext4) вы должны: Eng.

CONFIG_EXT3_FS_XATTR=y
CONFIG_EXT3_FS_SECURITY=y
CONFIG_EXT3_FS_POSIX_ACL=y

If you are running a Linux 2.6 (or greater) kernel with CONFIG_IKCONFIG_PROC defined you can check this with the following command:

Выполнив команду ниже вы можете убедиться, что вы работаете с ядром Linux 2.6 ( и выше) с поддержкой CONFIG_IKCONFIG_PROC Eng.

$ zgrep CONFIG_EXT3_FS /proc/config.gz

3.2 Файловые системы без поддержки xattr

If you don’t have a filesystem with xattr support, then you can simulate it by adding the following line to your smb.conf:

Если ваша файловая система не поддерживает xattr, вы можете иммитировать поддержку, добавив в ваш файл smb.conf: Eng.

posix:eadb = /usr/local/samba/eadb.tdb

that will place all extra file attributes (NT ACLs, DOS EAs, streams etc), in that tdb. It is not efficient, and doesn’t scale well, but at least it gives you a choice when you don’t have a modern filesystem.

все экстра атрибуты файлов (NT ACLs, DOS EAs, потоки и т.д.) будут сохраняться в этоМ tdb файле. Это неэффективно и плохо масштабируется, но по крайней мере хоть что то. Ваша файловая система не современна. Eng.

[lock]

3.3 Тестирование вашей файловой системы

To test your filesystem support, install the ‘attr’ package and run the following 4 commands as root:

Для тестирования вашей файловой системы, установите пакет ‘attr’ и запустите следующие 4 команды от пользователя root: Eng.

# touch test.txt
# setfattr -n user.test -v test test.txt
# setfattr -n security.test -v test2 test.txt
# getfattr -d test.txt
# getfattr -n security.test -d test.txt

You should see output like this:

В результате выполнения вы должны увидеть что то подобное: Eng.

# file: test.txt
user.test="test"

# file: test.txt
security.test="test2"

If you get any «Operation not supported» errors then it means your kernel is not configured correctly, or your filesystem is not mounted with the right options.

Если вы получаете ошибку «Operation not supported», значит ваше ядро неправильно настроено или ваша файловая система смонтирована без соответствующих опций. Eng.

If you get any «Operation not permitted» errors then it probably means you didn’t try the test as root.

Ошибка «Operation not permitted» означает то, что вы запустили тест без прав root. Eng.

If you are using the posix:eadb option then you don’t need to test your filesystem in this manner.

Также нет смысла запускать эти тесты, если вы имитируете поддержку экстра атрибутов файловой системы, используя posix:eadb. Eng.

[/lock]