Обновлено:
Опубликовано:
В качестве примера используется Windows Server 2012 R2 (2016, 2019). Инструкция разбита на несколько шагов и представляет из себя полный цикл настройки файлового хранилища для использования в малых и средних компаниях.
Выбор оборудования и подготовка сервера
Установка Windows и настройка системы
Базовые настройки файлового сервера
Тюнинг файлового сервера или профессиональные советы
Настройка средств обслуживания
Тестирование
Шаг 1. Выбор оборудования и подготовка сервера
В качестве сервера, желательно, выбрать профессиональное оборудование. Системные требования для файлового сервера не высокие:
- Процессор может быть самый простой;
- Оперативная память также не сильно используется;
- Дисковая система — самый основной компонент. Ее объем зависит от специфики бизнеса. Примерная формула — не менее 15 Гб на пользователя и не менее 1 Тб на сервер. До 50 пользователей можно рассматривать диски SATA, после — SAS или SSD.
Например, для компании в 300 пользователей подойдет сервер с процессором Xeon E3, 8 Гб ОЗУ и 5 Тб дискового пространства на дисках SAS 10K.
Дополнительные требования
- Для обеспечения сохранности информации при выходе из строя жесткого диска, необходим RAID-контроллер. Настройка последнего выполняется из специального встроенного программного обеспечения, которое запускается при загрузке сервера;
- Сервер должен быть подключен к источнику бесперебойного питания;
- Необходимо предусмотреть резервное копирование. Для этого нужен дисковый накопитель (внешний жесткий диск) или другой сервер.
Подробнее о выборе оборудования читайте статью Как выбрать сервер.
Шаг 2. Установка Windows и настройка системы
Установка системы
На этом шаге все стандартно, за исключением одного нюанса: разбивая во время установки Windows жесткий диск, стараемся выделить небольшую часть (70 — 120 Гб) для системы и все остальное под данные. Если выделить много дискового пространства для системного раздела, увеличится время его обслуживания и фрагментация, что негативно скажется на производительности и надежности системы в целом.
Настройка системы
- Проверяем правильность настройки времени и часового пояса;
- Задаем понятное имя для сервера и, при необходимости, вводим его в домен;
- Если сервер не подключен напрямую к сети Интернет, стоит отключить брандмауэр;
- Для удаленного администрирования, включаем удаленный рабочий стол;
- Устанавливаем все обновления системы.
Шаг 3. Базовые настройки файлового сервера
Это стандартные действия, которые выполняются при настройке обычного файлового сервера.
Установка роли и вспомогательных компонентов
Как правило, данная роль устанавливается вместе с Windows. Остается только это проверить и доустановить компоненты, которые нужны для полноценной эксплуатации сервиса.
Открываем Диспетчер серверов. Он может быть запущен из панели быстрого запуска.
Нажимаем Управление — Добавить роли и компоненты.
В открывшемся окне оставляем Установка ролей и компонентов и нажимаем Далее.
В следующем окне выбираем нужный сервер (выбран по умолчанию, если работаем на сервере, а не через удаленную консоль) и нажимаем Далее.
Среди ролей находим Файловые службы и службы хранилища, раскрываем ее и проверяем, что установлены галочки напротив следующих компонентов:
- Службы хранения;
- Файловый сервер;
Если данные службы не установлены, выбираем их и нажимаем Далее.
В окне Выбор компонентов просто нажимаем Далее.
Откроется окно Подтверждение установки компонентов. Нажимаем Установить и после окончания процесса перезагружаем сервер.
Настройка шары (общей папки)
Создаем первую папку, которую хотим предоставить в общее использование. Затем кликаем по ней правой кнопкой мыши и нажимаем Свойства:
В открывшемся окне переходим на вкладку Доступ и нажимаем Расширенная настройка:
Ставим галочку Открыть общий доступ к этой папке и нажимаем кнопку Разрешения:
Предоставляем полный доступ всем пользователям:
* конечно же, мы не будем давать доступ всем пользователям, но для этого есть вкладка безопасность (см. ниже).
Нажимаем OK и еще раз OK.
Теперь переходим на вкладку Безопасность и нажимаем Дополнительно:
В открывшемся окне нажимаем Отключение наследования и Преобразовать унаследованные разрешения в явные разрешения этого объекта.
Нажимаем OK и Изменить.
Выставляем необходимые права на папку, например:
Совет: старайтесь управлять правами на ресурсы только при помощи групп. Даже если доступ необходимо предоставить только одному человеку!
Теперь нажимаем OK два раза. Папка настроена для общего использования и в нашем примере доступна по сетевому пути \\fs1\Общая папка.
Шаг 4. Тюнинг файлового сервера или профессиональные советы
Данные настройки, по сути, представляют секреты того, как сделать файловый сервер лучше, надежнее и безопаснее. Применяя их, администраторы создают более правильную и профессиональную среду ИТ.
DFS
С самого начала стоит создавать общие папки в пространстве имен DFS. На это есть две основные причины:
- При наличии или появлении нескольких файловых серверов пользователям будет удобнее находить общие папки в одном месте.
- Администратор легко сможет создать отказоустойчивую систему при необходимости.
Как создать и настроить DFS читайте в статьях Как установить и настроить DFS и Как установить и настроить DFS с помощью Powershell.
Теневые копии
Позволят вернуться к предыдущим версиям файлов. Это очень полезная функция позволит не только восстановить некорректно отредактированный документ, но и вернуть случайно удаленный файл или папку.
Как настроить и пользоваться данной возможностью, читайте подробнее в инструкции Как включить и настроить теневые копии.
Аудит
Аудит позволит вести протокол доступа к данным — понять, кто и когда удалил важные данные или внес в них изменения.
О том, как настроить данную возможность читайте статью Как включить аудит доступа к файлам Windows.
Анализатор соответствия рекомендациям
В диспетчер управления серверами Windows встроен инструмент для проверки конфигурации сервера — анализатор соответствия рекомендациям. Чтобы им воспользоваться переходим в диспетчере в Локальный сервер:
Находим раздел «Анализатор соответствия рекомендациям» и справа кликаем по ЗАДАЧИ — Начать проверку BPA:
Рассмотрим решения некоторых рекомендаций.
1. Для XXX должно быть задано рекомендованное значение.
Это набор однотипных рекомендаций, для выполнения которых нужно обратить внимание на описание и задать значение параметро, которое в нем указано. Например, для CachedOpenLimit в описании проблемы есть описание решения — «Задайте для CachedOpenLimit рекомендуемое значение 5». Чтобы это сделать, открываем Powershell от администратора и вводим команду:
Set-SmbServerConfiguration -CachedOpenLimit 5
* мы задаем параметру CachedOpenLimit значение 5, как это и рекомендовано анализатором.
На запрос, уверены ли мы, что хотим выполнить команду, отвечаем утвердительно.
Остальные параметры задаем аналогичными действиями.
2. Файл Srv.sys должен быть настроен на запуск по требованию.
В командной строке от имени администратора вводим:
sc config srv start= demand
3. Создание коротких имен файлов должно быть отключено.
В командной строке от имени администратора вводим:
fsutil 8dot3name set 1
Шаг 5. Настройка средств обслуживания
Ни одна инфраструктура не может полноценно существовать без мониторинга и резервного копирования. Предупредить о возможной проблеме, узнать о последней раньше пользователей или иметь возможность восстановить данные — показатели высокой ответственности и профессионализма системного администратора.
Резервное копирование
Для файлового сервера все просто — необходимо резервировать все рабочие папки и файлы. Лучшим решением будет ежедневное копирование новых данных, и с определенной периодичностью (например, раз в месяц), создавать полный архив.
Мониторинг
Мониторить стоит:
- Сетевую доступность сервера;
- Свободное дисковое пространство;
- Состояние жестких дисков.
Шаг 6. Тестирование
Тестирование состоит из 3-х основных действий:
- Проверить журналы Windows и убедиться в отсутствие ошибок. В случае их обнаружения, необходимо устранить все проблемы.
- Выполнить действия анализатора соответствий рекомендациям.
- Провести живой тест работы сервиса с компьютера пользователя.
My old Synology NAS for home use had started to show signs of wear and was in need of replacement. It had plenty of disk space and performed well enough — but the version I had lacked any real power or cloud connectivity. I decided it was time to repurpose one of my «home lab» servers to be a replacement and wanted to take a kick at the can of setting it up as a headless Windows Server 2019 File Server that I could connect up with Azure File Sync for some «cloud connected» storage. I came across a few interesting things took a bit of time to solve so I thought I’d share my experience making this server with you here – in case you come across these yourself in your travels.
In case you didn’t know — it does not have a GUI. This can pose some challenges when you complete the install and need to fine tune and configure it. I’m going to be managing this system (once it’s configured) using Windows Admin Center, but completing the setup will take a bit of wrangling. I’m not going to cover a vanilla install of Windows Server, so I pickup from just after the first logon where I have the opportunity to set the local Administrators password. The first stop in this manual install is your old friend SCONFIG.
As you can see – I have already enabled and configured some important settings here:
- I have changed the Computer Name (Option 2)
- I have enabled and configured Remote Management (Option 4)
- I have configured Windows Update to be Automatic and check for updates every day at 3am localtime (Option 5)
- I have Downloaded and installed updates (Option 6)
- I have gone ahead and input my product key and proceeded to activate Windows Server (Option 11)
This was the easy part – we have an (almost forgotten) tool with SCONFIG to get this part done. You’ll notice I didn’t join a domain – this is a simple NAS for some clients here in the house, I no longer have local domain controllers running for the family / lab.
Since this machine is essentially a Server and it will be running headless, it won’t be going to sleep or turning off monitors as it’s going to be headless after this configuration is complete. As such – I want to change the Power Profile to High Performance. It’s a bit harder with no GUI, but you can use the PowerCfg.exe tool to do this. To list off your settings it’s as simple as running PowerCfg /list and then you can copy the scheme GUID for High Performance and then run PowerCfg /Set 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c
Once I got around to wanting to configure a Storage Space and tried to list off my physical disks with a Get-PhysicalDisk command, I realized that my HP workstation was still missing drivers for the controller card. Doing some digging, I realized that I needed to download the drivers from the HP support site, transfer them via USB stick on to the system – but they required a GUI for the install. I extracted the drivers into C:\SWSetup folder and then found the docs about how to go about adding driver packages into the drive store. In my case – one command did the missing controller software install and updated my chipset drivers: pnputil /add-driver *.inf /subdirs /install
This server has an SSD for the main OS drive and a few spinning rust disks for data who had previously been part of a Windows Storage Space in an old configuration. I had to dig around to figure out how to clear out the old Storage Space information as it’s stamped on each disk – so unless you are using pristine / unused disks – you’ll want to remove any old unhealthy storage pools from the system. You can then delete them with a simple Get-StoragePool -HealthStatus Unhealthy | Remove-StoragePool. This should free up the disks to be included in a net new Storage pool and be configured into a new Storage Space. Storage Spaces is documented in the Deploy StorageSpaces on a stand-alone server doc from way back in the 2012 documentation space, but it still applies to 2019. You can list off your visible disks on the system even if you are repurposing hardware – you’ll want to ensure you are clean and starting from scratch. List off your disks with Get-PhysicalDisk and you should see all of them with a “CanPool” status of True.
To create you Storage Space from the CanPool disks, first off group them together as a variable with $PhysicalDisks = (Get-PhysicalDisk -CanPool $True) Then you can group them together into a Storage Pool so you can make a virtual disk with the redundancy you like. First make the Storage Pool with New-StoragePool -FriendlyName Storage – StorageSubsystemFriendlyName “Windows Storage*” -PhysicalDisks $PhysicalDisks
Because I am using old disks of mismatched sizes and want to gain all the space possible for my resilient storage, I am going to create a RAID 5 equivalent setup using the ResiliancySettingName of Parity with New-VirtualDisk -StoragePoolFriendlyName Storage -FriendlyName data -ResiliencySettingName Parity -UseMaximumSize
Finally it’s time to initialize the disk, create the volume and format the partition as NTFS with Get-VirtualDisk -FriendlyName data | Get-Disk | Initialize-Disk -Passthru | New-Partition -AssignDriveLetter -UseMaximumSize | Format-Volume -FileSystem ntfs
Next up – making some standard SMB Shares that my workstations can access the stored data. Since this is for home use, I only have regular Users and if you remember – I no longer have a domain in use, so I will need some local accounts created. You can read the full New-LocalUser command reference from the doc page. I create a secure password with $Password = Read-Host -AsSecureString and then create the local account with New-LocalUser «Mackenzie» -Password $Password -FullName «Mackenzie» -Description «Son» -PasswordNeverExpires
I went ahead and created a user for each member of the family and myself and proceeded to make a note to visit each family members machine to map drives to the server using their unique local user ID in order to authenticate to the server. This part made me cringe as a consultant who has designed over 140+ Active Directory domains for enterprise customers over the years. Maybe I should make this simpler and create a local domain for home again – but honestly this is a small setup, not something for a small / medium business so I’ll let it pass.
I create the necessary folder structure on the new E: drive, in this example it’s E:\shares\Documents that I want to share out with Change access to the Users group and Full access to the Administrators group. You can read the full New-SmbShare command reference from the docs page. For this I use New-SmbShare -Name «Documents» -Path «E:\shares\Documents» -ChangeAccess «Users» -FullAccess «Administrators»
Once the shares were made it was time to transfer the data. I decided to keep things simple and simply mapped a drive from the new server over to the old NAS and then proceeded to robocopy the files down to their new locations. Needless to say – this took a long time, multiple days in fact – but we made it in the end. Because this was a simple NAS for home use, there wasn’t a very complex security structure in place.
To review – I wanted to replace an aging home NAS device with a Windows Server 2019 file server running on some repurposed home lab hardware. Because Windows Server 2019 runs without a GUI I managed to figure out the following from the command line / PowerShell prompt:
- Configuring the basics with SCONFIG
- Changed the Power Profile to High Performance
- Added and Installed 3rd party drivers
- Deleted old Storage Space
- Created a new Storage Space / Virtual Drive / Resilient volume
- Created new Local Users
- Created new SMB shares
Now how about managing this server going forward? Well for that, you will have to wait for my next blog post.
Windows Storage Server NAS setup
can you do a how to setup Windows Storage Server as a NAS in the home for a competent DIY? Not just buying off the shelf but going to it diy. Windows Storage Server std can be bought off eBay for a reasonable price 200 stage. HDD are reasonable. surely it is a reasonable project for a well-versed person in windows? even a crossover person from Linux.
Here are some setup instructions from Seagate WSS NAS, but it will be the same process for any other Windows-based NAS. Either its Buffalo, Thecus or WD it will be the same setup.
Seagate Business Storage NAS Windows Server | How to Create a New User Account and a New Share
WSS NAS | How to Create Users and Shares_Workgroup
Getting started
This is Seagate created manual for configuring RAID and volumes etc. The very same setup will apply to Buffalo and Thecus NAS.
Installation
Your Windows WSS NAS’s installation is divided into two parts:
- Hardware setup
- Windows WSS NAS Setup Assistant
Windows WSS NAS Setup Assistant
The Windows Storage Sever 2012 R2 Essentials dashboard is a critical management tool for your WSS NAS. However, it is not available when you first log into the NAS. Follow the required steps in the Windows WSS NAS Setup Assistant to make certain that the dashboard is properly installed.
First login
You can access the WSS NAS using Remote Desktop Connection.
- From a PC on the same network as the WSS NAS, launch Remote Desktop Connection.
- Enter the default login: administrator
- Enter the default password: admin
- Choose Connect
Two popup windows appear when you first log into the NAS:
- Windows WSS NAS Setup Assistant
- Windows Networks (to the right).
You can choose Yes for the Windows Networks popup window.
Windows WSS NAS Setup Assistant: recommended and required
The Windows WSS NAS Setup Assistant launches automatically each time you boot the NAS. Once you complete the initial setup and confirm that the dashboard is available, you can choose to stop the Setup Assistant from launching by checking the box on the lower left: Do not show again.
The Windows WSS NAS Setup Assistant includes a list of recommended and required steps to complete the installation. If the recommended steps are applicable to you, make certain to complete them before moving to the required steps.
Recommended steps
- Set date and timezone–The default timezone is Pacific Standard Time (PST). Click this option to change the timezone for your region.
- Change language–The default language is English. Click this option to change the language for your environment.
- Change network name or join domain–The WSS NAS’s default network name is Windows-nas-wss. Click this option to change the network name. If applicable, you can also join your WSS NAS to a domain on your network.
Required steps
- Change password–A second administration account must be created when running the Windows Server Essentials wizard (see Setup dashboard below). However, the password for the default user, Administrator, remains admin unless it is changed. For security reasons, change the password.
- Manage storage–Models sold with hard drives can skip this step. For diskless models, choose this option to create a storage pool and choose the best storage space to protect your data. For further explanation and step-by-step instruction, see Manage storage: storage spaces below.
- Set up dashboard–Perform this step last. Click the link to launch the Server Manager and review the instructions at Dashboard setup: Configure Windows Server Essentials. The Windows Server Essentials configuration wizard walks you through creating a new domain for the WSS NAS. The domain is required to use the dashboard.
Manage storage: storage spaces
Windows Server 2012 introduced storage spaces to better optimize hard drive capacity and performance. Hard drives in your WSS NAS are collected into one or more storage pools that work together to manage and protect data. For further information on storage pools/spaces, see the Microsoft Technet overview.
Review the instructions below to create one or more:
- Storage pools–Combine the WSS NAS hard drives into one or more groups.
- Virtual disks–Use the storage pool’s available capacity to create virtual disks for the storage pool.
- Volumes–A volume appears on your WSS NAS as a disk. Add server folders to a volume to store and access data on the network.
Storage pools
You can create one or more storage pools using the hard drives in the WSS NAS. For enhanced storage capacity, Windows recommends combining all the hard drives into a single storage pool.
Create a storage pool
- From the Windows WSS NAS Setup Assistant, click the link Manage storage.
- In the Storage Pools window, right click Primordial below Storage Spaces.
- Choose New Storage Pool.
- Choose Next.
- At the Storage Pool Name window, enter a name for your storage pool and choose Next.
- Choose the hard drives for the new storage pool and choose Next.
- Review the Confirmation page and choose Create.
Virtual disks
The New Virtual Disk wizard asks you to assign the following:
- A level of data protection
- A level of storage provisioning
Data protection
Use one of the resiliency types below:
- Mirror (recommended)–One or two extra copies of each file are written across a stripe that includes two or more hard drives. Mirroring hard drives reduces capacity by as much as 50% but it also offers enhanced performance when compared to parity.
- Parity–Parity information is written alongside data across a stripe that includes three or more hard drives. Parity offers greater capacity than mirroring but performance is reduced. Parity is a very good option for archival environments.
- Simple (No data protection)–Though it provides the best performance, choosing Simple can lead to data loss should a hard drive fail.
Storage provisioning
Windows Storage Server 2012 R2 Essentials offers two types of provisioning:
- Fixed (recommended)–Storage space is used based upon the total capacity assigned to the virtual disk.
- Thin–Storage space is used as it is needed, up to the volume size. The volume size can be expanded when adding an amount of hard drives equal to the storage pool.
Thin provisioning is an advanced storage configuration that can be used to great effect with enclosures that house a large amount of hard drives. Windows recommends using Fixed for the WSS NAS. To learn more about thin provisioning, see the Microsoft Technet overview.
Create a storage pool
- In the Storage Pools window, right click the newly created storage pool. It is listed below Storage Spaces.
- Choose Next.
- If applicable, choose a storage pool and select Next.
- At the Virtual Disk Name window, enter a name and choose Next.
- Choose your level of data protection.
Important: Windows recommends mirror for performance and protection while parity is a good choice for archival environments. Windows does not recommend simple since it will not protect your data if a hard drive fails.
- Choose Next.
- Choose a provisioning type.
Important info: Windows recommends fixed for the WSS NAS.
- Choose Next
- Enter the capacity for the virtual disk. If you are creating a single virtual disk with fixed provisioning, you can choose Maximum size.
- Choose Next.
- Review the Confirmation page and choose Create.
Volume
The New Volume wizard may open automatically following the creation of a virtual disk. You can confirm that it launches automatically by reviewing the final step of the New Virtual Disk wizard. The box is checked next to Create a volume when this wizard closes.
Volume format
When creating the volume, you can format using:
- NTFS (recommended)
- ReFS
ReFS has many advantages, including efficient error correction and corrupt file handling. However, it is not possible to know if all client applications support ReFS. Therefore, Windows recommends NTFS.
To learn more about ReFS, see the Microsoft Technet overview.
Create a volume
If the New Volume wizard is open, skip step 1.
- In Server Manager > File and Storage Services > Volumes > Storage Pools, right click on the virtual disk and choose New Volume.
- Choose Next.
- Click the virtual disk that will host the volume and choose Next.
- Enter the size of the volume. In this example, the full capacity is used for the volume.
- Choose Next.
- Choose the drive letter and select Next.
- Choose the file system. Windows recommends NTFS.
- Enter a name for the volume in the volume label field.
- Choose Next.
- Review the Confirmation window and choose Create.
The volume is visible in an Explorer window.
Dashboard setup: configure Windows Server Essentials
The dashboard is the central management tool for Windows Storage Server 2012 R2 Essentials. You can use the dashboard to add users, create user groups, review storage health and much more. To enable the dashboard, you must create a new domain for the WSS NAS. The Windows Server Essentials setup wizard helps you create the domain.
To learn more about domains, see the Microsoft Technet overview.
Important info: The network name for your WSS NAS cannot be changed after the Windows Server Essentials setup wizard. Consider changing the name before following the directions below. To change the name, go to System Properties > Computer Name and click Change.
Important info: If you intend to join the WSS NAS to an existing domain, you must do it before running the Windows Server Essentials setup wizard.
Follow the steps below to create a domain:
- From the Windows WSS NAS Setup Assistant, click the link Set up dashboard. The Server Manage launches.
- Click the notification flag on the top right of Server Manager.
- Click the link Configure Windows Server Essentials.
- Click Next.
- Enter your company name (optional) and the name for the domain.
Important: PCs connected to the WSS NAS are associated with the domain name you choose in this step. It is very complicated to change.
- Click Next.
- Create a new administration account name and password for the WSS NAS domain. The credentials should be different than the default account.
Important: This is your domain’s administrator account. Use it to manage users, user groups, server folders, permissions and all features related to the WSS NAS.
- Click Next. The server must reboot one or more times to add the domain.
- Check the power button LED to determine when you can log in. When it is solid white, launch Remote Desktop from a PC on the network. Enter the new domain’s administrator credentials to log in.
Note: Preparing the dashboard can take up to 15 minutes.
- Launch Server Manager by clicking its icon on the lower left.
- Server Manager completes the update. Choose Next.
- (Optional) You can click the link to register your WSS NAS with Microsoft online services for business.
Review dashboard notifications
Following the domain creation, you can use dashboard to manage your WSS NAS. To begin, check Health Monitoring for notifications on the health of your WSS NAS. When first reviewing notifications, there are two messages to resolve. See the instructions below.
To launch dashboard, click twice on its icon, located on the upper left of the desktop.
Notification: Windows update
- In dashboard, go to Home > Health Monitoring.
- Right click the critical message and choose Troubleshoot this issue.
- The Windows Update Control panel opens. Windows recommends selecting Turn on automatic updates to receive the latest versions of software.
Notification: server folders
By default, the server folders remain on the system hard drive. It is recommended to move them to a larger volume.
-
- In the dashboard, go to Storage > Server Folders.
- Right click on any folder except Users.
- Choose Move the folder.
- Choose Next.
- Choose the drive to store the folder and select Move folder.
- Choose Close.
Repeat the steps for all folders except Users. The Users folder is always active and cannot be moved. Since it cannot be moved, dashboard notifications will continue to post warnings that folders are on the system hard drive. As long as you make certain to keep all other server folders on non-system volumes, the warning can be disregarded.
Some more info about Buffalo Windows NAS:
Windows based OS NAS – WSS NAS
All pages contain links to Amazon. These links will take you to some of the products mentioned in today’s article. As an Amazon Associate, we earn from qualifying purchases.
На чтение 2 мин Просмотров 1.3к. Опубликовано
Давно я не занимался настройкой NAS4Free… как говорится настроил один раз и забыл. На страницах проекта www.gotoADM.ru есть ряд статей, посвященных установке и настройке отказоустойчивого NAS:
- Установка NAS4Free
- Настройка NAS4Free
- Администрирование хранилища (создание ZFS Pool, SAMBA Server, SSH и т.п.) описано в одноименной рубрике.
Заставил вернуться к данной теме не случай, а запрос посетителя сайта. С радостью отвечаю ему данной заметкой, в которой будет описан процесс настройки iSCSI target NAS4Free и его подключение к Windows Server 2012 R2. Процедура не сложная и не долгая, поэтому будет представлено несколько скриншотов с указанием необходимых действий. Стоит отметить – теории минимум, только описание выполнения действий в пошаговом режиме. Описание самой технологии и принципов ее работы смотрите в профильной литературе.
Итак, в первую очередь заходим в web-интерфейс нашего сетевого хранилища. Затем переходим на вкладку “Службы-iSCSI” и активируем данный сервис. После этого переходим на вкладку “Цели” и создаем экстен. Это может быть файл (как в нашем случае), физический диск и ZFS pool.
После этого на вкладке “Порталы” добавляем точки подключения, т.е. порталы. В данном случае и в последующие есть довольно подробные комментарии к задаваемым параметрам.
Переходим на следующую вкладку – “Инициаторы”:
В завершении настройки добавляем цели – это диск, указываем путь к созданному файлу (диску или ZFS пулу), устанавливаем требуемые права.
Теперь переходим к настройке “клиента”, в нашем случае это Windows Server 2012 R2. Запускаем “Инициатор iSCSI” любым удобным способом, например, через поиск:
Выполнив подключение к iSCSI target переходим добавлению диска. Делается это в оснастке “Управление Компьютером” – “Управление дисками”. Сначала нажимаем по неактивному диску правой кнопкой и выбираем пункт “В сети”. Затем переходим к инициализации и последующим “стандартным” операциям по добавлению диска в систему Windows.
Готово. Требуемые настройки выполнены, iSCSI target создан на NAS4Free и подключен к Windows Server 2012 R2.
Занимаюсь IT с 2007 года. Всё началось с увлечения — разгона компьютерного оборудования. Много воды и азота утекло с тех пор… Сейчас уже более 3х лет со своей командой оказываю комплексную поддержку и продвижение бизнеса: SEO, Яндекс.Директ, рассылки и удалённое обслуживание серверов. Буду рад помочь, обращайтесь!
Preface
This tutorial is installed is the latest version. Since it makes it very stable, the software that can be installed is not installed.
First, ready to work
[Update system】
Nothing, he wants to use the latest.
Right click on the start button -> Settings -> Update and Security
Second, smaba
【Install】
Official website:https://www.samba.org/
Command process:
cd /source/ wget https://download.samba.org/pub/samba/samba-latest.tar.gz tar -zxvf samba-latest.tar.gz cd samba-latest
[Configuration]
Download this here is the ASP.NET Core I generated with VS2017 for demo!
mkdir /web/www cd /web/www wget https://files.cnblogs.com/files/project/webapp.tar.gz tar -zxf webapp.tar.gz
Third, Supervisor
【Install】
Official website:http://www.supervisord.org/
Command process:
yum install -y supervisor
[Configuration]
1, copy file
mkdir /web/supervisor cp /etc/supervisord.conf /web/supervisor
2, open supervisord.conf
vim /web/supervisor/supervisord.conf
3, add as follows
[program:webapp]
command=DOTNET Webapp.dll; command to be executed
directory=/web/www/ Directory for command execution
autostart=true ; Whether it is automatically started
autorestart=true ; Whether it is automatically restarted
stderr_logfile=/var/log/WebApp.err.log; standard error log
Stdout_logfile = / var / log / webapp.out.log; standard output log
【run】
supervisord -c /web/supervisor/supervisord.conf
Four, Nginx
【Install】
Official website:http://nginx.org/
Command process:
rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm yum install -y nginx
[Configuration]
1, copy file
mkdir /web/nginx cp /etc/nginx/nginx.conf /web/nginx cp /etc/nginx/mime.types /web/nginx
2, open nginx.conf
vim /web/nginx/nginx.conf
3, modified as follows
worker_processes 1; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; gzip on; server { listen 80; server_name localhost; location / { proxy_pass http://127.0.0.1:5000; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection keep-alive; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_cache_bypass $http_upgrade; } } }
View Code
【run】
nginx -c /web/nginx/nginx.conf
V. Effect Preview
AttachGenerally used orders
nginx
# nginx //Start Nginx # nginx -s reload //Restart Nginx # nginx -s stop //Close Nginx
supervisor
supervisord supervisorctl status //View all task status supervisorctl shutdown //Close all tasks supervisorctl start|stop|restart all //Control all processes supervisorctl start|stop|restart program_name //Control goal process
