LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-20-2015, 07:02 PM   #1
adel87
Member
 
Registered: Nov 2014
Posts: 37

Rep: Reputation: Disabled
Smile question about cluster


Hi every one
I'm new in the word of linux
I'm using a lab with 2 node and virtual storage disk to simulate cluster with centos 6.
I'have create cluster with luci and
Please I want to know:
When i want to add resource to the cluster (file system)
it is neccessry to edit the ftab file in the 2 node to add the storage disk
Thank you
 
Old 04-20-2015, 10:13 PM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
No you don't have to add that in /etc/fstab it will be taken care by cluster load and unload script for the resource. Usually you put entry in /etc/fstab if you are using gfs2 filesystem and want them to be mounted on both system at the same time (gfs2 has that capability); in this scenario cluster scripts will not take care of mounting and umounting.
 
Old 04-21-2015, 02:11 AM   #3
adel87
Member
 
Registered: Nov 2014
Posts: 37

Original Poster
Rep: Reputation: Disabled
Smile

Hi thank you
please an other question
my nodes detect /dev/sdb with the scsi connector
do i need the create a partion with fsdisk before i format ?
Thank you
 
Old 04-21-2015, 02:15 AM   #4
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Yes, create partition and then format. Since it is a shared storage make sure that you don't create partition on the same disk from both nodes. Once you created partition on /dev/sdb from one node run partprobe on another node. If you are using multipathing then use multipath -rr.
 
Old 04-21-2015, 02:18 AM   #5
adel87
Member
 
Registered: Nov 2014
Posts: 37

Original Poster
Rep: Reputation: Disabled
Smile

Hi thank you.
Please what is the meaning what i do mksfs.ext4 /dev/sdb
IT is work when i don't understand why?
Thank you for your help
 
Old 04-21-2015, 03:10 AM   #6
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
You're welcome.

I didn't get what you are trying to say?
 
Old 04-21-2015, 03:39 AM   #7
adel87
Member
 
Registered: Nov 2014
Posts: 37

Original Poster
Rep: Reputation: Disabled
Smile

Hi thank you
Please I know what is the meaning of mkfs.ext4 /dev/sdb
for GFS2 what this commande work
mkfs.gfs2 -p lock_dlm -t mycluster:disk -j 2 /dev/sdb

what I want to know is why linux allow me the create file system of hard-disk without any partitions
Thank you.
 
Old 04-21-2015, 07:16 AM   #8
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Linux will allow you to directly format a hard drive without creating partition. I mean that is how it works. Same works with PV, you can create a PV with whole disk instead of partitions.

Using single disk is not advisable because if anything goes wrong anywhere on the disk your whole data will be affected. Partitions are created to avoid such situation. Incase if one of the partition is affected then data residing only on that partition will be affected and data on other partitions will remain intact.
 
Old 04-21-2015, 07:23 AM   #9
adel87
Member
 
Registered: Nov 2014
Posts: 37

Original Poster
Rep: Reputation: Disabled
Hi thank you
So I will can mount the hard drive directly ?
Thank you
 
Old 04-21-2015, 07:29 AM   #10
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Yes you can mount the hdd directly like you mount partitions. As I said it is not the advisable way because you are putting your data at risk.
 
Old 04-22-2015, 04:09 AM   #11
adel87
Member
 
Registered: Nov 2014
Posts: 37

Original Poster
Rep: Reputation: Disabled
Smile

hi thank you for your help
Please what is the risk for the data if i don't create any partion
Thank you.
 
Old 04-22-2015, 04:22 AM   #12
adel87
Member
 
Registered: Nov 2014
Posts: 37

Original Poster
Rep: Reputation: Disabled
Hi i have try to use partbrobe in the second node when I create the partion there is no answer so i have reboot the node
it work
Thank you
 
Old 04-22-2015, 06:03 AM   #13
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
You're welcome. Reboot is fine, you can also try restarting iscsi-initiator service before rebooting the server. Make sure that no partition is mounted via iscsi on the node before restarting iscsi-initiator service.
 
Old 04-22-2015, 06:24 AM   #14
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Quote:
Originally Posted by adel87 View Post
hi thank you for your help
Please what is the risk for the data if i don't create any partion
Thank you.
The actual risk is no different than with a partitioned disk.

If you have physical damage to the disk, that damage is frequently (or always) spreads to the entire disk. When a disk becomes weak data can get courrupted - but you can still copy the rest of the data. The one time things get difficult is if the damage occurs to the volume header... But then the same damage would occur to the partition table if the disk had been partitioned.

The purpose of partitioning has nothing to do with risk. It has to do with separating one set of data from another.
 
Old 04-22-2015, 06:54 AM   #15
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Quote:
Originally Posted by jpollard View Post
The actual risk is no different than with a partitioned disk.

If you have physical damage to the disk, that damage is frequently (or always) spreads to the entire disk. When a disk becomes weak data can get courrupted - but you can still copy the rest of the data. The one time things get difficult is if the damage occurs to the volume header... But then the same damage would occur to the partition table if the disk had been partitioned.

The purpose of partitioning has nothing to do with risk. It has to do with separating one set of data from another.
I would partially agree with that. I do agree that if disk becomes weak or there is hardware issue it is not just one partition all the partition residing on that disk is at risk. However, if one of my partitions go corrupted I can still mount other partitions on that disk without any issue.

For example: If I have created two partitions on the disk say one for mounting on /home and one for mounting on /generic_data. Now if partition mounted on /generic_data encountered inode mismatch (which is quite commonly I have seen) it will only affect that partition not the whole disk, I can still mount /home without any issue. Infact if data under /generic_data is not too significant I can keep it commented in /etc/fstab till I get downtime schedule for performing repair. If this happened incase of single disk I have to go with immediate repair.

The main reasons for partitioning that I can think of:

1. Ease of management.
2. Separating set of data.
3. Preventing errors from one partition stepping onto other partitions foot.
4. Better control in terms on management.

Could be more but these are the ones I can think of now.

Edit: I had a case wherein the data corruption was so severe that post fsck we were left with little data than actual on the disk. This I am talking about a partitioned disk wherein only one partition was affected. If it were a single disk there is no easy way to determine which data it removed during repair (wasn't there even in lost+found) and most likely one will end up restoring the whole data.

Last edited by T3RM1NVT0R; 04-22-2015 at 07:02 AM. Reason: more info
 
  


Reply



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
Cluster question takayama Linux - Server 4 06-21-2011 07:34 PM
[SOLVED] Cluster question bino25 Linux - Software 2 02-04-2011 07:49 AM
HA cluster question illNino Linux - Software 3 04-17-2009 04:32 PM
Cluster question: Is it possible to make a bulletproof cluster? ValidiusMaximus Linux - Software 1 09-06-2005 02:07 PM
RedHat cluster question trigger638 Linux - Enterprise 0 06-01-2005 06:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:17 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
Open Source Consulting | Domain Registration