Мой опыт взаимодействия с Thecus N7700 в Linux Mint 20 Cinnamon

Форум поддержки для русскоязычных пользователей
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
Labuzhskiy
Level 3
Level 3
Posts: 174
Joined: Fri Aug 23, 2013 12:38 am
Location: RU:ru

Мой опыт взаимодействия с Thecus N7700 в Linux Mint 20 Cinnamon

Post by Labuzhskiy »

До конца 2020 года опыта взаимодействия с NAS-серверами "в живую" мне не имел. Данная тема это небольшая напоминалочка, если вдруг забуду или, может быть ещё кому-то пригодится. Все необходимые разрешения в веб-интерфейсе Thecus N7700 были применены, но при попытках подключиться к нему штатным способом через Nemo приводили к ошибке "в соединении отказано" удалённый компьютер разорвал соединение. В журнале Thecus N7700 чёткого описания по причине разрыва соединения не было. В то же время компьютеры под управлением Windows 7 спокойно получали доступ к устройству. Поиск сопутствующих инструкций в сети Интернет большого количества ответов и рекомендаций не выдал, однако становилось понятно, что необходимо корректно отстроить samba.
(sudo apt update && sudo apt install samba; sudo nano /etc/samba/smb.conf)
Методом проб и ошибок получил относительно рабочий вариант smb.conf, где претерпела изменения секция [global]:

Code: Select all

#
# Sample configuration file for the Samba suite for Debian GNU/Linux.
#
#
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options most of which 
# are not shown in this example
#
# Some options that are often worth tuning have been included as
# commented-out examples in this file.
#  - When such options are commented with ";", the proposed setting
#    differs from the default Samba behaviour
#  - When commented with "#", the proposed setting is the default
#    behaviour of Samba but the option is considered important
#    enough to be mentioned here
#
# NOTE: Whenever you modify this file you should run the command
# "testparm" to check that you have not made any basic syntactic 
# errors. 

#======================= Global Settings =======================

[global]

## Browsing/Identification ###

# Change this to the workgroup/NT-domain name your Samba server will part of
   dos charset = CP850
   unix charset = UTF-8
   workgroup = WORKGROUP
   netbios name = LMCX64
   security = AUTO
   wins support = no	
   enable core files = Yes
   smb ports = 445 139
   large readwrite = Yes
   server max protocol = SMB3
   max protocol = SMB3
   protocol = SMB3
   server min protocol = LANMAN1
   min protocol = LANMAN1
   client max protocol = default
   client min protocol = CORE
   unicode = Yes
   min receivefile size = 0
   read raw = Yes
   write raw = Yes
# server string is the equivalent of the NT Description field
   server string = %h server (Samba, Ubuntu)

#### Networking ####

# The specific set of interfaces / networks to bind to
# This can be either the interface name or an IP address/netmask;
# interface names are normally preferred
;   interfaces = 127.0.0.0/8 eth0

# Only bind to the named interfaces and/or networks; you must use the
# 'interfaces' option above to use this.
# It is recommended that you enable this feature if your Samba machine is
# not protected by a firewall or is a firewall itself.  However, this
# option cannot handle dynamic or non-broadcast interfaces correctly.
;   bind interfaces only = yes



#### Debugging/Accounting ####

# This tells Samba to use a separate log file for each machine
# that connects
   log file = /var/log/samba/log.%m

# Cap the size of the individual log files (in KiB).
   max log size = 1000

# We want Samba to only log to /var/log/samba/log.{smbd,nmbd}.
# Append syslog@1 if you want important messages to be sent to syslog too.
   logging = file

# Do something sensible when Samba crashes: mail the admin a backtrace
   panic action = /usr/share/samba/panic-action %d


####### Authentication #######

# Server role. Defines in which mode Samba will operate. Possible
# values are "standalone server", "member server", "classic primary
# domain controller", "classic backup domain controller", "active
# directory domain controller". 
#
# Most people will want "standalone server" or "member server".
# Running as "active directory domain controller" will require first
# running "samba-tool domain provision" to wipe databases and create a
# new domain.
   server role = standalone server

   obey pam restrictions = yes

# This boolean parameter controls whether Samba attempts to sync the Unix
# password with the SMB password when the encrypted SMB password in the
# passdb is changed.
   unix password sync = yes

