How to create LVM snapshots?

Thread Tools Search this Thread
# 1  
How to create LVM snapshots?

Please suggest me how do I create LVM snapshots in linux.

Best regards,
# 2  
Hello Vishal,

Could you please refer following link, it may help you in same.

R. Singh
# 3  
Thanks Ravinder!

I created snap data_snap but unable to see in df -h
[root@cindb1004a onecommand]# lvs
  LV        VG      Attr   LSize   Origin   Snap%  Move Log Copy%  Convert
  LVDbOra1  VGExaDb owi-ao 100.00G
  LVDbSwap1 VGExaDb -wi-ao  24.00G
  LVDbSys1  VGExaDb -wi-ao  30.00G
  LVDbSys2  VGExaDb -wi-a-  30.00G
  data_snap VGExaDb swi-a-   1.00G LVDbOra1   0.05

Then created filesystem but not working

[root@cindb1004a onecommand]# mke2fs -t ext4 /dev/VGExaDb/data_snap
mke2fs 1.39 (29-May-2006)
mke2fs: invalid blocks count - /dev/VGExaDb/data_snap

Please advise.

Best regards,

Last edited by rbatte1; 02-02-2015 at 07:55 AM.. Reason: Added CODE tags
# 4  

I am unable to mount fs

[root@cindb1004a VGExaDb]# mount -t ext3 /dev/VGExaDb/data_snap /snap_db
mount: wrong fs type, bad option, bad superblock on /dev/VGExaDb/data_snap,
       missing codepage or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

Please assist.

Best regards,

---------- Post updated at 05:16 PM ---------- Previous update was at 05:10 PM ----------

Please refer to below error:

[root@cindb1004a VGExaDb]# dmesg | tail
Buffer I/O error on device dm-4, logical block 1
Buffer I/O error on device dm-4, logical block 2
Buffer I/O error on device dm-4, logical block 3
Buffer I/O error on device dm-4, logical block 4
Buffer I/O error on device dm-4, logical block 5
Buffer I/O error on device dm-4, logical block 6
Buffer I/O error on device dm-4, logical block 7
EXT3-fs: unable to read superblock
EXT3-fs: unable to read superblock
EXT3-fs: unable to read superblock

# 5  
@admin_db, Snapshots are won't list in df -h. Instead list the Logical volumes
# sudo  lvs -o +devices

You have created your filesystem using
# mke2fs -t ext4 /dev/VGExaDb/data_snap

Then trying to mount with ext3 how it will mount ? Mount it using
# mount  /dev/VGExaDb/data_snap /snap_db

Hope this will mount.. Please provide us which operating system you using by running command
# lsb_release -a

If you need to know more about how to work with snapshot please feel free to read my article right here

How to Take 'Snapshot of Logical Volume and Restore' in LVM - Part III

Last edited by rbatte1; 02-03-2015 at 07:03 AM.. Reason: Added CODE tags
This User Gave Thanks to babinlonston For This Post:
# 6  

This doesn't seem to be a supported command.

[root@cindb1002a ~]# lsb_release -a
-bash: lsb_release: command not found

Best regards,

---------- Post updated at 03:49 PM ---------- Previous update was at 03:47 PM ----------

[root@cindb1002a ~]# cat /etc/enterprise-release
Enterprise Linux Enterprise Linux Server release 5.8 (Carthage)

Best regards,

Last edited by admin_db; 02-05-2015 at 04:48 PM.. Reason: adding command

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Science: Gadgets
Difficulty: Medium
The Western Electric Model 500 telephone uses tone dialing to dial phone numbers.
True or False?

10 More Discussions You Might Find Interesting

1. Ubuntu

I need help setting up LVM snapshots on Ubuntu 16.04

I am running Ubuntu 16.04 on a HP laptop with a core I3 processor. I am trying to run mariaDB and do hot backups to disk. In order to do that I wanted to create an LVM snapshot and backup the snapshot for a point in time backup, possibly using tar. I included a snapshot of the gparted app showing... (1 Reply)
Discussion started by: gandolf989
1 Replies

2. UNIX for Dummies Questions & Answers

Using parted command to create LVM partitions

Oracle Linux 6.6 To create Physical Volumes for Volume groups (LVM) , the disk need to be partitioned to LVM type ie. 'Linux LVM' type . In fdisk , this can done by choosing 8e when prompted for partition type. Since it is easy to script (non-interactive), I use parted command rather than... (1 Reply)
Discussion started by: John K
1 Replies

3. Red Hat

Shrink LVM partition & create new Linux Primary partition

Hello All, I have a Red Hat Linux 5.9 Server installed with one hard disk & 2 Partitions created on it as follows, /boot - Linux Partition & another is LVM - One VG & under that 5-6 Logical volumes(var,opt,home etc). Here my requirement is to take out 1GB of space from LVM ( Any logical... (5 Replies)
Discussion started by: gr8_usk
5 Replies

4. Linux

Create LVM of 2 Hard Drives while installing Centos 6.4.

Hello, I have install 2 HDD in my server and now installing the Centos6.4. I want create the LVM of those 2 HDD's so while i'm doing this it is not allowing me to select these 2 disk's from allowable disk list. Same problem if i tried to make Software RAID with creating LVM. Please help. (1 Reply)
Discussion started by: purushottamaher
1 Replies

5. Red Hat

Create volume using LVM over 2 physical disks

I wanted to know how we can combine volumes over 2 physical drives. # fdisk -l Disk /dev/sda: 42.9 GB, 42949672960 bytes 255 heads, 63 sectors/track, 5221 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 ... (16 Replies)
Discussion started by: ikn3
16 Replies

6. 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

7. Emergency UNIX and Linux Support

Is this how LVM snapshots work?

Hi guys. I'm confused how LVM snapshots work. Here is what i understood: 1. we have a Logical Volume holding our data. 2. we make a snap shot of it with this command: lvcreate -L 1000M -s -n backup /dev/vg01/lv013. mount the snap shot 4. take your backup 5. remove the snapshot --> in this... (3 Replies)
Discussion started by: majid.merkava
3 Replies

8. 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

9. Red Hat

create /var lvm during install

Hi All, How do I create /var as LVM type during install? I want my new OS to have /var as LVM so that I could extend it on the fly. Thanks for any comment you may add. (2 Replies)
Discussion started by: itik
2 Replies

10. UNIX for Advanced & Expert Users

Is there a tutorial on how to create RAID 1 on top of lvm?

Hi, there are tons of RAID1 tutorials, but none of them deal with lvm. The problem is that I want to expand my current lvm partition over RAID1 rather than creating a new lvm partition after RAID1 is created. My master harddrive has lvm partition. I'm wondering how to create a RAID1 image of... (1 Reply)
Discussion started by: onthetopo
1 Replies

Featured Tech Videos