Author Topic: Mount /home to new hard drive?  (Read 14504 times)

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Mount /home to new hard drive?
« Reply #15 on: November 05, 2009, 03:30:30 pm »
pretty much instant. what device did you specify to mke2fs ?

-Thom

wierdbeard65

  • Guru
  • ****
  • Posts: 449
    • View Profile
    • My Quest
Re: Mount /home to new hard drive?
« Reply #16 on: November 05, 2009, 03:32:25 pm »
Code: [Select]
mke2fs -j /dev/cciss/c0d1p1
Paul
If you have the time to help, please see where I have got to at: http://wiki.linuxmce.org/index.php/User:Wierdbeard65

wierdbeard65

  • Guru
  • ****
  • Posts: 449
    • View Profile
    • My Quest
Re: Mount /home to new hard drive?
« Reply #17 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  :-[
Paul
If you have the time to help, please see where I have got to at: http://wiki.linuxmce.org/index.php/User:Wierdbeard65

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Mount /home to new hard drive?
« Reply #18 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

wierdbeard65

  • Guru
  • ****
  • Posts: 449
    • View Profile
    • My Quest
Re: Mount /home to new hard drive?
« Reply #19 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......
Paul
If you have the time to help, please see where I have got to at: http://wiki.linuxmce.org/index.php/User:Wierdbeard65

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Mount /home to new hard drive?
« Reply #20 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.

wierdbeard65

  • Guru
  • ****
  • Posts: 449
    • View Profile
    • My Quest
Re: Mount /home to new hard drive?
« Reply #21 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).
Paul
If you have the time to help, please see where I have got to at: http://wiki.linuxmce.org/index.php/User:Wierdbeard65

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Mount /home to new hard drive?
« Reply #22 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

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Mount /home to new hard drive?
« Reply #23 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.

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Mount /home to new hard drive?
« Reply #24 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

wierdbeard65

  • Guru
  • ****
  • Posts: 449
    • View Profile
    • My Quest
Re: Mount /home to new hard drive?
« Reply #25 on: November 05, 2009, 09:22:31 pm »
Thanks, guys!

I'll have a play and report back my findings :)
Paul
If you have the time to help, please see where I have got to at: http://wiki.linuxmce.org/index.php/User:Wierdbeard65

wierdbeard65

  • Guru
  • ****
  • Posts: 449
    • View Profile
    • My Quest
Re: Mount /home to new hard drive?
« Reply #26 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
Paul
If you have the time to help, please see where I have got to at: http://wiki.linuxmce.org/index.php/User:Wierdbeard65

Dale_K

  • Veteran
  • ***
  • Posts: 149
    • View Profile
Re: Mount /home to new hard drive?
« Reply #27 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?

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: Mount /home to new hard drive?
« Reply #28 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.