Author Topic: Move public onto new volume?  (Read 5685 times)

nosebreaker

  • Guru
  • ****
  • Posts: 202
    • View Profile
Move public onto new volume?
« on: January 13, 2009, 10:16:39 pm »
So I have a 3TB array, of which I am only using 100GB right now.  By default it appears there is a /home/public, of which I can see it shared via Windows and such.  I want this public share to be moved onto /dev/sdb (the rest of the array).  I haven't partitioned it or anything yet, is it possible to move the public user and share onto this drive?  Do I have to create a link to it in /home/public after I create a partition?

Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: Move public onto new volume?
« Reply #1 on: January 14, 2009, 03:40:34 am »
In short: don't mess with mounting and symlinking.  Instead just partition and format that sdb drive and LMCE will detect it and ask you what to do with it.  You'll want to use the LMCE directory structure, so chose that when asked.
"Change is inevitable. Progress is optional."
-- Anonymous


nosebreaker

  • Guru
  • ****
  • Posts: 202
    • View Profile
Re: Move public onto new volume?
« Reply #2 on: January 15, 2009, 04:35:20 pm »
Ok, but will there be a public folder on there?  I want the smb share that Windows sees to be on there.

skeptic

  • Addicted
  • *
  • Posts: 615
    • View Profile
Re: Move public onto new volume?
« Reply #3 on: January 15, 2009, 07:17:56 pm »
If you do like Zaerc says, it will create the lmce directory structure, including creating and sharing of a public directory.

nosebreaker

  • Guru
  • ****
  • Posts: 202
    • View Profile
Re: Move public onto new volume?
« Reply #4 on: January 15, 2009, 07:59:28 pm »
Thank you.  So I will have 2 shares when finished, the original on the 100GB volume and another on the 2.7TB volume, correct?

skeptic

  • Addicted
  • *
  • Posts: 615
    • View Profile
Re: Move public onto new volume?
« Reply #5 on: January 15, 2009, 09:14:33 pm »
no, at least not using my 2 drive setup as an example.  What you end up with is still the one public share, and within the various sub directories you will find another subdirectory (folder) for your other drive.  The second drive will have the directory structure for public, user_1, user2, etc. 

Might be better with ls examples (the 7500* and /mnt/device/39/public/data/ refer to my external usb drive):
Code: [Select]
dcerouter_74105:/home/public/data/videos# ls -l /mnt/device/39/
total 44
drwxr-xr-x 6  500 root  4096 2008-05-10 22:18 backups
-rw-r--r-- 1 root root     0 2008-02-14 18:16 blah
drwx------ 2 root root 16384 2008-02-14 13:17 lost+found
drwxr-xr-x 3 root root  4096 2008-02-27 16:05 public
drwxr-xr-x 3 root root  4096 2008-02-27 16:05 user_1
drwxr-xr-x 3 root root  4096 2008-02-27 16:05 user_2
drwxr-xr-x 3 root root  4096 2008-02-27 16:05 user_3
drwxr-xr-x 3 root root  4096 2008-02-27 16:05 user_4
drwxr-xr-x 3 root root  4096 2008-05-08 12:25 user_5

dcerouter_74105:/home/public/data/videos# ls -l /home/public/data/videos/
total 144
lrwxrwxrwx 1 root public     33 2009-01-14 15:27 7500AAK_External (sdb1)-CORE [39] -> /mnt/device/39/public/data/videos
drwxrwsr-x 2 root public 126976 2009-01-15 04:00 tv_shows_1
drwxrwsr-x 2 root public   4096 2009-01-14 21:06 tv_shows_50
drwxrwsr-x 2 root public   4096 2008-10-10 01:01 tv_shows_77
drwxrwsr-x 2 root public   4096 2008-10-10 19:52 tv_shows_86
drwxrwsr-x 2 root public   4096 2008-10-12 19:58 tv_shows_97

When I browse the windows shares I see public.  Continuing the above example, if I drill down I see the folder public\videos\7500AAK_External (sdb1)-CORE[39]\ and in that folder are all the videos I have on my 2nd drive.

All I did was plug in my USB drive and tell LMCE to use the LMCE directory structure.

nosebreaker

  • Guru
  • ****
  • Posts: 202
    • View Profile
Re: Move public onto new volume?
« Reply #6 on: January 16, 2009, 04:24:21 pm »
Yeah, see that's what I don't want.  People won't understand that they need to put files in the subfolder, they'll put them in the root share folders.

So how can I move the public user onto a separate volume?

skeptic

  • Addicted
  • *
  • Posts: 615
    • View Profile
Re: Move public onto new volume?
« Reply #7 on: January 16, 2009, 06:11:53 pm »
How many people are we talking about that will be putting stuff in public?  Is it possible to just tell these people to go to one more folder?  You have to tell them how to get to the public folder in the first place, I can't imagine it being that difficult to have them go one folder farther... 

Doing what you want is pretty simple in Linux, you could change your mounts such that /home is mounted from your second drive, but I'm afraid it might break LMCE.  The best advice is to use LMCE as it was designed, and for things like copying from a non-LMCE box to a public share, just educate the user. 

If that doesn't work, you can always create a shortcut for them that goes straight to the folder/directory you want them to dump stuff into.

nosebreaker

  • Guru
  • ****
  • Posts: 202
    • View Profile
Re: Move public onto new volume?
« Reply #8 on: January 16, 2009, 08:03:27 pm »
I've found that educating users doesn't always work.  The solution is to make the software act like the user expects it to!

The # of users is going to be the # of guests that come over, so quite a few.

Is LMCE that complex that people don't know how it works?  Can I search the code somehow to see what might be hard-coded to use public there?

jthodges

  • Veteran
  • ***
  • Posts: 60
    • View Profile
Re: Move public onto new volume?
« Reply #9 on: January 16, 2009, 08:31:06 pm »
Can I search the code somehow to see what might be hard-coded to use public there?

Is that a real question?  http://wiki.linuxmce.org/index.php/Source_Code

Edit - sorry, that came across a little snotty... but the answer is of course you can, and you can get the source by following the instructions at that link.
« Last Edit: January 16, 2009, 08:34:41 pm by jthodges »

skeptic

  • Addicted
  • *
  • Posts: 615
    • View Profile
Re: Move public onto new volume?
« Reply #10 on: January 16, 2009, 09:23:18 pm »
I've found that educating users doesn't always work.  The solution is to make the software act like the user expects it to!
It already does.  Of course the more users you have, the more different expectations you will run across.  Having a separate share for every drive makes less sense to me than having a single one.  LMCE knows about sub directories and the whole point is to isolate or hide the directory structure based hierarchy. The user doesn't need to know or care where media is stored, and it will make intelligent decisions where to put stuff if you don't try to do manual things.  I admit I'm guilty of ripping my [legally bought] DVDs on my desktop and copying them over, but I know it's not the lmce way to do things and I accept the added hassle that comes with it.
Quote
The # of users is going to be the # of guests that come over, so quite a few.

Is LMCE that complex that people don't know how it works?  Can I search the code somehow to see what might be hard-coded to use public there?
Why do you think nobody knows how it works?  You are telling us how you want it to work (counter to it's design), and a couple of us are telling you how it really works and giving you ideas on how to make that work for you.  I suspect a number of other people just read the thread and ignore it.  Not because they don't know, but because you are asking for functionality counter to the intentional design and they don't want to get into a back and forth discussion on why it is the way it is.


Instead of trying to change the way LMCE works, to trying to mess with links, shares, mounts and such that will get you in trouble, lets go back to what you are trying to accomplish.

You plan to have guests over that will dump videos, music, whatever onto your server.  Ignoring the obvious questionable legality of it all, are these people going to be using one of your computers or will they be using their own laptop?

Your computer/desktop/whatever:  Just make a desktop shortcut to the correct sub directory and have them use that.  This is easier than anything else.

Their laptop option 1:  Tell them to drop the files in your sub directory.  You are already telling them the server, public, videos/audio/pictures/whatever, already.  One more directory is NOT going to be that much more to learn.

Their laptop option 2:  Either create a shortcut for them, or walk them through making the shortcut the first time.  After that they just use the shortcut and are done.

Manual approach:  Let them drop stuff wherever and simply move the files from your small hd to your large one.  LMCE deals with this automatically, and the only oddity I know of is if you go into media sync and click the button to show missing files you will see all the files that LMCE knows USED to be on your smaller drive.  No biggie.

Don't like those suggestions 1:  I'm not sure of your setup, but you may be able to configure your 3TB array and your small drive to appear as a single 3+TB drive to the OS instead of multiple drives.

Don't like those suggestions 2:  Put your 3TB on a NAS.  Let LMCE pick it up and use it in it's own way, and have your guests drop stuff off on the NAS directly, not going through your LMCE shares at all.

Don't like those suggestions 3:  Mess with links, mounts, manual shares, etc. There is probably a way to do it without breaking stuff.  Just don't ask us how to fix it.

Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: Move public onto new volume?
« Reply #11 on: January 17, 2009, 12:45:42 am »
...
Is LMCE that complex that people don't know how it works?  Can I search the code somehow to see what might be hard-coded to use public there?

It's probably more because you refuse to listen when people try to explain something to you.
"Change is inevitable. Progress is optional."
-- Anonymous


nosebreaker

  • Guru
  • ****
  • Posts: 202
    • View Profile
Re: Move public onto new volume?
« Reply #12 on: January 17, 2009, 12:53:40 am »
Wow talk about hate because I don't want to do what is recommended.  I'm sorry your solution doesn't solve the original problem for me, no need to be snippy about it.

I marked the partition disklabel as gpt with parted, then it formatted as ext2, and LMCE picked it up (BTW, drives over 2TB don't play nicely with the GUI tools).  I then told it to make the whole thing public, and it rebooted and then a Storage41$ windows share appears.  Now Windows doesn't see $ shares by default, so this isn't good.  It does appear to be working fine though.

To answer the above questions:
People will come over with their laptops/desktops and want to put videos onto the server.  They won't have someone to tell them which folder to put it into, and some of these videos are over 100GB, so they just won't fit if they try to put it into the public share.  I'm not talking about people dumping warez or pirated movies or whatever, I'm talking about HD videos.

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Move public onto new volume?
« Reply #13 on: January 17, 2009, 12:59:35 am »
Just share the right folder out using Samba, make it publically visible and name it something obvious. If it is the only public share visible on the core, then that is where your visitors will put their data... it can't get any simpler than that! If they can't even handle that, then technology is not the problem here and any solution you come up with is susceptable to the claim "they won't get that".

Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: Move public onto new volume?
« Reply #14 on: January 17, 2009, 01:04:43 am »
Wow talk about hate because I don't want to do what is recommended.  I'm sorry your solution doesn't solve the original problem for me, no need to be snippy about it.
...

Awww gosh, did my stating the obvious offend you? :D

And I'm sorry you once again have to learn the hard way, good luck!
"Change is inevitable. Progress is optional."
-- Anonymous