LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 01-17-2004, 02:35 AM   #1
mwj
LQ Newbie
 
Registered: Sep 2003
Location: Pakistan. Islamabad
Distribution: Red Hat-9
Posts: 24

Rep: Reputation: 15
Question How can I permanently Mount an exixting Partition


Dear Professionals

I have RH-9 installed in my system. 40GB H drive (IDE). I installed Linux on 25 GB ( hda1)
I have second 14 GB with ext-3 type partition (Free). hda2
I want to use this partition for backup and in place of existing /home directory.There are home folders of 20-30 users (SMB USERS) on existing /home . I want to shift these user folders on that free partition as well to lessen the load.
I have to mount every time that partition as I start the system with
Mountt /dev/hda2 /mnt/home
(/mnt/home is empty folder where i mount that partition)
How can I permanently mount that free partition in my system??????

Last edited by mwj; 01-17-2004 at 02:39 AM.
 
Old 01-17-2004, 02:53 AM   #2
mikshaw
LQ Addict
 
Registered: Dec 2003
Location: Maine, USA
Distribution: Slackware/SuSE/DSL
Posts: 1,320

Rep: Reputation: 45
If you want to change /home to hda2:

Log in as root
Mount hda2 at /mnt/home
Move all /home files to /mnt/home

edit /etc/fstab with an entry something like this:
Code:
/dev/hda2    /home    ext3    defaults    00
umount /mnt/home
mount /home

Last edited by mikshaw; 01-17-2004 at 02:56 AM.
 
Old 01-17-2004, 03:16 AM   #3
reader
Member
 
Registered: Apr 2001
Location: Gulf of Biscay
Posts: 32

Rep: Reputation: 15
Or

Mount as you do, and then 'vi mtab fstab'. Copy the 'home' line from mtab and paste it in fstab. Voilą !
 
Old 01-19-2004, 06:03 AM   #4
mwj
LQ Newbie
 
Registered: Sep 2003
Location: Pakistan. Islamabad
Distribution: Red Hat-9
Posts: 24

Original Poster
Rep: Reputation: 15
Dear Both members
Bravo
I did as u said and it is woking as HEAVEN.
Thanks a lot
At the mment ,Instead of making hda2 /home , I mounted hda2 on /mnt/home.
Now, I planed to get all of my existing user Folders on existing /home. I will take backup of all these folders on /mnt/home daily ,to secure the data.
How is this approach???????
I need yr feed back.
 
Old 01-19-2004, 08:10 AM   #5
thegeekster
Member
 
Registered: Dec 2003
Location: USA (Pacific coast)
Distribution: Vector 5.8-SOHO, FreeBSD 6.2
Posts: 513

Rep: Reputation: 33
Quote:
Originally posted by mwj
...Now, I planed to get all of my existing user Folders on existing /home. I will take backup of all these folders on /mnt/home daily ,to secure the data.
How is this approach???????
I need yr feed back.
Sounds like a good plan ........You can run a daily backup as a cron job automatically, so you don't have to remember to do so each time........after all, that's what computers are for, to make life easier for us.
 
Old 01-20-2004, 12:31 AM   #6
mwj
LQ Newbie
 
Registered: Sep 2003
Location: Pakistan. Islamabad
Distribution: Red Hat-9
Posts: 24

Original Poster
Rep: Reputation: 15
Thanks for yr feed back.
I know very little abt making backup automatically.Would u please let me know the exact procdure????
 
Old 01-20-2004, 05:37 PM   #7
thegeekster
Member
 
Registered: Dec 2003
Location: USA (Pacific coast)
Distribution: Vector 5.8-SOHO, FreeBSD 6.2
Posts: 513

Rep: Reputation: 33
Basiclly, you add a script that will execute the backup procedure on a daily basis. This can be a shell, bash or a perl script, which is placed in the system's cron directory, or any directory you specify in crontab using the 'crontab -e' command. At least that's how it's done in Slack. I'm not familiar with how it's done in RH...................Read the manpages for crontab (man crontab), man crond, man run-parts, to get an idea of how cron jobs are run. Also run 'crontab -e', which is where the cron jobs are placed. It may already have some entries which you can look at. For example, heres what my crontab looks like:
Code:
# If you don't want the output of a cron job mailed to you, you have to direct
# any output to /dev/null.  We'll do this here since these jobs should run
# properly on a newly installed system, but if they don't the average newbie
# might get quite perplexed about getting strange mail every 5 minutes. :^)
#
# Run the hourly, daily, weekly, and monthly cron jobs.
# Jobs that need different timing may be entered into the crontab as before,
# but most really don't need greater granularity than this.  If the exact
# times of the hourly, daily, weekly, and monthly cron jobs do not suit your
# needs, feel free to adjust them.
#
# Run hourly cron jobs at 47 minutes after the hour:
47 * * * * /usr/bin/run-parts /etc/cron.hourly 1> /dev/null
#
# Run twice daily cron jobs at 4:50 and 16:50 (4:50pm) every day:
50 4,16 * * * /usr/bin/run-parts /etc/cron.twicedaily 1> /dev/null
#
# Run daily cron jobs at 4:40 every day:
40 4 * * * /usr/bin/run-parts /etc/cron.daily 1> /dev/null
#
# Run weekly cron jobs at 4:30 on the first day of the week:
30 4 * * 0 /usr/bin/run-parts /etc/cron.weekly 1> /dev/null
#
# Run monthly cron jobs at 4:20 on the first day of the month:
20 4 1 * * /usr/bin/run-parts /etc/cron.monthly 1> /dev/null
Note: The twice daily entry is one I added, which runs every 12 hours, while the rest are the defaults that come with Slack. RedHat might have something a little different, but this should give you an idea of what to expect. And the default editor for 'crontab -e' is vi. If you want to use a different editor, then you'll need to add a VISUAL variable in your login script, ~/.bashrc (or whatever you're using). For example, I prefer pico, so I added this at the bottom of ~/.bashrc:

VISUAL = 'pico -w'
export VISUAL

You will also need to know something about shell scripting. Go to this thread which shows you where to go to get started on bash scripting...........................You can find some ready-made backup scripts that might suit your purposes. Go to SourceForge's search page and enter 'backup script' (no quotes). Make sure there's a check mark next to "Require All Words". This will give you quite a few choices. If you choose a perl program, you'll need to know enough about perl so you can edit it for your particular needs.

This should get you started. Hope this helps.
---thegeekster

------------
PS: You can also find a couple of backup scripts from GNU's Free Software Directory: Backup

Last edited by thegeekster; 01-20-2004 at 05:41 PM.
 
Old 01-21-2004, 08:57 PM   #8
thegeekster
Member
 
Registered: Dec 2003
Location: USA (Pacific coast)
Distribution: Vector 5.8-SOHO, FreeBSD 6.2
Posts: 513

Rep: Reputation: 33
Bash Programming-Introduction HOW-TO

Hey mwj,

Here's a good start on Bash scripting, and it also uses examples creating a backup script. This is from TLDP (The Linux Documentation Project), which is usualy installed on most Linux distros (under /usr/docs/)......or you can download all the HOWTOs in html format - Linux-html-HOWTOs - and put them in your /usr/doc/ directory. You can also get the htmls in a single-page format, too - Linux-html-single-HOWTOs............Just look for 'Bash-Prog-Intro-HOWTO'

I prefer using the html format because it's easier to navigate and skip around from one section to another.


---thegeekster

Last edited by thegeekster; 01-22-2004 at 12:49 AM.
 
Old 01-22-2004, 11:59 PM   #9
mwj
LQ Newbie
 
Registered: Sep 2003
Location: Pakistan. Islamabad
Distribution: Red Hat-9
Posts: 24

Original Poster
Rep: Reputation: 15
Hi thegeekster
Thanks alot for all of yr time and preciuse peaces of guidlines.I am already on my way toward bash programing after yr previuos post.
I have boohmarked alll those links and also down loaded the material u sugested .Now I will take some time to go through it. Pray for success.
mwj
 
Old 01-23-2004, 01:48 AM   #10
thegeekster
Member
 
Registered: Dec 2003
Location: USA (Pacific coast)
Distribution: Vector 5.8-SOHO, FreeBSD 6.2
Posts: 513

Rep: Reputation: 33
LOL.........you're welcome. Glad you find it uselful

Shell scripting is an excellent intro into the world of programming in general, as well as a great way to learn more about what Unix/Linux is capable of.......................If you like it enough and decide to go on to more advanced programming, you'll have an easier time understanding the concepts involved and will be able to spend more time on learning the new syntax for the other language(s).

The best of luck to ya
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
making second partition permanent & booting abrand888 MEPIS 3 08-05-2005 05:03 PM
permanent mount of win shares DJOtaku Linux - General 3 02-01-2005 12:52 AM
permanent network mount? Dr Gutiemouth Linux - Networking 5 11-01-2004 10:47 AM
permanent mount jerrod Linux - Newbie 4 04-14-2003 07:36 PM
Any way to reconfigure a exixting kernel? sk545 Linux - General 1 03-21-2003 08:06 PM


All times are GMT -5. The time now is 11:45 AM.

Main Menu
Advertisement
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