LVM lvcreate don't want to format


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers LVM lvcreate don't want to format
# 1  
Old 03-10-2009
LVM lvcreate don't want to format

Hello,

I would like to create a Lvolume on an already written disk.
Main goal is to NOT format data on this disk. Unfortunately, while trying to mount my LV , I've got this error :
linux-qc44:/ # mount -a
mount: wrong fs type, bad option, bad superblock on /dev/mapper/system-DB,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

Anyone have an idea ?

Before doing a mount -a, here's what I did :

linux-qc44:/ # pvcreate /dev/sdb
Physical volume "/dev/sdb" successfully created
linux-qc44:/ # vgcreate system /dev/sdb
Volume group "system" successfully created
linux-qc44:/ # lvcreate -l 100%FREE system -n DB
Logical volume "DB" created
linux-qc44:/ # lvdisplay
--- Logical volume ---
LV Name /dev/system/DB
VG Name system
LV UUID WcEgQK-7xZB-622K-tSu3-x0AQ-Lzhr-fLgHxE
LV Write Access read/write
LV Status available
# open 0
LV Size 1020.00 MB
Current LE 255
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0
# 2  
Old 03-10-2009
When you create a LV you also have to create a FS (Filesystem) of some type on the LV to be able to mount it. Look into the command mkfs maybe.
LVs without FS can just be used for things like RAW volumes etc.
# 3  
Old 03-10-2009
Hi Zaxxon,

thanks for your quick reply.
Unfortunately if Im using mkfs, all preexisting data will be lost.

Let me explain my scenario :
We have two sites.
Site 1 has an AIX connected to a Storage through iscsi protocol. This is the production site. This AIX server use LVM to create VG, PV, LV with no problem.(LV command is formating.

Site 2 (disaster Site) has a second SAN Storage which is receiving mirrored data from Site 1. A second AIX server is attached to this second Storage through iscsi ( this LUN is a data replication from Site 1)
The idea would be to mount the LUN ( which is already populated) on the second AIX through LVM. This is where I get Stuck as I cannot create an LV and mount the system until I do a MKFS !!!!
Is this a normal behavior ? did I miss something ?

Thanks a lot
Ivan
# 4  
Old 03-10-2009
The commands you showed etc. is a Linux box. Now it is 2 AIX boxes? They have totally different commands for their LVMs.

Normal behaviour depends. Usually your AIX1 node has exclusive access rights on the storage and so there is usually a reservation on the SAN-volumes. There are scenarios where there are drivers used, that don't handle reservations. Normal behaviour is often to have only 1 node getting exclusive access to your production box. The other node is often just a standby box. But that all depends on how your scenario is set up.
Without knowing that concurrent access from your second node AIX2 is explicit allowed, I would not touch it.

The normal way is to add your LV and FS from the active productive node AIX1.
Maybe you get some more information how your boxes and SAN-access are setup before daring data corruption or problems for the production node AIX1.
# 5  
Old 03-10-2009
You're right this is some Linux Output .
I currently do not have my AIX available, So I've decided to test on LInux. I thought LVM behaviour was the same on both AIX and LInux.

Is the following make sense to you :

Site 1 :
Storage 1 : Volume and LUN presented to AIX 1 only : readwritable. ( LVM was used to create vg, pv, lv on the presented LUN)

Site 2:
Storage 2 : replicated Volume and LUN presented to AIX 2 only : read-only (until mirror is manually broken (disaster recoery scenario).

Suppose disaster recovery occurs, mirror is manually broken : LUN is getting read write attribute and of course Data are already present on the LUN.
HOW do I proceed to mount this LUN to my AIX WITHOUT FORMATING ??

Any idea ?
Thanks
Ivan
# 6  
Old 03-10-2009
Well what you are trying will surely not work...
If I follow you, the idea is to show via SAN the disk to a remote server ,am I right?
In this case you should not use vgcreate or whatever but make a safe copy using vgexport or exportvg (aix) look at the man pages since I dont have the syntax in mind :
A mistake and you are doomed... I would say in HPUX you would use
vgexport -s -p -m -v mapfile.vgXX /dev/vgXX

using the mapfile you on the remote box can import the vg giving it a newname and hope you mount it read only or use the -e (exclusive) mode

This is what we are to do when using HACMP(AIX) or MCSG (HP)... (but can be done without the soft...)
# 7  
Old 03-11-2009
Hi Vbe,

This is a remote Server on a SECOND SAN . There are 2 replicated SAN. So Volumes ( and LUN) inside SAN 1 is replicated to SAN 2. That's why I don't understand why I have to Format or export something ( as my replication occurs at block level). ??

Thanks a lot.
Ivan
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Red Hat

Lvcreate snapshot - ignore files

Hi, Need help for the below scenario.. Its a linux os snapshot which has been taken based on taking snapshot using lvcreate..while taking rootvg it taking an dump file of 2GB unnecessarily.. So any tricks to avoid the dump file while creating snapshot using lvcreate (0 Replies)
Discussion started by: ksgnathan
0 Replies

2. Shell Programming and Scripting

Need script for transferring bulk files from one format to text format

"Help Me" Need script for transferring bulk files from one format to text format in a unix server. Please suggest (2 Replies)
Discussion started by: Kranthi Kumar
2 Replies

3. Fedora

Problem Executing "lvcreate" Command

Hi everyone, I use Fedora 17. I used gparted to created a dev/sdb2 partition. I then used vgextend to extend the volume group. The output of vgdisplay shows the condition of my volume group: --- Volume group --- VG Name vg_data System ID Format ... (2 Replies)
Discussion started by: mojoman
2 Replies

4. Shell Programming and Scripting

perl module to convert xlsx format to xls format

Hi Folks, I have written a perl script that reads data from excel sheet(.xls) using Spreadsheet::ParseExcel module. But the problem is this module doesn't work for excel sheets with extension .xlsx. I have gone through Spreadsheet::XLSX module with which we can read from .xlsx file directly.... (1 Reply)
Discussion started by: giridhar276
1 Replies

5. UNIX for Dummies Questions & Answers

How to convert non LVM root partition to LVM?

Hi Guys, I m using redhat 6, I have installed root partition as non-LVM . Is there any way i can convert it to LVM? (1 Reply)
Discussion started by: pinga123
1 Replies

6. Shell Programming and Scripting

Converting windows format file to unix format using script

Hi, I am having couple of files which i used to copy from windows to Linux, so now in case of text files (CTRL^M) appears at end of line. I know i can convert this windows format file to unix format file by running dos2unix. My requirement here is that i want to do it automatically using a... (5 Replies)
Discussion started by: sarbjit
5 Replies

7. HP-UX

How to reduce LVM to create another LVM

Hi, I'm new to HP-UX. I have LVM on /var with 92Gig. I would like to reduce it to create another LVM for Oracle client with 800 meg or so. How to do it. I'm running 11.iv3 Thanks (4 Replies)
Discussion started by: lamoul
4 Replies

8. UNIX for Dummies Questions & Answers

To convert multi format file to a readable ascii format

Hi I have a file which has ascii , binary, binary decimal coded,decimal & hexadecimal data with lot of special characters (like öƒ.ƒ.„İİ¡Š·œƒ.„İİ¡Š· ) in it. I want to standardize the file into ASCII format & later use that as source . Can any one suggest a way a logic to convert such... (5 Replies)
Discussion started by: gaur.deepti
5 Replies
Login or Register to Ask a Question