14 February 2020
Self Service File Shares : Server Setup
by This Guy
Self-Service File Server : Server Setup Let’s start that server up so we can start pumping out data dumps (because we all know that file shares are where data goes to die)!
Please see my first posting overview if you haven’t already.
Also, please note that this isn’t a step-by-step install. This is an install for my environment. Please use this as a framework for getting yourself up and running. I’m assuming you have some basic knowledge of most of these topics. And I’m including my scripts as well for helping to make your magic happen.
Ok. Now the fun part. Building out the server.
You have your fresh server. Add all the Roles and Features necessary.
Roles and Features
- Roles Installed (add Features as required by the Role)
- File and Storage Services
1. File and iSCSI Services
- File Server
- BranchCache for Network Files
- Data Deduplication
- DFS Namespaces
- DFS Replication
- File Server Resource Manager
- Storage Services
- Features Installed (add additional Features as required by the Feature)
- Windows PowerShell
1. Windows PowerShell 2.0 Engine
2. Remote Server Administration Tools
- Role Administration Tools
- AD DS and AD LDS Tools
DNS Config
Give your new service a name. I named mine ‘Depot’. Like a file depot. I thought about ‘Stacks’, but stacks of files is terrible. I originally just wanted ‘Shares’, but that DNS name was already taken by some other service. So Depot it was, and I may be referring to ‘Depot’ during later writings.
Local Server Admins
Create a domain service account that we’ll use as an administrator on the file server. I named mine ‘filemonitor’. Add this account as a local admin group.
Enable WinRM
Run Powershell as Administrator and enable WinRM. Lifted from KB555966
- Write the command prompt : “WinRM quickconfig” and press on the “Enter” button.
- The following output should appear:
- ``` “WinRM is not set up to allow remote access to this machine for management.
The following changes must be made:
Set the WinRM service type to delayed auto start.
Start the WinRM service.
Create a WinRM listener on HTTP://* to accept WS-Man requests to any IP on this
machine.
Make these changes [y/n]? y”
3. After pressing the "y" button, the following output should appear:
1.
``` "WinRM has been updated for remote management.
WinRM service type changed successfully.
WinRM service started.
Created a WinRM listener on HTTP://* to accept WS-Man requests to any IP on this machine."
Disk Config
We will be creating two disks, D: and E:. One drive will be the data drive (D:) and the other will be the archival drive (E:).
- Prerequisites
- NOTE If using SAN storage, you cannot use Windows Storage Pools. Set up SAN storage as normal D: and E: drives and skip Storage Pools setup below.
- For using non-SAN storage, each data drive (D: and E:) is made up of at least two drives and will make two Storage Pools. Please continue with the steps below.
- In Computer Management, Disk Management, Online the drives.
- In Server Management, go to File and Storage Services. Then Volumes, then Storage Pools.
- In Storage Pools, select Tasks, then New Storage Pools
- Follow the Wizard
1. Name the Storage Pool ‘DataSP’.
2. Select two of the four primordial disks for the Pool (assuming that you are splitting the 4 disks equally between the Data and Archive drives).
- Create the second Storage Pool following the Wizard
1. Name the Storage Pool ‘ArchiveSP’.
2. Select the remaining disks.
- Right click the new ‘DataSP’ Storage Pool and select New Virtual Disk
- Follow the Wizard
1. Select the Storage Pool
2. Name the Virtual Disk ‘DataVD’
3. Select ‘Simple’ layout
4. Select ‘Fixed’ provisioning
5. Select Maximum Size
- The New Volume Wizard will automatically pop up
- Follow the Wizard
1. Select Drive Letter “D”
2. Volume Label “Data”
3. Data Dedupe is “General File Server”
- Follow the same steps in step d. above to complete the config for the Archive drive.
Initial Folder Creation
Create the following folders:
- D:\Scripts
- D:\Shares
- D:\StorageReports
- D:\StorageReports\Incident
- D:\StorageReports\Interactive
- D:\StorageReports\Scheduled
- E:\FileExpiration
Create these custom permissions. The default permissions inherited creates some funky permissions later on. No need for that CREATE permission to persist. It makes for some more difficult troubleshooting of permissions for the helpdesk, or yourself.
- D:\Shares
- Remove Inheritance and copy permissions
- Remove all Users\Groups except SYSTEM and local Administrators and Domain Admins. They will all get Full Control.
Initual Scripts Setup
- Use the D:\Scripts folder to store all your scripts.
- One script needs to live outside the D:\Scripts folder. Put the MoveFile.ps1 (we’ll go over this script later) into the C:\Windows\System32 directory.
FSRM Setup
- Open the FSRM MMC console
- Right-click File Services Resource Manager and select ‘Configure Options’
- Email Notifications Tab
1. Default From address
- filedepot@domain.com
- SMTP server
- smtphost.domain.com
- Default Administrator email
- fileadmin@domain.com
- Report Locations Tab
1. Incident
- D:\StorageReports\Incident
- Scheduled
- D:\StorageReports\Interactive
- On-Demand
- D:\StorageReports\Scheduled
- File Screen Audit Tab
1. Check the box
- Automatic Classification Tab
1. Check ‘Enable fixed schedule’
2. Set a schedule for Midnight Weekly on Saturday
- Access-Denied Assistance Tab
1. Click “View assistance request settings”
- Check ‘Enable access-denied assistance’
- Edit the text in the box to the appropriate message. Example below.
- Click ‘Configure Email Requests
- Check ‘enable users to request assistance’
- Only check ‘Folder Owner’ and ‘Generate and eventlog entry’.
- Edit the email text with: ‘For general support, contact: helpdesk@domain.com’
- Creating the File Expiration Task
- Run Powershell ISE as Administrator
- Edit the ‘Create-FileExpiration.ps1’ to make sure that the –FolderDestination option points to E:\FileExpiration on line 5.
- Run the script
- Validate that the task has been created in the FSRM MMC console in the File Management Tasks section
- Edit Quota Templates
- Edit the template: 250 MB Extended Limit
- Rename it to ‘25GB Extended Limit’
- Space limit: 25GB
- Edit the template: 200 MB Limit with 50 MB Extension
- Rename it to ‘20GB Limit with 5GB Extension’
- Space limit: 20GB
- Edit “Warning (100%)
- Uncheck the send ‘send email to the following administrators’
- Select the ‘Command’ tab
1. Change Command Arguments to: “quota modify /path:[Quota Path] /sourcetemplate:”25GB Extended Limit””
Enable Data Dedupe
- Microsoft speak: From the Server Manager dashboard, right-click a data volume and choose Configure Data Deduplication. Select the Enable data deduplication check box, enter the number of days that should elapse from the date of file creation until files are deduplicated, enter the extensions of any file types that should not be deduplicated, and then click Add to browse to any folders with files that should not be deduplicated. In Server Manager, under File and Storage Services, and Servers, right-click the server and select Deduplication Schedule to continue to set up a schedule for deduplication.
If you choose ‘0’ it’ll dedupe all files no matter their age. I don’t think this is a wrong choice, but of course choose for the load on your server. On Win 2012, the task runs as a single process on a single core. This can end up being CPU bound and affecting SMB performance. Consider choosing a schedule where it is off-hours. This process got upgraded in 2016 and not so much a worry then.
Enable Shadow Copies
- Right click on the Data drive and select “Configure Shadow Copies”.
- Click on the Settings button
- Change the Volume to the Archive drive
- Set Maximum Size to No Limit
- Change the Schedule to Once a day Snapshots
- Select the Data drive and click the Enable button
- Click “yes” to enable Shadow Copies
- Eg. The D: drive should be storing Snapshots on the E: drive with a daily schedule.
I think that’s enough for the server setup. Next steps for setting up the Script will be in the next posting. Woo!
tags: