Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
03-24-2005, 07:49 AM
|
#1
|
LQ Newbie
Registered: Mar 2005
Posts: 1
Rep:
|
LVM volume mounting trouble
I have such a situation (RH Enterprise 3)
1. I've created a pair of files (X=0,1):
dd if=/dev/zero of=fileX
2. Set both files like block devices:
losetup /dev/loopX fileX
3. If I do mke2fs /dev/loopX; mount /dev/loopX /mnt/X - everything's OK; If i make software RAID of /dev/loopX, I can mount /dev/md0 without any problems
4. I've made new LVM volume using stripe of /dev/loopX. mke2fs /dev/mydg/test goes OK
fsck or mount says:
mount: wrong fs type, bad option, bad superblock on /dev/myvg/d0,
or too many mounted file systems
Where am I wrong?
|
|
|
03-29-2005, 03:17 PM
|
#2
|
Member
Registered: Jan 2005
Location: Brabant, the Netherlands
Distribution: Gentoo 2004.x (2.6.10 hardened)
Posts: 91
Rep:
|
Normally, people forget to set the type of the 'disk' (virtual disk in your scenario) to type 8E, Linux LVM. So use cfdisk /dev/loopX, go to type, and set it to 8E. (Could use fdisk to do this). If cfdisk ask you to start with an empty table, answer yes, by the way. You shouldn't make an fs on this devices for now!
This is how I think it should be done (tested it myself):
(This is for LVM2)
After the cfdisk setting type to 8E of the lo-devices, do
# pvcreate /dev/loop1
# pvcreate /dev/loop2
.... (for any other loops too)
Then, do:
vgcreate <<your_vg_name>> /dev/loop1 /dev/loop2 ....(any other loop devs)
Now, use vgdisplay <<your_vg_name>> to find out its total size.
Let's assume it's 16 Mb
Now, you're ready to use lvcreate.
Something like
lvcreate -i <<number-of-stripes>> -I <<stripesize_kB>> -L 16 <<your_vg_name>>
This should make a, by the LVM manager chosen device in /dev/<<your_vg_name>>/
After this, you should do mk<<some>>fs /dev/<<your-vg-name>>/<<LVM-chosen-dev-name>>
Then you should be able to mount it.
|
|
|
03-29-2005, 03:34 PM
|
#3
|
Member
Registered: Jan 2005
Location: Brabant, the Netherlands
Distribution: Gentoo 2004.x (2.6.10 hardened)
Posts: 91
Rep:
|
Maybe an example helps, so I shall post my .bash history:
As normal user:
$ dd if=/dev/zero of=/tmp/loop1 count=50000
$ dd if=/dev/zero of=/tmp/loop2 count=50000
$ su
Type passw, as SU:
#losetup /dev/loop1 /tmp/loop1
#losetup /dev/loop2 /tmp/loop2
#cfdisk /dev/loop1
(answer 'yes' when asked to start empty, create New Primary, set Type 8E, Write)
#cfdisk /dev/loop2lvcreate -i 3 -I 8 -L 48 VG2
(Same as loop1)
#pvcreate /dev/loop1
#pvcreate /dev/loop2
#vgcreate VG2 /dev/loop1 /dev/loop2
#vgdisplay VG2
Look for Free PE / size, use size in Mb:
#lvcreate -i 2 -I 8 -L 48 VG2
-i 2 is the number of stripes, which shouldn't be more than the number of pv's you added to your vg.
LVM told me it created a volume called lvol0,
# mkreiserfs /dev/VG2/lvol0
# cd /mnt
# ls
# mount /dev/VG2/lvol0 /mnt/floppy/
Worked for me!
|
|
|
04-11-2005, 02:28 PM
|
#4
|
Member
Registered: Dec 2003
Location: AUS
Distribution: CentOs, OpenSuse, Ubuntu, Leopard :D
Posts: 97
Rep:
|
can u help me mounting a lvm on fedora 2?
|
|
|
All times are GMT -5. The time now is 03:27 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|