LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Having an issue in regards mounting a file system to a logical volume in RHEL5 (https://www.linuxquestions.org/questions/linux-newbie-8/having-an-issue-in-regards-mounting-a-file-system-to-a-logical-volume-in-rhel5-700268/)

crathm 01-27-2009 12:52 PM

Having an issue in regards mounting a file system to a logical volume in RHEL5
 
Hey folks,

I'm currently having an issue trying to mount a newly created logical volume named privatelv.


what i've done so far was this;

lvcreate -L 500M -n privatelv -v rootvg

I didn't see any errors and when i typed ls /dev/rootvg/

I can see that the privatelv is sitting in the directory with the rest of my volumes.

I then tried to append a file system to the volume by issuing the following command:

mkfs -c -L privatelv -T ext3 /dev/rootvg/privatelv

with no errors given i then tried to mount the file system to a directory by issuing the mount command:

mount -t ext3 /dev/rootvg/privatelv /private

and i get the following error

Code:

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

when i issue the dmesg | tail, i get the following error

ext3: No journal on filesystem on dm-9

i'm currently not getting any luck with my search to the solution but if anyone has any ideas i'm open to suggestions.

Kind Regards

Matey 01-28-2009 06:02 AM

I think you have to have an LVM partition before you can create an LVM volume? do fdisk -l and see
if you do have the patrtition 8e ( I think) and if it is for instance on hda4
then create a physical volume first;
pvcreate /dev/hda4
then a volume group
vgcreate privatelv (or whatever you want to name the folder) /dev/hda4


also after you have created the LVM volume you have to do this;
mkfs.ext3 /dev/privatelv (or whatever u named the folder)/privatelv
but I am pretty sure you have to activate it by;
mkfs.ext3 /dev/privatelv
even if you didnt create a group or a directory under /dev/

I have done this may be 2ice before so I am no expert at all...
may be this link or some one else can help;


http://ds9a.nl/lvm-howto/HOWTO/cvs/l...lvm-howto.html

linuxlover.chaitanya 01-28-2009 06:04 AM

Quote:

mkfs -c -L privatelv -T ext3 /dev/rootvg/privatelv
Isnt this should have been

mkfs -c -l privatelv -t ext3 /dev/rootvg/privatelv

Saw the man page for mkfs and there was small t and l

crathm 01-28-2009 12:51 PM

actually that was an input error on my behalf... I did it all via remote and i was unable to scroll back pages so i went by memory..

I deleted the volume via lvremove command and tried again;

Code:

lvcreate -L 512M -n privlv -v rootvg
    Setting logging type to disk
    Finding volume group "rootvg"
  /dev/cdrom: open failed: Read-only file system
  Rounding up size to full physical extent 512.00 MB
    Archiving volume group "rootvg" metadata (seqno 17).
    Creating logical volume privlv
    Creating volume group backup "/etc/lvm/backup/rootvg" (seqno 18).
    Found volume group "rootvg"
    Creating rootvg-privlv
    Loading rootvg-privlv table
    Resuming rootvg-privlv (253:9)
    Clearing start of logical volume "privlv"
    Creating volume group backup "/etc/lvm/backup/rootvg" (seqno 18).
  Logical volume "privlv" created

I do see a cd rom error but I have an active cd in my drive so I assume that is a normal error.
you are right about the small letters, the problem was I wasn't thinking and I used the "mke2fs" command which is exactly like the "mkfs" but designed for only ext2/3 file systems and the mk2fs command uses capital letters.
below is the result of my command:
Code:

# mke2fs -c -L privlv -T ext3 /dev/rootvg/privlv
mke2fs 1.39 (29-May-2006)
Filesystem label=privlv
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
65536 inodes, 131072 blocks
6553 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=134217728
4 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
        32768, 98304

Checking for bad blocks (read-only test): done                               
Writing inode tables: done                           
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 37 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

------------------------------------------------------------------------

after trying to mount:
Code:

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

---------------------------------------------------------------------------

dmesg | tail

ext3: No journal on filesystem on dm-9


any ideas?

GazL 01-28-2009 01:41 PM

I think you also need -j on the mke2fs line to create the journal.

crathm 01-28-2009 02:35 PM

Thanks GazL

You were right. I had to add journal to the filesystem.

I did so by using the default journal settings with the tune command;

tune2fs -j /dev/rootvg/privlv

Thanks again all for the assistance.

GazL 01-28-2009 04:51 PM

You're welcome. :)

I use lvm + jfs myself. I think I'll give ext4 just a little while longer to settle down and then I might give that a try instead.


All times are GMT -5. The time now is 02:53 AM.