LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 12-26-2007, 11:40 PM   #1
Guntherk9
LQ Newbie
 
Registered: Dec 2007
Posts: 2

Rep: Reputation: 0
Question Content Management System across multiple volumes


Good Morning everyone and Happy Holidays,

I''m currently running Ubuntu Server 7.10 with an attached SCSI 16Bay RAID Array. The RAID is currently configured for RAID5 and fully populated for a file storage area of 11.25TB''s. I''ve partitioned the 11.25TB''s into 5 - 2TB volumes and 1 - 650GB Volume and formated them all as ext3.

Everything is working fine and the setup was painless.

Here is my problem: As I begin to fill these volumes with folders and files, Is there a content management system or a something else that I can use to keep track of which ext3 volume a certain folder or file is located on? I found myself spending a lot of time searching these volumes for a specific folder and/or file. Or maybe a script to that can be executed across all the volumes and list and / or sort the folders by name, etc.

Also, I would want this content manager to be able to notify or alert of any duplicate folders existing on these 6 volumes.

Any suggestion would be much appreciated.

Sincerely,

Gunther
 
Old 12-29-2007, 02:36 PM   #2
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 231Reputation: 231Reputation: 231
How much scripting do you know?

Have you looked @ Beagle?
 
Old 12-29-2007, 03:52 PM   #3
Deleriux
Member
 
Registered: Nov 2003
Posts: 89

Rep: Reputation: 16
The application locate can be used to do something of that nature. Its an indexed file searching engine.

You can update the engine using the application updatedb. I assume you expect large quantities of data to regularly be put to disk so would suggest you run updatedb every 20 minutes or so, just need a cronjob.

You'll need to write some shell scripts if you want to detect duplicated folders.

Might be a better solution mind to prevent duplication by guaranteeing uniqueness of your folders instead of reported duplicates after the fact.

Last edited by Deleriux; 12-29-2007 at 03:55 PM.
 
Old 01-01-2008, 08:11 PM   #4
Guntherk9
LQ Newbie
 
Registered: Dec 2007
Posts: 2

Original Poster
Rep: Reputation: 0
Happy New year everyone,

Thank you archtoad6 and Deleriux for all your help. Over the course of the holidays, I've developed this script to get some of my issues solved. I'm not great at script writing as you can tell from the code below. Try not too laugh to much

Maybe a real programmer could take a look at my code and tweak it. It's a work in progress. At this point the script is functional for my needs, but any help or idea's would be appreciated. I also have a cron job to execute 'updatedb' every couple of hours.

With Many Thanks

Gunther

----------------------------------------------------
#! /bin/sh
clear
echo
echo " RAID ARRAY Search & Directory Listing"
echo " -------------------------------------"
A=x
until [ "$selection" = "$A" ]; do
echo
echo "Choose one of the following options:"
echo
echo "1 - Search for a Directory Name"
echo "2 - Find Duplicate Directory Names"
echo "3 - List All Directories"
echo "x - Exit"
echo
read selection

searchsum() {
find /media/* -iname "$dir_name" | sort | sort -n;
}

searchresult(){
ls /media/* | egrep -v '~d' > results.txt;
SUCCESS=0
word=$dir_name
filename=results.txt
grep -q "$word" "$filename"
if [ $? -eq $SUCCESS ]
then
echo "The Directory named, $word is found:"
else
echo "The Dicectory named, $word is NOT found:"
fi
rm results.txt;
}

duplicate() {
ls /media/* | egrep -v '~d' > duplicate.txt;
cat duplicate.txt | sort | uniq -c | sort -nr >

dupoutput.txt;
cat dupoutput.txt;
rm duplicate.txt;
}

saveoutput() {
if [ "$output" = "y" ]
then
mv dupoutput.txt /tmp/dupoutput.txt
echo "Output File Saved to /tmp/dupoutput.txt"
else
rm dupoutput.txt
fi
}

dirlist() {
find /media/* -maxdepth 1 -mindepth 1 -type d | sort | sort

n > RAID_Directory.txt;
#ls /media/* | egrep -v '~d' > RAID_Directory.txt;
cat RAID_Directory.txt;
}

saveresults() {
if [ "$saveresults" = "y" ]
then
mv RAID_Directory.txt /tmp/RAID_Directory.txt
echo "Output File Saved to /tmp/RAID_Directory.txt"
else
rm RAID_Directory.txt
echo "Output File deleted"
fi
}

case "$selection" in

"1" )
echo
echo -e "Please enter the Directory Name:"
read dir_name
echo
searchresult
echo
echo "Search Summary:"
echo "---------------"
searchsum
echo
;;

"2" )
echo
echo "Duplicate Directories:"
echo "----------------------"
duplicate
echo
echo "Save Output File to Disk? y / n "
read output
saveoutput
echo
;;

"3" )
echo
echo "RAID ARRAY Directories:"
echo "-----------------------"
dirlist
echo
echo "Save Output File to Disk? y / n "
read saveresults
saveresults
echo
;;

"x" )
echo
echo -e "Exit"
echo
exit 0
;;
esac
done
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I need a DocBook content management system sundialsvcs Linux - General 0 09-17-2006 03:13 PM
LXer: Build a Simple Content Management System LXer Syndicated Linux News 0 05-21-2006 05:33 PM
Daisy Content Management System - cms paul_mat Linux - Software 0 09-18-2005 07:09 PM
Content management system that uses PAM paul_mat Linux - Software 0 06-29-2005 06:19 PM
-source content management system that can use NTLM paul_mat Linux - General 1 06-02-2005 06:13 PM


All times are GMT -5. The time now is 07:26 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration