LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-29-2012, 10:01 AM   #1
danndp
Member
 
Registered: Nov 2010
Posts: 51

Rep: Reputation: 2
System Partitioning


Hello,

I would like to know if there is a way to have to logical partitions on my Linux system, and then bascul from one to another in order to recover a bad state of the primary. For example; let's supose i have a two partitions on my hardisk (just one HDD), in main partition i have my database and apache web server (for example) with version 2.0 on both; and on inactive partition, i have mysql and apache with 1.0, so, in case of an emergency or bug detected on partition 1, could i bascul to the second partition? this is something applied on OXE ip-pbx (Linux OS) from Alcatel-Lucent. Is this possible to do? i'm kind of newbie on partitionin within linux.

Thanks so much!
 
Old 05-29-2012, 10:42 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
What do you mean by "bascul"..?

Could it be this?
http://www.jpfleury.net/en/software/bascule.php
If so, is has no relevance to switching partitions.

I'm not totally clear what you want to do, but let me guess: You have a process running under Linux (installed on partition A. If there is a problem, you want to switch control to the same code / environment on a different partition.
 
Old 05-30-2012, 08:10 AM   #3
danndp
Member
 
Registered: Nov 2010
Posts: 51

Original Poster
Rep: Reputation: 2
Hi,

Quote:
Originally Posted by pixellany View Post
I'm not totally clear what you want to do, but let me guess: You have a process running under Linux (installed on partition A. If there is a problem, you want to switch control to the same code / environment on a different partition.
Exactly, that's what i want!
 
Old 05-30-2012, 04:56 PM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
I do not know of a way to do that, but here are some things to think about.

First, I don't know why it would have to be a different partition---i.e. I think you just want another instance of the SW. If you are concerned about a HW failure, then you'd want a different physical disk.

Second, I'd assume that this would involve code running outside of the process in question. The process would export diagnostic data which the watchdog program would use to determine if action was required. My question would be --What happens when the watchdog fails?

Hopefully, a real programmer will step in here pretty quick.... Meanwhile, I'd try googling on--eg--"redundant software", "fail-safe software", or something similar.
 
Old 06-02-2012, 01:38 AM   #5
manish.chandra
LQ Newbie
 
Registered: Mar 2012
Posts: 8

Rep: Reputation: Disabled
Yes You can create lvm (logical volume manager) for a separate partition.. Lvm is created from harddisk partition and application assumes it as a separate drive... to create lvm you will have to create partition using fdisk or parted command ; -
eg. fdisk -cu /dev/sda
or
parted /dev/sda
there create a partition
after creating partiton set the type to 8e which is for lvm partition
write the partition and exit
Next run partx -a /dev/sda .. You might have to run it twice..It will force the kernel to reread the partition table..which you can verify using fdik -l
Now create physical volume ,volume group and then logical volume. eg:-

pvcreate /dev/sda5
pvdisplay
vgcreate -s 8M VolumeGroup /dev/sda5
-s 8M will set the PE size as 8M... so when you will create logical volume you can set it exact size using PE...such as 100 for 800MB logical volume.
vgdisplay
lvcreate -l 100 -n logicalvolume Volumegroup
lvdisplay
here -n is used to set the logical volume name as logicalvolume
logical volume will be created...
Now format partition as :-
mkfs.ext4 /dev/VolumeGroup/logicalvoulem
to mount it at boot time..enter the entry in /etc/fstab as : -
vim /etc/fstab
/dev/VolumeGroup/logicalvolume /mnt ext4 defaults 0 0
:wq
mount -a
verify using :-
df -TH
 
  


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
Partitioning a system, is more partitions better or worse MikeyCarter Linux - Software 4 05-29-2008 09:57 AM
Need help partitioning system $PS1 Debian 10 05-18-2006 06:35 PM
Partitioning for dual-system Linunix Linux - Newbie 7 11-04-2005 08:53 AM
Rewriting the system then partitioning thorman82 Linux - General 2 11-30-2003 08:20 AM
Partitioning the system.. chuck77 Linux - General 7 03-14-2002 10:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:04 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration