Shares vs. Folders on a linux server with Windows clients
This is my first try at a Ubuntu server (and I'm struggling a bit). I have four Windows clients, two smart TVs, four squeezeboxes of various descriptions and one linux box - none are heavily used concurrently. Hardware-wise it's a older Sempron with a 4TB raid 5. I have a small SSD as a system drive and a bigger RAID array (md0) for data.
So far I've created a share at /dev/md0/data. Should I continue to create shares under /data for /public, /music, /videos, /user1, /user2, etc. or can I simply use Windows to add these as folders?
I also want to start backing up the various machines on the network using Windows File History. Should I set up shares (or folders) for each machine?
Thanks for any advice. Including 'you can't get there from here' if my half-baked plan isn't feasible.
Posted Feb 1, 2019, 8:21 PM UTC
I assume you've mounted
/dev/md0somewhere like/mnt/storageand created adatafolder there?This is probably a matter of preference, but the simplest solution would be to just mount the
\\server\datashare as a drive letter in Windows and start creating folders within that.WFH is okay, but I recommend looking at a more robust solution if you're serious about backups. I recommend Veeam Agent for Windows, which is free. You can even do bare-metal restores if your machine's hard drive dies.
When you point Windows File History to a drive, it will create a folder structure like
F:\FileHistory\%USERNAME%\%COMPUTERNAME%. Veeam Agent will createF:\VeeamBackup\Backup Job %COMPUTERNAME%.This sounds feasible. I think you're on the right track.
Thanks for the informative reply (I'm still parsing some if it :). Like I said, I'm very new at this and still struggling. (How on earth do you linux guys remember all those cli commands?)
I did not, and it sounds like I missed something pretty basic. Is using /mnt/storage as a mount point important?
shows, along with others including sda the system drive
Please correct me - I was thinking that when I get up the nerve to edit the config files and restart Samba, I will have a share called //server_name/data that points to /dev/md0/data.
We don't. The simple stuff sticks but the rest is usually a lot of consulting the manual or Google.
Yes, you need to use a mount point.
/devis a raw device. The kernel doesn't know what to do with it yet.mkfs) and then get mounted somewhere (seemount)./mnt.Right, so you do have
/dev/md0mounted as/datathen, that's good.There's nothing wrong with that setup, except that you should just avoid mounting in the root directory.
No you'll just point the
pathvalue of the Samba share to/data.
I'll chew on that for a bit. If I'm reading correctly, I should change
to
to follow convention, and go from there.
If you don't mind, how would you set this all up? If I'm asking too much, apologies. It almost seems like meeting an MD at a party and asking for a consultation there and then.
In any case, thanks again for the help.
No, /data is the path, which points to the device /dev/md0
Anything under /dev is a device, and can't be directly manipulated. So you'd have /dev/sda for your first (a) scsi disk for example.
Every device must be mounted on a path. In your case that path is /data
This is what you use to access the files on the device. Just "/data" alone, which is technically a folder named data under the root of your filesystem.
Set your share to /data since that is where you mounted the drive
Outside of mounting or fstab you shouldn't be pointing anything at /dev stuff
It's finally making some sense. Many thanks. I added a few folders under /data and mapped to them successfully. I did have some struggles but got there in the end.
The biggest time sink was a windows "access denied" and wanting network credentials. Turns out I had no users defined for Samba (that was 3 hours).
Recent studies into the brains of programmers show programming languages aren't much different from normal human languages. They use that part of the brain, mostly. So, just like learning a second language, it takes studying, exposure, and time. If you use it all the time, you will learn it quicker, if you don't... you won't. Also, you'll only really remember the stuff you actually use regularly, just like normal language. We invented programming languages to "talk" to machines, since they can only understand 1's and 0's, and we can't really.
For me, I've been using CLI for about 13 years. I still use manuals and guides on a regular basis, but I'm much quicker than I used to be, just as if you were to look up a word in the dictionary you couldn't remember how to spell. If you really want to learn, just keep at it, and try to play around with the command line every day, even if you just log on and check updates, or move around files, or check the status of something. It builds familiarity, and one day, you'll just be comfortable.
Interesting, thanks for the reply.
Hey just noticed.. it's your 6th Cakeday bigtips! ^(hug)