LinuxQuestions.org
Register a domain and help support LQ
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 12-31-2008, 09:37 PM   #1
syacko
LQ Newbie
 
Registered: Dec 2008
Posts: 8

Rep: Reputation: 0
LVM snapshot mount not working


Hello,

First, Happy New Year.

I'm trying the recipes on http://tldp.org/HOWTO/LVM-HOWTO/ for backing up LVM snapshots and I'm hoping someone can help me out. Everything works fine, up to the mount step. I have reseached for hours on the web and everyone list the recipe example, which is the following:

# mkdir /mnt/ops/dbbackup

# mount /dev/ops/dbbackup /mnt/ops/dbbackup
mount: block device /dev/ops/dbbackup is write-protected, mounting read-only


I have also found a number of posting as far back as 2003 that says this does not work. I can not get the mount to work, either. Here are the messages that I get and I have tried everything I can think of and find on the web.

mount: you must specify the filesystem type

and if I add -o ro to the mount, I get the following:

mount: you must specify the filesystem type

Yes, the same thing.

If I do -ro and add it to the /etc/fstab file, the first issue is the mount says I must have a file type. So, I add ext3 and get:

mount: wrong fs type, bad option, bad superblock on /dev/VolGrp00/dbbackup,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

I know there must be a simple answer, but I can not find or think of it.

Please Help
 
Old 01-02-2009, 11:56 AM   #2
eco
Member
 
Registered: May 2006
Location: BE
Distribution: Debian/Gentoo
Posts: 412

Rep: Reputation: 48
Hi,

Can you tell me what LVM version you are using? If LVM1, then I fond the following:

Quote:
LVM1 has read-only snapshots.
http://tldp.org/HOWTO/LVM-HOWTO/snapshotintro.html
 
Old 01-02-2009, 12:15 PM   #3
syacko
LQ Newbie
 
Registered: Dec 2008
Posts: 8

Original Poster
Rep: Reputation: 0
lvm2-2.02.32-4

Version: lvm2-2.02.32-4

RedHat / CentOS 5.2

Thank you for the help and help is the information that you requested.
 
Old 01-02-2009, 04:22 PM   #4
eco
Member
 
Registered: May 2006
Location: BE
Distribution: Debian/Gentoo
Posts: 412

Rep: Reputation: 48
Hi,

If on LVM2, maybe you could send us a list of the commands you ran to create the PV,VG,LV and snapshot? That way we can try and see what might be wrong.

I noted you talk about /dev/ops/dbbackup and /dev/VolGrp00/dbbackup, is it a typo?

Might be slow at answering though, ... sick as a dog
 
Old 01-02-2009, 06:54 PM   #5
syacko
LQ Newbie
 
Registered: Dec 2008
Posts: 8

Original Poster
Rep: Reputation: 0
Hello,

Sorry to hear that you are sick and thank you for replying to my issue. Hope you feel better very soon. I think it was copied from two different tries, sorry about that. Here is the example that I have tried on my system. I have only one PV, so I do not have the exist command as it was create many months ago. Here is the display output.

[root@battlestar /]# pvdisplay
--- Physical volume ---
PV Name /dev/sda2
VG Name VolGrp00
PV Size 893.42 GB / not usable 9.82 MB
Allocatable yes
PE Size (KByte) 32768
Total PE 28589
Free PE 26221
Allocated PE 2368
PV UUID aKNWSm-DS30-h4tX-KFtO-s6Tb-PAKG-EwqZre


[root@battlestar /]# lvcreate -L2G -s -n triton_root_snap /dev/VolGrp00/triton_root
Logical volume "triton_root_snap" created

[root@battlestar /]# lvdisplay (removed other LV's from display)
--- Logical volume ---
LV Name /dev/VolGrp00/triton_root_snap
VG Name VolGrp00
LV UUID 56ne7M-EJ34-h6P2-PlKO-rtDA-d9Yv-1d1y0G
LV Write Access read/write
LV snapshot status active destination for /dev/VolGrp00/triton_root
LV Status available
# open 0
LV Size 10.00 GB
Current LE 320
COW-table size 2.00 GB
COW-table LE 64
Allocated to snapshot 0.00%
Snapshot chunk size 4.00 KB
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:9

[root@battlestar /]# mkdir /mnt/triton_root_snap
[root@battlestar /]# mount -o ro /dev/VolGrp00/triton_root_snap /mnt/triton_root_snap
mount: you must specify the filesystem type
[root@battlestar /]#
[root@battlestar /]# mount -o ro -t ext3 /dev/VolGrp00/triton_root_snap /mnt/triton_root_snap
mount: wrong fs type, bad option, bad superblock on /dev/VolGrp00/triton_root_snap,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

Thank you in advance,
Scott
 
Old 01-04-2009, 01:02 PM   #6
eco
Member
 
Registered: May 2006
Location: BE
Distribution: Debian/Gentoo
Posts: 412

Rep: Reputation: 48
Hi Scott,

I'm back from the dead, thanks for your concern.

It all looks ok to me, are you sure that /dev/VolGrp00/triton_root is indeed an ext3 filesystem?

Try the following:
$ df -T

Do you get any added info by doing a:
$ dmesg|tail

What do you get from:
# lvdisplay -v /dev/VolGrp00/triton_root
# lvdisplay -v /dev/VolGrp00/triton_root_snap


I have never seen such a problem and I've been using LVM for a while now. It's got to be something simple we are missing.
 
Old 01-05-2009, 09:08 PM   #7
syacko
LQ Newbie
 
Registered: Dec 2008
Posts: 8

Original Poster
Rep: Reputation: 0
Well, as I said, it was something simple. I never build a filesystem on the LV.

Thank you for your help and pointing to the issue.
 
Old 01-06-2009, 04:39 AM   #8
eco
Member
 
Registered: May 2006
Location: BE
Distribution: Debian/Gentoo
Posts: 412

Rep: Reputation: 48
Glad I could help
 
Old 02-04-2009, 08:42 AM   #9
molombo
LQ Newbie
 
Registered: Feb 2009
Posts: 1

Rep: Reputation: 0
I've the same problem but i didn't see the problem.
Create the snapshot with lcreate...is ok.
But on "mount /dev/xen/xy /mnt/lvm-backup/xy" it shows "mount: you must specify the filesystem type"??

What is my Problem??

Thx

molombo




Quote:
Originally Posted by syacko View Post
Well, as I said, it was something simple. I never build a filesystem on the LV.

Thank you for your help and pointing to the issue.
 
Old 02-05-2009, 01:16 AM   #10
syacko
LQ Newbie
 
Registered: Dec 2008
Posts: 8

Original Poster
Rep: Reputation: 0
Hello,

Glad the thread could help. The answer is that you must have a file system created on the LVM before making a snapshot. Only, then will mount work.

Hope this clears up any confusion,
Scott
 
  


Reply

Tags
lvm, mount, snapshot


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
Recovery of full LVM snapshot drmouse Linux - Software 0 12-11-2007 08:21 AM
About LVM Snapshot geethusari LinuxQuestions.org Member Intro 1 12-03-2007 07:11 AM
LVM snapshot dump Xen Randall Slack Linux - Server 0 09-01-2007 09:01 AM
LVM Snapshot question sjtushi Linux - Software 3 03-12-2006 09:41 AM
LVM snapshot creation error haertig Linux - Software 1 01-30-2006 09:14 PM


All times are GMT -5. The time now is 01:18 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