# For Unix password sync to work on a Debian GNU/Linux system, the following
# parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
# sending the correct chat script for the passwd program in Debian Sarge).
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .

# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
   pam password change = yes

# This option controls how unsuccessful authentication attempts are mapped
# to anonymous connections
   map to guest = bad user

########## Domains ###########

#
# The following settings only takes effect if 'server role = primary
# classic domain controller', 'server role = backup domain controller'
# or 'domain logons' is set 
#

# It specifies the location of the user's
# profile directory from the client point of view) The following
# required a [profiles] share to be setup on the samba server (see
# below)
;   logon path = \\%N\profiles\%U
# Another common choice is storing the profile in the user's home directory
# (this is Samba's default)
#   logon path = \\%N\%U\profile

# The following setting only takes effect if 'domain logons' is set
# It specifies the location of a user's home directory (from the client
# point of view)
;   logon drive = H:
#   logon home = \\%N\%U

# The following setting only takes effect if 'domain logons' is set
# It specifies the script to run during logon. The script must be stored
# in the [netlogon] share
# NOTE: Must be store in 'DOS' file format convention
;   logon script = logon.cmd

# This allows Unix users to be created on the domain controller via the SAMR
# RPC pipe.  The example command creates a user account with a disabled Unix
# password; please adapt to your needs
; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u

# This allows machine accounts to be created on the domain controller via the 
# SAMR RPC pipe.  
# The following assumes a "machines" group exists on the system
; add machine script  = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u

# This allows Unix groups to be created on the domain controller via the SAMR
# RPC pipe.  
; add group script = /usr/sbin/addgroup --force-badname %g

############ Misc ############

# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting
;   include = /home/samba/etc/smb.conf.%m

# Some defaults for winbind (make sure you're not using the ranges
# for something else.)
;   idmap config * :              backend = tdb
;   idmap config * :              range   = 3000-7999
;   idmap config YOURDOMAINHERE : backend = tdb
;   idmap config YOURDOMAINHERE : range   = 100000-999999
;   template shell = /bin/bash

# Setup usershare options to enable non-root users to share folders
# with the net usershare command.

# Maximum number of usershare. 0 means that usershare is disabled.
#   usershare max shares = 100

# Allow users who've been granted usershare privileges to create
# public shares, not just authenticated ones
   usershare allow guests = yes

#======================= Share Definitions =======================

# Un-comment the following (and tweak the other settings below to suit)
# to enable the default home directory shares. This will share each
# user's home directory as \\server\username
;[homes]
;   comment = Home Directories
;   browseable = no

# By default, the home directories are exported read-only. Change the
# next parameter to 'no' if you want to be able to write to them.
;   read only = yes

# File creation mask is set to 0700 for security reasons. If you want to
# create files with group=rw permissions, set next parameter to 0775.
;   create mask = 0700

# Directory creation mask is set to 0700 for security reasons. If you want to
# create dirs. with group=rw permissions, set next parameter to 0775.
;   directory mask = 0700

# By default, \\server\username shares can be connected to by anyone
# with access to the samba server.
# Un-comment the following parameter to make sure that only "username"
# can connect to \\server\username
# This might need tweaking when using external authentication schemes
;   valid users = %S

# Un-comment the following and create the netlogon directory for Domain Logons
# (you need to configure Samba to act as a domain controller too.)
;[netlogon]
;   comment = Network Logon Service
;   path = /home/samba/netlogon
;   guest ok = yes
;   read only = yes

# Un-comment the following and create the profiles directory to store
# users profiles (see the "logon path" option above)
# (you need to configure Samba to act as a domain controller too.)
# The path below should be writable by all users so that their
# profile directory may be created the first time they log on
;[profiles]
;   comment = Users profiles
;   path = /home/samba/profiles
;   guest ok = no
;   browseable = no
;   create mask = 0600
;   directory mask = 0700

[printers]
   comment = All Printers
   browseable = no
   path = /var/spool/samba
   printable = yes
   guest ok = no
   read only = yes
   create mask = 0700

# Windows clients look for this share name as a source of downloadable
# printer drivers
[print$]
   comment = Printer Drivers
   path = /var/lib/samba/printers
   browseable = yes
   read only = yes
   guest ok = no
