LinuxMCE Forums

General => Users => Topic started by: donpaul on March 07, 2009, 03:40:16 am

Title: Mount /home to new hard drive?
Post by: donpaul on March 07, 2009, 03:40:16 am
I am adding a new hard drive to the core, and want /home to use it. I want media separate from the OS drive, and will use hardware mirroring. Would anyone see a problem with mounting /home to a separate hard drive? I'll do the typical fdisk/mkfs to partition/format it, and place the mount point in /etc/fstab. I do not want LinuxMCE to treat it as a disk.
Title: Re: Mount /home to new hard drive?
Post by: colinjones on March 07, 2009, 03:54:33 am
yes that will be a big problem - cardinal rule, that is repeated everywhere on these forums and wiki, do not mount or symlink anything! No, just don't! Stop it! Right now!!

Partition and format your drive with ext3, then install it in your core and wait for LMCE to detect it and prompt you what to do with it. Tell it you want to use the LMCE folder structure and to use it automatically. LMCE will then do all the automounting and symlinking needed to present it to your core for media, and to all other MDs in the house completely transparently. If you attempt to mount or symlink it yourself, you will break LMCE's storage management mechanism (probably permanently!)
Title: Re: Mount /home to new hard drive?
Post by: donpaul on March 07, 2009, 04:00:22 am
LOL. That really blows! My current hd is 250GB, not near enough for my myth recordings, and I would hate to blow away my system to install LinuxMCE on my new 1.5TB. It really should be possible to add a second HD and mount it to /home. I also get bugged about having mythtv recording on the same part as the OS. Oh Well.
Title: Re: Mount /home to new hard drive?
Post by: donpaul on March 07, 2009, 04:01:53 am
Oh BTW, I searched the wiki and forum, but only really saw "do not use LVM" - Which I wouldn't. But I didn't see a defining "no you can't mount a second hard drive to /home".
Title: Re: Mount /home to new hard drive?
Post by: tschak909 on March 07, 2009, 04:13:52 am
Yeah, um.. don't mess with /home. :)

One of the things I am working on in 0810 is the usage of MythTV 0.21's Storage Groups. We will dynamically update the default storage group in MythTV as Storage Devices hop on and off the network. The system will then determine using a set of criteria which disk to use:

* Disk Space
* I/O Bandwidth
* etc.

This should solve that problem. We couldn't use it before, because it didn't exist in 0.20, and we didn't have time to build something that we knew was going to be obsolete anyway.

-Thom


-Thom
Title: Re: Mount /home to new hard drive?
Post by: donpaul on March 07, 2009, 04:32:10 am
That is great news! Thanks for the replies. I'm glad I asked before I tried it!

I can't wait for 0810! I am bringing up more hardware to try the alpha build.
Title: Re: Mount /home to new hard drive?
Post by: rocketlynx on August 14, 2009, 02:02:39 am
yes that will be a big problem - cardinal rule, that is repeated everywhere on these forums and wiki, do not mount or symlink anything! No, just don't! Stop it! Right now!!

Partition and format your drive with ext3, then install it in your core and wait for LinuxMCE to detect it and prompt you what to do with it. Tell it you want to use the LinuxMCE folder structure and to use it automatically. LinuxMCE will then do all the automounting and symlinking needed to present it to your core for media, and to all other MDs in the house completely transparently. If you attempt to mount or symlink it yourself, you will break LinuxMCE's storage management mechanism (probably permanently!)
I believe I've done this but LMCE fails to recognize it.
Collin, you've replied to me on another topic regarding the media drive dissappearing.  This is a different problem I'm working on for a friend setting up his first system.  We've got the core and a MD working great on 810-Alpha2.27, but I can't seem to remember how I got my second disk drive on my system up and running.


On his, I've partitioned the drive as one big 1.5TB volume (sdb) as ext3.  The motherboard sees it and if I go into Dolphin, it sees it and, in fact, has a Lost & Found Folder in it, but LMCE has not yet recognized it.  Many reboots and days have past, I don't think it's going to happen on it's own.

Any suggestions?

Thanks,
Charles
Title: Re: Mount /home to new hard drive?
Post by: colinjones on August 14, 2009, 02:09:57 am
hmmm

first make sure there is no device in the device tree to represent this disk

then check that the device isn't listed Unknown Devices (if it is, click Unlock)

then check the MySQL table pluto_main.pnpqueue - see if there are any pnp events in there for that device, either way, its probably best to delete all the events in that table

now reload the router and wait... in the pnpqueue you should see the disk being detected, and then it should create the device in the device tree and prompt you, etc.

if this doesn't happen, then it may be a problem with the storage radar not detecting the disk for some reason... we can look into that after you have tried the above.
Title: Re: Mount /home to new hard drive?
Post by: wierdbeard65 on November 05, 2009, 01:23:57 pm
Hi,

I have a similar problem. 810 beta.

Ok, I only see one disk listed in WebAdmin. That is my main disk (I think)
I can't see any unknown devices.
When I do a selct from PnPQueue I get 3442 rows returned. None have my core's IP address listed, so I assume none relate to the disk?

Should I delete the queue table contents?

Advice gratefully received - I don't want to have to rebuild because I do something wrong!
Title: Re: Mount /home to new hard drive?
Post by: tschak909 on November 05, 2009, 02:01:56 pm
you can safely delete the contents of the pnpqueue table.

-Thom
Title: Re: Mount /home to new hard drive?
Post by: wierdbeard65 on November 05, 2009, 02:24:01 pm
Thanks, Thom!

Is that it, or do I need to restart / reboot anything to get the disk recognised?

I should point out that I formatted the disk (ext3) before I installed Kubuntu / MCE to the other disk in the system, so it's been there all along. Any idea why it hasn't beed detected? Where should I look?
Title: Re: Mount /home to new hard drive?
Post by: tschak909 on November 05, 2009, 02:24:55 pm
reloading the router should be sufficient.

-Thom
Title: Re: Mount /home to new hard drive?
Post by: wierdbeard65 on November 05, 2009, 02:50:08 pm
Ok,

Did all that, but still nothing. No messages on Orbiter. Nothing in device tree.

PnpQueue now has 76 records, though!

Any ideas what I should try now?
Title: Re: Mount /home to new hard drive?
Post by: tschak909 on November 05, 2009, 02:52:27 pm
you partitioned the disk with fdisk and wrote a filesystem to it?

-Thom
Title: Re: Mount /home to new hard drive?
Post by: wierdbeard65 on November 05, 2009, 03:28:55 pm
I did, yes  :(

Just to be sure, I just deleted the partition and re-created it. I've then re-formatted to ext3.

How long should it take to show up in the orbiter?
Title: Re: Mount /home to new hard drive?
Post by: tschak909 on November 05, 2009, 03:30:30 pm
pretty much instant. what device did you specify to mke2fs ?

-Thom
Title: Re: Mount /home to new hard drive?
Post by: wierdbeard65 on November 05, 2009, 03:32:25 pm
Code: [Select]
mke2fs -j /dev/cciss/c0d1p1
Title: Re: Mount /home to new hard drive?
Post by: wierdbeard65 on November 05, 2009, 03:36:44 pm
I am able to mount the partition manually and see the lost+found there, so I'm guessing it's formatted ok. (I umounted it after the test ;) )

