HDD Setup Question.

Hi everyone, and Merry Christmas :slight_smile:

My computer is currently setup as follows:

tb1 contains HDMovies
tb2 contains TV
tb3 contains SD Movies / Music

Now, both tb1 and tb2 are nearly full, and being a stickler for organization, the only way I can think to add more space is to add a tb4 which could then contain HDMovies2 or TV2, but then things would be separated.

Would there be any way to transparently add storage to the existing HDMovies folder (And/or the TV folder, I could always buy a tb4 and tb5 if necessary) using another harddrive? Somehow I don’t THINK this is possible, but I figure it’s worth asking the experts. :slight_smile:

Thanks so much,
LC1

EDIT: (Why can I never edit my own posts?)

I just remembered about RAID0, which would effectively do what I’m asking, but the only way I can think to set it up would be to buy two new TB harddrives, set them up to be RAID0, then copy all the data from tb1 and tb2 to the new raidtb, then reformat tb1 and tb2 to also be raid0, then transfer back half of what I put on raidtb to the other raidtb, and then be off to the races.

Is there anyway to setup RAID0 with existing data just by adding a single harddrive? So I wouldn’t have to do so much copying…

what about lvm?

You could mount another harddrives partition in an existing path.

How would I do that? I could just then point them each to the same directory, for example in ~/Videos I’ve linked /tb1/HDMovies. How would I connect another TB to the same place?

On 2010-12-25 15:06, LostChild1 wrote:

> Would there be any way to transparently add storage to the existing
> HDMovies folder (And/or the TV folder, I could always buy a tb4 and tb5
> if necessary) using another harddrive? Somehow I don’t THINK this is
> possible, but I figure it’s worth asking the experts. :slight_smile:

Via raid 0 or lvm (better lvm), after a reformat. However, both options are
less safe than a single disk, or several separate disks.

I would have a tree like:

/data/HDmovies/1
/data/HDmovies/2
/data/SDmovies/1
/data/SDmovies/2
/data/TV/1
/data/TV/2

where each directory can be on a different disk, mixing them as you like.

There is no way that I know of to join the contents of two directories in a
single one. Perhaps with one of those enterprise level storage solutions,
in several layers (fast disk, big slow disk, tapes, offsite storage, etc).
It is transparent, and expensive.

There is a way to mix the contents of two directories into one, by
symlinking every single file

/data/allmovies/movie_0001 → /data/HDmovies/1/movie_0001
/data/allmovies/movie_0002 → /data/HDmovies/1/movie_0002
/data/allmovies/movie_0003 → /data/HDmovies/2/movie_0003
/data/allmovies/movie_0004 → /data/HDmovies/2/movie_0004
/data/allmovies/movie_0005 → /data/HDmovies/2/movie_0005

which you can create that with a script. However, when writing you have to
select write to one of the real destinations, not to the joined space. Or
write directly to /data/allmovies/ and have another script move the files
to the final destination and create the link.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” at Telcontar)

As a student, I’d like to brush up on my bash skills, and can pretty much guess how to write the script. My only question is, how would I make it run each time something is written to /data/allmovies? Would it start on system launch and monitor folders for change? How could I go about doing that part?

On 2010-12-28 00:36, LostChild1 wrote:

> As a student, I’d like to brush up on my bash skills, and can pretty
> much guess how to write the script. My only question is, how would I
> make it run each time something is written to /data/allmovies? Would it
> start on system launch and monitor folders for change? How could I go
> about doing that part?

That would be very nice :slight_smile:

But, it would be too complex, because you have to run it after you know that the files are fully
written, that they are not still been written to.

It you have an usage pattern, like files are written before some hour in the day or the week, then a
cron job would be the thing. Or you could do it after 5 minutes a certain user logs out.

File writing can be monitored with famd, I understand.

Perhaps you could trigger the job after a safe time has passed since the file was last written to,
and nobody has it opened. It can be a cron job checking timestamps.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” GM (Minas Tirith))