# Uncomment to allow remote administration of Windows print drivers.
# You may need to replace 'lpadmin' with the name of the group your
# admin users are members of.
# Please note that you also need to set appropriate Unix permissions
# to the drivers directory for these users to have write rights in it
;   write list = root, @lpadmin
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
Labuzhskiy
Level 3
Level 3
Posts: 174
Joined: Fri Aug 23, 2013 12:38 am
Location: RU:ru

Re: Мой опыт взаимодействия с Thecus N7700 в Linux Mint 20 Cinnamon

Post by Labuzhskiy »

В продолжение темы:

Могу теперь просматривать список директорий NAS используя nemo и размещать в них данные,
Image
однако команда mount не показывает это в списке монтирования.

Code: Select all

labuzhskiy@LMCx64:~$ mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,noexec,relatime,size=4003700k,nr_inodes=1000925,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=809924k,mode=755)
/dev/sdb2 on / type ext4 (rw,relatime,errors=remount-ro)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
none on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=28,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=19908)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
/dev/sdb1 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/sdb3 on /home type xfs (rw,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
udev on /proc/bus type devtmpfs (rw,nosuid,noexec,relatime,size=4003700k,nr_inodes=1000925,mode=755)
tmpfs on /run/user/999 type tmpfs (rw,nosuid,nodev,relatime,size=809920k,mode=700,uid=999,gid=1001)
//192.168.0.103/1c-base/Зарплата и управление персоналом 8.3/ЗУП 31 Дизайнпроект on /mnt/bases/zp type cifs (rw,relatime,vers=2.1,cache=strict,username=1C,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.0.103,file_mode=0755,dir_mode=0755,soft,nounix,serverino,mapposix,noperm,rsize=1048576,wsize=1048576,bsize=1048576,echo_interval=60,actimeo=1)
//192.168.0.103/1c-base/Спорт-Проект 8.3 on /mnt/bases/sp type cifs (rw,relatime,vers=2.1,cache=strict,username=1C,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.0.103,file_mode=0755,dir_mode=0755,soft,nounix,serverino,mapposix,noperm,rsize=1048576,wsize=1048576,bsize=1048576,echo_interval=60,actimeo=1)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=809920k,mode=700,uid=1000,gid=1000)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
/dev/sda2 on /media/labuzhskiy/System-7 type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)
/dev/fuse on /root/.cache/doc type fuse (rw,nosuid,nodev,relatime,user_id=0,group_id=0)
gvfsd-fuse on /root/.cache/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=0,group_id=0)
/dev/sdc1 on /media/labuzhskiy/Install type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)
labuzhskiy@LMCx64:~$ 
могу вывести список директорий NAS с помощью команды smbclient -L но не могу монтировать директории из списка "в ручную":
Image
при этом, любые другие зашареные ресурсы с других компьютеров монтируются без проблем.

Но только что заметил, что монтирование директорий NAS проходит так:

Code: Select all

