LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   LVM snapshot mount not working (http://www.linuxquestions.org/questions/linux-server-73/lvm-snapshot-mount-not-working-694176/)

syacko 12-31-2008 09:37 PM

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

eco 01-02-2009 11:56 AM

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

syacko 01-02-2009 12:15 PM

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.

eco 01-02-2009 04:22 PM

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 ;)

syacko 01-02-2009 06:54 PM

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

eco 01-04-2009 01:02 PM

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.

syacko 01-05-2009 09:08 PM

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.

eco 01-06-2009 04:39 AM

Glad I could help :)

molombo 02-04-2009 08:42 AM

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 (Post 3398378)
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.


syacko 02-05-2009 01:16 AM

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


All times are GMT -5. The time now is 01:28 AM.