NAS
This chapter covers the keelNAS menu: the small NAS on the host. It is a file service running in a VM on the host. It offers shared folders (SMB) and iSCSI, with snapshots and protected storage. You manage it from this menu, without going into that VM.
Note: This menu appears only once a keelNAS has been deployed on the host (or you are an administrator, who sees the entry "Get it in the market"). The keelNAS package is downloaded and deployed from the Market.
1. Deploying a keelNAS
- Open the Market, click Download on the keelNAS card, and when the download finishes click Deploy. Or, if there is no keelNAS yet, open the keelNAS menu and click Get keelNAS in the market.
- In the Deploy a keelNAS dialog fill in: - Name; - keelNAS version (choose one if several versions are on this host); - Network: which network the keelNAS connects to; - Memory (GiB); - Data disk on this host's pool (GiB, 0: none): gives it a virtual data disk on the host's storage pool. Enter 0 for none, and hand it real disks or a controller from the host later.
- Click Deploy and start. The system disk is 20 GiB, generated from the package.
The page says "keelNAS is starting; it will appear here by itself when ready, usually in under a minute".
When the host has several keelNAS, the keelNAS page first lists All keelNAS, and you click the one you want.
At the top of the page are this keelNAS's name and the Rename and Delete buttons. Delete removes its VM and all its disks; the files in the shares are gone too and cannot be recovered. When the keelNAS VM is not running (shut down, suspended), the page states the condition and offers Start keelNAS or Resume keelNAS. Forget this keelNAS only makes this page stop managing it; the VM and the data stay.
The page has 7 sub-tabs: Overview, Storage, Hardware, Shares, Users, iSCSI, Network.
2. Overview
It shows whether the SMB and iSCSI services are running, keelNAS's memory, and the state of each storage (protected or not) and how much is used. The Needs attention box lists problems, for example:
- "A disk in some storage has stopped working: the data is not protected now. Please replace the disk."
- "Some storage has only one disk: if it fails the data is gone. Add a disk to protect it."
- Storage nearly full; a disk reporting that it is about to fail; the last check found errors that could not be repaired; a snapshot was not taken.
When the keelNAS is older than the package, the page shows Upgrade…: keel takes down its settings, shuts it down, swaps the system disk for the new version, and starts it again. Storage, shares, users, the link to keelAuth and the address stay as they are; file shares and iSCSI are unavailable for about a minute. If the new version does not come up properly, keel switches back to the old one by itself. The old version is kept for 7 days, during which you can Roll back, or Keep this version once you are happy.
3. Storage
A keelNAS storage is a ZFS pool. The page shows each storage's capacity, usage, state and whether it is protected. The disks keelNAS uses are the ones handed to it (the data disk in §1, or disks and controllers from the host passed through to it on the VM's page, see Device Passthrough and Hardware).
Making a storage:
- Click New storage.
- Choose disks: One disk, or two that hold the same. With two disks choose Protect the data: the two disks hold the same (recommended) (a mirror). There is no way to join two disks together without protection; if you want two independent storages, make two.
- Click Make the storage. Whatever was on the disks is erased.
When no disk is free the page says "No free disk: add a disk to the keelNAS VM first". Disks that are not empty, belong to a pool that is not imported, or carry a destroyed pool are marked with the reason, and keelNAS does not write to them.
For each storage you can:
- Protect (a single-disk storage): choose another disk to make a mirror; whatever was on that disk is erased;
- Add, take out or Replace a disk: adding a disk gives the data another copy; taking out lets a disk leave the mirror (not the last working disk); replacing lets a new disk take over from one that is gone, broken or smaller, and the storage copies the data onto it;
- Check the data regularly (scrub): reads all data once and repairs what the mirror can repair. Shares keep working, a little slower during the check. The default is every 30 days, in UTC;
- Automatic snapshot settings: how many hourly, daily and weekly snapshots to keep; 0 means none of that kind. Snapshots taken by hand are never removed automatically;
- Export: the storage leaves keelNAS together with its data (for example to move the disks to another machine); first remove the shares and LUNs on it;
- Delete: destroys everything on this storage and frees the disks. It cannot be undone, and you must type the storage's name to confirm.
Pools found on the disks: ZFS pools made elsewhere and not yet imported are listed here, and keelNAS does not touch their disks. Click Import and the data stays as it is, with no upgrade and no setting changed; if the name duplicates an existing one, choose another name first.
Under each storage is a list of datasets. For each dataset you can Share (make an SMB share), Browse (look at its files, read-only), New dataset, and switch Auto snapshots on or off. If the files in a dataset do not belong to a keelNAS user (for example a pool imported from elsewhere), click Change owner first to make the files belong to one of keelNAS's users; only then can it be shared.
4. Hardware
The Hardware tab lists every disk in keelNAS with its SMART readings: health, temperature, power-on time, reallocated/pending sectors and life used (media errors for NVMe). Click the health cell to see everything the disk reports. The data is read once when you open the page and then every minute while it stays open; disks that are asleep are not woken, and show the value from the daily check (marked standby). Disks are grouped by controller.
5. Users and shares
Users are the people who can open the shares. Note that these are not keelOS login accounts; they are used only inside keelNAS.
- Open the Users tab, click New user, enter a User name and Password, and click Add user.
- Change password sets a new password for an existing user; deleting a user removes it from all shares.
The Shares tab lists the shares: name, dataset, address (\\<keelNAS address>\<share name>), who can read and write, who can only read, and the space used.
- First you need a storage and a user; otherwise the page says "Before making a share you need a storage and a user".
- Click New share, enter a Name (lowercase letters, digits,
-and_, starting with a letter, at most 32 characters) and, if there are several storages, choose the Storage. - In the user list choose Read and write, Read only or No access for each person. With many users you can Search users and groups or tick with access only.
- Click Make the share.
Every share needs a user name and password: Windows does not accept shares that are open to everyone. Edit ("Who may use xxx") changes the permissions, and Delete removes the share (the files stay on the storage).
Snapshots: every share has a Snapshots button that lists its snapshots (time, kind: hourly, daily, weekly, by hand); you can Take one now or delete them. An hourly snapshot is taken automatically when there are changes. On Windows, right-click a file or folder in the share, choose Properties, then Previous Versions, to get back older versions.
Using keelAuth accounts
When the host has a keelAuth, the Users tab has Accounts from keelAuth: click Connect to keelAuth, choose a keelAuth and click Attach. From then on keelAuth's users and groups can open the shares with their keelAuth password, and you can pick them (and groups, written @name) when choosing users for a share. Password changes, disabling and deleting follow within a few seconds; local users stay as they are.
- Users and groups are changed in keelAuth (see Accounts, Tokens and Permissions), not here.
- The SMB column of the list says can log in, disabled in keelAuth, or no SMB password yet: set the password once more in keelAuth.
- Sync now synchronises right away. When you Disconnect, choose what happens to the users that came from keelAuth: turn them into local users (those who can log in keep their password, and a share's groups are replaced by their members), or delete them (none of the shares can use them any more).
6. iSCSI
The iSCSI tab offers block devices to other machines. Click New LUN, enter a Name and Size (GiB), choose the Storage if there are several, and click Make the LUN. The list shows each LUN's name, size and IQN (used when connecting). Delete removes the LUN, and the data stays on the storage.
7. Network
The Network tab holds keelNAS's own LAN settings: Address from (DHCP (automatic) or Fixed address), Address, Gateway, DNS servers, and whether the NIC is connected. It takes effect a few seconds after saving; computers that reach the shares by the old address must switch to the new one.
keelOS manages keelNAS over its own internal link, so even a wrong address here can always be corrected. A keelNAS deployed very early lacks this internal link, and a wrong address then cuts you off; the page says so, and deploying a new one from the market gives you the link.