labuzhskiy@LMCx64:~$ sudo mount -t cifs -v //192.168.0.200/SERVERDUMP /mnt/dump -o username=labuzhskiy,password=my_passwd,iocharset=utf8,vers=1.0,sec=ntlm
mount.cifs kernel mount options: ip=192.168.0.200,unc=\\192.168.0.200\SERVERDUMP,iocharset=utf8,vers=1.0,sec=ntlm,user=labuzhskiy,pass=********
labuzhskiy@LMCx64:~$ sudo umount /mnt/dump
labuzhskiy@LMCx64:~$ sudo mount -t cifs //192.168.0.200/SERVERDUMP /mnt/dump -o username=labuzhskiy,password=my_passwd,iocharset=utf8,vers=1.0,sec=ntlm
labuzhskiy@LMCx64:~$ cd /mnt/dump
bash: cd: /mnt/dump: Отказано в доступе
labuzhskiy@LMCx64:~$ sudo su -
root@LMCx64:~# cd /mnt/dump
root@LMCx64:/mnt/dump# ls -l
итого 8388616
drwxrwxrw-+ 2 1039 systemd-network          0 янв 27 19:06  1C-SRV_27.01.2021
drwxrwx---+ 2 1002 systemd-network          0 сен  7 18:51 '!BackUP'
drwxrwxrw-+ 2 1002 systemd-network          0 янв 12 09:48  BackUP_Website_otlazhenniy_beget
drwxrwxrw-+ 2 1039 systemd-network          0 дек 29 17:49  MyWorkPC
drwxrwx---+ 4 1002 systemd-network          0 окт 16 15:47  SQLSrvDUMP
drwxrwxrw-+ 2 1039 systemd-network          0 янв 27 09:14  SysW10
-rwxrwx---+ 1 1002 systemd-network 8589934592 сен 28 09:08  tcdp
drwxrwxrw-+ 2 1039 systemd-network          0 янв 15 13:12  Vishivki_CEH
drwxrwxrw-+ 2 1002 systemd-network          0 ноя 19 18:11  wks_ahci_mbr_updated_clear
root@LMCx64:/mnt# exit
выход
labuzhskiy@LMCx64:~$ df -h /mnt/dump
Файл.система               Размер Использовано  Дост Использовано% Cмонтировано в
//192.168.0.200/SERVERDUMP   8,7T         7,6T  1,2T           87% /mnt/dump
labuzhskiy@LMCx64:~$ sudo umount /mnt/dump
User avatar
Labuzhskiy
Level 3
Level 3
Posts: 174
Joined: Fri Aug 23, 2013 12:38 am
Location: RU:ru

Re: Мой опыт взаимодействия с Thecus N7700 в Linux Mint 20 Cinnamon

Post by Labuzhskiy »

Наконец-то разобрался, будет напоминалкой, а может и поможет ещё кому-нибудь.
Хочется верить что в ProxmoxVE монтирование по аналогичной схеме проходит :)
Для меня правильным вариантом команды монтирования сетевой директории NAS оказался следующий:

Code: Select all

sudo mount -o noperm,username=labuzhskiy,password=my_nas_passwd,iocharset=utf8,vers=1.0,sec=ntlm -t cifs "//192.168.0.200/SERVERDUMP" /mnt/dump
Image

Code: Select all

labuzhskiy@LMCx64:/mnt/dump$ mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,noexec,relatime,size=4003700k,nr_inodes=1000925,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=809924k,mode=755)
/dev/sdb2 on / type ext4 (rw,relatime,errors=remount-ro)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
none on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=28,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=19908)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
/dev/sdb1 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/sdb3 on /home type xfs (rw,relatime,attr2,inode64,logbufs=8,logbsize=32k,noquota)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
udev on /proc/bus type devtmpfs (rw,nosuid,noexec,relatime,size=4003700k,nr_inodes=1000925,mode=755)
tmpfs on /run/user/999 type tmpfs (rw,nosuid,nodev,relatime,size=809920k,mode=700,uid=999,gid=1001)
//192.168.0.103/1c-base/Зарплата и управление персоналом 8.3/ЗУП 31 Дизайнпроект on /mnt/bases/zp type cifs (rw,relatime,vers=2.1,cache=strict,username=1C,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.0.103,file_mode=0755,dir_mode=0755,soft,nounix,serverino,mapposix,noperm,rsize=1048576,wsize=1048576,bsize=1048576,echo_interval=60,actimeo=1)
//192.168.0.103/1c-base/Спорт-Проект 8.3 on /mnt/bases/sp type cifs (rw,relatime,vers=2.1,cache=strict,username=1C,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.0.103,file_mode=0755,dir_mode=0755,soft,nounix,serverino,mapposix,noperm,rsize=1048576,wsize=1048576,bsize=1048576,echo_interval=60,actimeo=1)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=809920k,mode=700,uid=1000,gid=1000)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
/dev/fuse on /root/.cache/doc type fuse (rw,nosuid,nodev,relatime,user_id=0,group_id=0)
gvfsd-fuse on /root/.cache/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=0,group_id=0)
/dev/sdc1 on /media/labuzhskiy/Install type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)
//192.168.0.200/SERVERDUMP on /mnt/dump type cifs (rw,relatime,vers=1.0,sec=ntlm,cache=strict,username=labuzhskiy,uid=0,noforceuid,gid=0,noforcegid,addr=192.168.0.200,soft,unix,posixpaths,serverino,mapposix,acl,noperm,rsize=1048576,wsize=65536,bsize=1048576,echo_interval=60,actimeo=1)
labuzhskiy@LMCx64:/mnt/dump$ 
P.S.(Из личного опыта): Действительно, как показывает практика, использовать NAS в Линукс не только полезно, но и удобно. Это экономит время на установку второй ноды с шарой под бэкапы. Проверил на Proxmox Virtual Environment 6.3-2

Для тестовой проверки создал службу nas-mount.service:
nano /etc/systemd/system/nas-mount.service

Code: Select all

[Unit]
Description=nas_mount_2dump

[Service]
RestartSec=10s
ExecStart=/opt/NAS/nas-mount.sh
Restart=on-failure

[Install]
WantedBy=multi-user.target
и директорию, в которой создал скрипт nas-mount.sh

mkdir -p /opt/NAS
nano /opt/NAS/nas-mount.sh


с содержимым:

Code: Select all

#!/bin/bash
mount -o noperm,username=labuzhskiy,password=<nas_passwd>,iocharset=utf8,vers=1.0,sec=ntlm -t cifs "//192.168.0.200/SERVERDUMP/dump" /var/lib/vz/dump
chmod +x /opt/NAS/nas-mount.sh

systemctl daemon-reload
systemctl start nas-mount
systemctl status nas-mount
systemctl enable nas-mount


и всё оказалось на своих местах.
ProxmoxVE
Image

Обзор директории из Linux Mint
Image
AxaRu
Level 1
Level 1
Posts: 15
Joined: Tue Jan 16, 2018 1:47 pm

Re: Мой опыт взаимодействия с Thecus N7700 в Linux Mint 20 Cinnamon

Post by AxaRu »

Хороший NAS. Жаль сняли с производства.
Я использую с 2014 года Thecus N4800 в режиме 24х7.
Стоят 4 диска WD 2TB в raid-5.
Два диска отходили около 50 000 часов и были заменены по причине образования сбойных секторов..
Другие два диска успешно работают с момента покупки и сбойных секторов не наблюдается.

Image

Доступ к NAS организовал по nfs.
Скорость обмена до 70 MB на крупных файлах. На мелких падает раза в 2.
Никаких проблем подключения не было. Все работает "искоробки".

Image

В свое время для автоматизации установки Linux я написал десяток скриптов.
Ниже скрипт установки nfs

Code: Select all

#/bin/bash

nfs_client(){
    answer "$TODO_NFS_CLIENT" \
           "$DONE_NFS_CLIENT" \
    "+-----------------------------------------------------------------------------+\n" \
    "| nfs client and autonfs                                                      |\n" \
    "|                                                                             |\n" \
    "|   http://sysadm.pp.ua/linux/nfs-and-autofs.html                             |\n" \
    "+-----------------------------------------------------------------------------+\n" 
    if [ $ANS = "Y" ]; then pushd /tmp;
        
        apt install -y nfs-common
        apt install -y autofs
        sh -c 'echo "/nfs /etc/auto.nfs --timeout=60" >> /etc/auto.master'
        sh -c 'echo "nas4d0     -rw,soft,intr,rsize=8192,wsize=8192     192.168.1.10:/raid0/data/_NAS_NFS_Exports_/Nas4d0" >> /etc/auto.nfs'
        sh -c 'echo "srv1d0     -rw,soft,intr,rsize=8192,wsize=8192     192.168.1.11:/home/axa" >> /etc/auto.nfs'
        /etc/init.d/autofs restart
        mkdir /home/${USER}/Media
        chown ${USER}:${GROUP} /home/${USER}/Media
        cd /home/${USER}/Media
        ln -s /nfs/nas4d0 .
        ln -s /nfs/srv1d0 .
        ln -s /media/${USER} .
        
    popd; echo "DONE_NFS_CLIENT=1" >> $LOGF; fi
}

#
# Запуск скрипта не в автоматическом режиме
#
if [ -z "$BATCH" ]; then
  source ../install.conf
fi

if [ $BATCH == "N" ]; then
  source ./sys_answer.sh
  nfs_client
fi
По адресу 192.168.1.10 - NAS Thecus
По адресу 192.168.1.11 - Linux машина.
Locked

Return to “Русский - Russian”