Not sure if that helps  :-[
Title: Re: Mount /home to new hard drive?
Post by: tschak909 on November 05, 2009, 03:43:49 pm
*hmm*

damn you all and your fucking RAID controllers.

That's why it's not finding it, because there isn't a device named /dev/sdX or /dev/hdX ....

Can somebody make a patch, please?!

-Thom
Title: Re: Mount /home to new hard drive?
Post by: wierdbeard65 on November 05, 2009, 03:51:52 pm
I'm sorry - I didn't know it was an issue  :o

Ok, I don't have the skills to make a patch, although I'm happy to do the donkey work if someone can tell me what to do......
Title: Re: Mount /home to new hard drive?
Post by: tschak909 on November 05, 2009, 03:53:58 pm
Please, just make an issue in trac, and somebody will pick it up and add support for it to the storage radar.

sorry for snapping.


Thanks.
Title: Re: Mount /home to new hard drive?
Post by: wierdbeard65 on November 05, 2009, 05:12:00 pm
No apology necessary - I'm well aware that you get loads of stupid questions from people that try to fight the system!

Ok, I'll enter it into trac.

In the meantime, can I manually mount it in any way? If so, where should I mount it so as to not break anything (now or in the future).
Title: Re: Mount /home to new hard drive?
Post by: tschak909 on November 05, 2009, 05:26:15 pm
nope, you won't be able to. The storage radar and the automounter need to be updated to be aware of devices in that part of /dev.

-Thom
Title: Re: Mount /home to new hard drive?
Post by: colinjones on November 05, 2009, 09:16:48 pm
weirdbeard

In the meantime you can give it a go yourself - the code in question is a script not a binary, so you do not need a dev environment or to recompile to tinker! The main detection script is /usr/pluto/bin/StorageDevices_Radar.sh

In there you will find a function called Detect. In the first few lines you will see it 1) enumerating all the visible partitions using "cat /proc/partitions" but filtering out only those that start "sd" or "hd" using an awk command. It then moves on and eliminates any partitions starting with "sd" and "hd" already mounted, swap partitions, software RAIDS, etc. Finally, if there are any partions left, it will fire the DCE message that tells LMCE to add that partition. So in the first instance, you need to modify the detection script so that it also detects your partition type. This could be as simple as changing:

(sd|hd).[0-9] ... to
(sd|hd|<blah>).[0-9]  ... in both locations in that script

Where <blah> will match the unique pattern of your RAID partition name when you type cat /proc/partitions

There could be more to it, as I haven't looked into much of the rest of it, but this change alone will at least add your partitions to the detected list.
Title: Re: Mount /home to new hard drive?
Post by: tschak909 on November 05, 2009, 09:18:21 pm
the relevant automounter code is also in /etc/auto.plutoStorageDevices

You may also need to edit /usr/pluto/bin/Configure_1790.sh, as this is the script that configures internal HDDs to the system (1790 is the device template # for an Internal HDD)

-Thom
Title: Re: Mount /home to new hard drive?
Post by: wierdbeard65 on November 05, 2009, 09:22:31 pm
Thanks, guys!

I'll have a play and report back my findings :)
Title: Re: Mount /home to new hard drive?
Post by: wierdbeard65 on November 05, 2009, 11:39:36 pm
Ok,

I don't claim to be a guru (not even close!) when it comet to shell-script programming, but I modified the StorageDevices_Radar.sh file and added a line to Detect as follows:-

Code: [Select]
function Detect {
        ## Available partitions
        availPart=$(cat /proc/partitions | awk '/(sd|hd).[0-9]/ { print $4 }')
        availPart=$availPart$(cat /proc/partitions | awk '/(cciss).*p[0-9]/ {print $4 }')
        ## Remove Mounted partitions
        mountedPart=$(mount | awk '/dev\/(sd|hd).[0-9]/ {print $1}' | sed 's/\/dev\///g')
        availPart=$(substractParts "$availPart" "$mountedPart")



This seemed to make my second (raid) volume appear. Obviously, I don't know what is required for other controllers, but it may help others. :D
Title: Re: Mount /home to new hard drive?
Post by: Dale_K on November 06, 2009, 05:28:03 pm
My raid controller makes a volume that was then recognized as /dev/sdc.  I used gparted and mkfs, no problems with LMCE autodetecting or anything, is that unique to certain controllers?
Title: Re: Mount /home to new hard drive?
Post by: colinjones on November 06, 2009, 11:09:22 pm
Dale - that works for you because your RAID controller is presenting the volumes as if they were normal SATA drives, ie /dev/sd* and LMCE is designed to recognise both sd* and hd*. In weirdbeard's case, the controller presents the device as a completely different (proprietary) device name so LMCE doesn't see it. That will be the case for any storage device that does the same.