News:

Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com

Main Menu

Mount /home to new hard drive?

Started by donpaul, March 07, 2009, 03:40:16 AM

Previous topic - Next topic

tschak909

pretty much instant. what device did you specify to mke2fs ?

-Thom

wierdbeard65

Paul
If you have the time to help, please see where I have got to at: [url="http://wiki.linuxmce.org/index.php/User:Wierdbeard65"]http://wiki.linuxmce.org/index.php/User:Wierdbeard65[/url]

wierdbeard65

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: [url="http://wiki.linuxmce.org/index.php/User:Wierdbeard65"]http://wiki.linuxmce.org/index.php/User:Wierdbeard65[/url]

tschak909

*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

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: [url="http://wiki.linuxmce.org/index.php/User:Wierdbeard65"]http://wiki.linuxmce.org/index.php/User:Wierdbeard65[/url]

tschak909

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

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: [url="http://wiki.linuxmce.org/index.php/User:Wierdbeard65"]http://wiki.linuxmce.org/index.php/User:Wierdbeard65[/url]

tschak909

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

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

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

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: [url="http://wiki.linuxmce.org/index.php/User:Wierdbeard65"]http://wiki.linuxmce.org/index.php/User:Wierdbeard65[/url]

wierdbeard65

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:-

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: [url="http://wiki.linuxmce.org/index.php/User:Wierdbeard65"]http://wiki.linuxmce.org/index.php/User:Wierdbeard65[/url]

Dale_K

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

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.