Jump to content

What's the best way to manipulate lots of files via bash on unRAID?


KeithLM

Recommended Posts

I'm a relatively new user of unRAID, started with beta 6, and have come from using mdraid on Ubuntu for several years.  I have a large collection of media files and I'm used to manipulating them via various scripts I have written in perl and bash. 

 

I need to be able to ssh in and have my bash environment set up as I like it, install perl and some other apps as well as my scripts, and do lots of file processing that way.  From what I've gathered that's not the optimal way to work with unRAID, at least I shouldn't be logging in to the unRAID machine directly to do this, especially as root.

 

I'm gathering that I should do this via VM or the like, and mount the shares then ssh in to that.  But I can't figure out which of the myriad of options is best for me.  The VM Appliances and Xen forums here don't have a lot of recent activity, are those considered outdated methods?  Is KVM the optimal choice, or is there a Docker for something like this?  I want to go with whatever the best choice is for future versions of unRAID rather than accidentally picking up something that will be dropped in the near future. 

 

TIA

Link to comment

perl and bash are already in unRAID, at least they are on my v6b12.

 

Probably the main issue for you trying to work directly with the OS is that it is unpacked from a couple of files on the flash drive and then runs in RAM, so getting things to persist with reboots requires some extra effort.

 

It should be pretty easy to just set up a docker and give it access to your data. That is probably the best way to go if all you want is a shell to work from.

Link to comment

Right, the persistence is part of the problem I've run into, and I realize that can be worked around, but that also means I'd be running as root, and that bothers me.  That's what made me think that I should go with a virtual machine of some sort.  Also, I need to have convert (part of ImageMagik), and rar utilities and various other tools installed, and again, these are things I don't want to try pushing into unRAID. 

 

So are there Dockers that basically provide a lite version of Ubuntu?  It seems like that's what I would need. 

Link to comment

Do a google search for Docker Hub. Lots of activity in Dockerland!

 

Or if you think you may want to use some of the dockers created and maintained by/for unRAID users, many are based on the phusion base image docker (also on Docker Hub), which is a stripped down ubuntu that you can add whatever you want to. It can be more efficient to share base images between dockers.

Link to comment

Thanks, I'll check that out and see if I can figure out how to install dockers from other sources.  I've not ever looked into anything Docker related outside of unRAID, never even heard of it before I started messing with unRAID and I don't know much about it.  I didn't realize it was something that existed outside of unRAID until recently.  I wish there was something more discoverable here that explained what it was, who created it, and more about how to use it general.  I only hope that I've been using it right so that whatever can be shared between dockers is being shared. 

Link to comment

If you want more information on docker and what it is then head over to docker.com.

 

As to whether a docker is optimal for your use I am not sure.  Docker tends to be targeted at running a specific application(s) in a docker container - not providing a generic OS capability.    You use sounds as though it mat be better served by running a V m of some sort.  However read up on docker on the docker.com site to get a better idea of what van do.

Link to comment

... but that also means I'd be running as root, and that bothers me.  ...

That kinda bothered me, too. I was thinking of creating a user with high privileges just for the similar purpose... but my second thought was that unRAID is NAS, not full-scale Slackware Linux. On hardware NASs, is there users other than kinda-root?

 

BTW, I run my collection-handling  (renaming, cleanup, etc.., lot of stuff) Perl script on Windows laptop, accessing unRAID user share via network. Doesn't seem to cause any problems.

Link to comment

 

 

I'm a relatively new user of unRAID, started with beta 6, and have come from using mdraid on Ubuntu for several years.  I have a large collection of media files and I'm used to manipulating them via various scripts I have written in perl and bash. 

 

I need to be able to ssh in and have my bash environment set up as I like it, install perl and some other apps as well as my scripts, and do lots of file processing that way.  From what I've gathered that's not the optimal way to work with unRAID, at least I shouldn't be logging in to the unRAID machine directly to do this, especially as root.

 

I'm gathering that I should do this via VM or the like, and mount the shares then ssh in to that.  But I can't figure out which of the myriad of options is best for me.  The VM Appliances and Xen forums here don't have a lot of recent activity, are those considered outdated methods?  Is KVM the optimal choice, or is there a Docker for something like this?  I want to go with whatever the best choice is for future versions of unRAID rather than accidentally picking up something that will be dropped in the near future. 

 

TIA

 

If you're already familiar with ubuntu and your hardware supports it. I would suggest a KVM ubuntu vm with 9p file sharing.  With 9p sharing you can mount your unRAID directories into your vm. I usually just share /mnt in unRAID to /mnt in my vm.  There is a plugin for vm creation and management stickied in the kvm forums as well as threads about 9p.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...