Author |
Message |
hansoffate
|
Posted: Wed Apr 26, 2006 2:24 pm |
|
Joined: Wed Apr 19, 2006 2:00 pm
Posts: 28
|
I had some problem following the LVM tutorial on the wiki. I realized i did somethign wrong when i tried to mount my /dev/hdb1 and it didn't work. Anyone know what i did wrong?
Thanks,
Hans
Code: root@mythtv:/home/mythtv# pvcreate /dev/hdb1 Physical volume "/dev/hdb1" successfully created root@mythtv:/home/mythtv# vgcreate vg /dev/hdb1 /dev/hdc: open failed: No medium found /dev/hda5: open failed: No such device or address /dev/hda6: open failed: No such device or address /dev/hda7: open failed: No such device or address /dev/hda8: open failed: No such device or address /dev/hda9: open failed: No such device or address /dev/hdc: open failed: No medium found /dev/hda5: open failed: No such device or address /dev/hda6: open failed: No such device or address /dev/hda7: open failed: No such device or address /dev/hda8: open failed: No such device or address /dev/hda9: open failed: No such device or address /dev/hdc: open failed: No medium found /dev/hda5: open failed: No such device or address /dev/hda6: open failed: No such device or address /dev/hda7: open failed: No such device or address /dev/hda8: open failed: No such device or address /dev/hda9: open failed: No such device or address Volume group "vg" successfully created root@mythtv:/home/mythtv# vgdisplay vg | grep "Total PE" /dev/hdc: open failed: No medium found /dev/hda5: open failed: No such device or address /dev/hda6: open failed: No such device or address /dev/hda7: open failed: No such device or address /dev/hda8: open failed: No such device or address /dev/hda9: open failed: No such device or address Total PE 47694 root@mythtv:/home/mythtv# lvcreate -l 4768 vg -n myth /dev/hdc: open failed: No medium found /dev/hda5: open failed: No such device or address /dev/hda6: open failed: No such device or address /dev/hda7: open failed: No such device or address /dev/hda8: open failed: No such device or address /dev/hda9: open failed: No such device or address Logical volume "myth" created root@mythtv:/home/mythtv# Total PE 4768 bash: Total: command not found root@mythtv:/home/mythtv# lvcreate -l 4768 vg -n myth /dev/hdc: open failed: No medium found /dev/hda5: open failed: No such device or address /dev/hda6: open failed: No such device or address /dev/hda7: open failed: No such device or address /dev/hda8: open failed: No such device or address /dev/hda9: open failed: No such device or address Logical volume "myth" already exists in volume group "vg" root@mythtv:/home/mythtv# mount /dev/vg/myth /mnt/hdb1 mount: mount point /mnt/hdb1 does not exist root@mythtv:/home/mythtv# vgcreate vg /dev/hdb1 /dev/vg: already exists in filesystem root@mythtv:/home/mythtv# mke2fs -j -O sparse_super -m0 -i8000000 -L myth /dev/vg/myth mke2fs 1.36 (05-Feb-2005) Filesystem label=myth OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 4768 inodes, 4882432 blocks 0 blocks (0.00%) reserved for the super user First data block=0 149 block groups 32768 blocks per group, 32768 fragments per group 32 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000
Writing inode tables: done Creating journal (8192 blocks): done Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 28 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. root@mythtv:/home/mythtv# mount /dev/vg/myth /mnt/hdb1 mount: mount point /mnt/hdb1 does not exist root@mythtv:/home/mythtv# cp -p -r /myth/* /mnt/hdb1 cp: `/mnt/hdb1': specified destination directory does not exist Try `cp --help' for more information. root@mythtv:/home/mythtv# pvcreate /dev/hdb1 /dev/hdc: open failed: No medium found /dev/hda5: open failed: No such device or address /dev/hda6: open failed: No such device or address /dev/hda7: open failed: No such device or address /dev/hda8: open failed: No such device or address /dev/hda9: open failed: No such device or address Can't initialize physical volume "/dev/hdb1" of volume group "vg" without -ff root@mythtv:/home/mythtv# pvcreate /dev/hdb1 /dev/hdc: open failed: No medium found /dev/hda5: open failed: No such device or address /dev/hda6: open failed: No such device or address /dev/hda7: open failed: No such device or address /dev/hda8: open failed: No such device or address /dev/hda9: open failed: No such device or address Can't initialize physical volume "/dev/hdb1" of volume group "vg" without -ff root@mythtv:/home/mythtv# vgcreate vg /dev/hdb1 /dev/vg: already exists in filesystem
|
|
Top |
|
 |
abrendel
|
Posted: Wed Apr 26, 2006 4:12 pm |
|
Joined: Tue Feb 21, 2006 10:55 am
Posts: 98
|
hansoffate wrote: root@mythtv:/home/mythtv# mount /dev/vg/myth /mnt/hdb1 mount: mount point /mnt/hdb1 does not exist
This is where you should have stopped and said, "Hmm...if it doesn't exist, I should probably create it". No biggie though, here's how to do it. You need to: Code: mkdir /mnt/hdb1 THEN mount /dev/vg/myth /mnt/hdb1
Now this part should work fine. hansoffate wrote: root@mythtv:/home/mythtv# cp -p -r /myth/* /mnt/hdb1
|
|
Top |
|
 |
tjc
|
Posted: Wed Apr 26, 2006 6:47 pm |
|
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location:
Arlington, MA
|
You should really be using the nice create_lvm.sh script that Cecil wrote for this... It deals with all these issues for you. It's documented right on the wiki page in the 2nd paragraph...
Also, if you do that, then everything is nice and standard and the recreate_lvm.sh script will make your next upgrade that much easier.
|
|
Top |
|
 |
hansoffate
|
Posted: Wed Apr 26, 2006 6:59 pm |
|
Joined: Wed Apr 19, 2006 2:00 pm
Posts: 28
|
Is it too late to try to run cecil's script?
Anyways i tried to do it manually but then this happened.
Sorry for my noobiness.
Code: root@mythtv:/home/mythtv# mkdir /mnt/hdb1 root@mythtv:/home/mythtv# mount /dev/vg/myth /mnt/hdb1 mount: /dev/vg/myth is not a valid block device
|
|
Top |
|
 |
hansoffate
|
Posted: Wed Apr 26, 2006 9:45 pm |
|
Joined: Wed Apr 19, 2006 2:00 pm
Posts: 28
|
for some reason i think it worked... but it doesn't show up when i type cfdisk.
It only shows the partitions on hda.
But when i go to my /mnt/hdb1
It shows all /myth/ files in there so i think its working.
I realized it did work because when i went to find out how much unused diskspace i have it says that i only have a total of 19 gb.
hdb1 should be my entire partition and it should be around 200 gb.
Is there anyway to delete everythign done with lvm that has to do with hdb and re run the script?
thanks
-Hans
|
|
Top |
|
 |
hansoffate
|
Posted: Thu Apr 27, 2006 10:55 pm |
|
Joined: Wed Apr 19, 2006 2:00 pm
Posts: 28
|
I'm going to try to rerun the script. Is there a command to format my hdb harddrive. I don't think i need anything on there (i may have /myth/tv on there but will it be recreated).
thanks,
Hans
|
|
Top |
|
 |
tjc
|
Posted: Fri Apr 28, 2006 6:53 am |
|
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location:
Arlington, MA
|
One possibility using EXT3 is:
Code: mke2fs -j -O sparse_super -m0 -i8000000 -L myth /dev/vg/myth
Lots of folks have been using XFS however, because of it's better large file behaviour. Sadly I don't have an example handy for that...
|
|
Top |
|
 |
hansoffate
|
Posted: Fri Apr 28, 2006 10:25 am |
|
Joined: Wed Apr 19, 2006 2:00 pm
Posts: 28
|
Thanks tjc. So that will reformat the drive so i can re run the script?
When i do the df, this is what i get.
Code: Filesystem 1K-blocks Used Available Use% Mounted on /dev/hda1 4820232 2326868 2249204 51% / /dev/hda3 19527808 2416780 17111028 13% /myth /dev/vg/myth 19527808 2416780 17111028 13% /myth /dev/vg/myth 19527808 2416780 17111028 13% /mnt/hdb1
|
|
Top |
|
 |
tjc
|
Posted: Fri Apr 28, 2006 9:34 pm |
|
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location:
Arlington, MA
|
Well, you've got a little problem there with two (oops make that three) things mounted on /myth you need to sort that out first. Once you do that the command should allow you to format the LVM volume.
|
|
Top |
|
 |
hansoffate
|
Posted: Sat Apr 29, 2006 10:23 am |
|
Joined: Wed Apr 19, 2006 2:00 pm
Posts: 28
|
If i format my c drive and reinstall knoppmyth will it fix the problem i made?
Sorry for being so stupid.
(next time i install should i do a manual install? And make hda my /, /cache, and /swap. And make hdb for all my /myth. ) Will that delete everything on my hda and hdb? and also could i run the script when setting up the /myth directory on hdb?
|
|
Top |
|
 |
tjc
|
Posted: Sat Apr 29, 2006 11:05 am |
|
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location:
Arlington, MA
|
Uhm... Sorry I'm still not firing on all 5 cylinders today so I'll go for simple answers. Reinstalling using an auto install should get you back to a good state. It's been several weeks since the last time I did this but it should take care of the formating itself.
After it reboots, and before you enter the root password to complete setup, flip to an alternate virtual console (Hit Ctrl-Alt-F1 and you should see a text console - all back with white text with nothing but a login prompt), login as root there, and run the create_lvm.sh script. You should specify the names of all the devices you want to be part of the /myth volume on the command line. For example in R5B7 if you've got two drives installed as the primary master (partiitoned by an auto install) and primary slave (unpartitioned) this might be:
Code: create_lvm.sh /dev/hda3 /dev/hdb1 When that finishes you'll need to create the filesystem (using mkfs or it's kin) of your choice on the new pseudo device /dev/vg/myth as described above. After this is done mount the new LVM partitiion using: Code: mount /myth
Flip back to the graphical console (Ctrl-Alt-F7), and enter the root password to continue the install.
|
|
Top |
|
 |
hansoffate
|
Posted: Sat Apr 29, 2006 12:54 pm |
|
Joined: Wed Apr 19, 2006 2:00 pm
Posts: 28
|
Thanks tjc. I'll wait to reinstall when i get my nvidia 5200 (so i am sure it will work).
My hdb i think is partitioned and has data on it already,i think.
(/dev/vg/myth 19527808 2416780 17111028 13% /mnt/hdb1 )
Do i need to format it before i do my reinstall? If so what command can i use to format my hdb drive.
Thank you so much tjc and all others for the help
-Hans
|
|
Top |
|
 |
tjc
|
Posted: Sat Apr 29, 2006 1:00 pm |
|
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location:
Arlington, MA
|
Unless it's been broken into chunks (partitioned) it should be just fine. You can check it with cfdisk like this:
Code: cfdisk -Ps /dev/hdb
If it only shows one entry in the partition table you're golden.
|
|
Top |
|
 |
hansoffate
|
Posted: Sat Apr 29, 2006 2:21 pm |
|
Joined: Wed Apr 19, 2006 2:00 pm
Posts: 28
|
k Thanks.
Partition Table for /dev/hdb
First Last
# Type Sector Sector Offset Length Filesystem Type (ID) Flag
-- ------- ----------- ----------- ------ ----------- -------------------- ----
1 Primary 0 390716864 63 390716865 Linux LVM (8E) None
That doesn't seem like 200 gbs? is it?
-hans
|
|
Top |
|
 |
tjc
|
Posted: Sat Apr 29, 2006 5:30 pm |
|
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location:
Arlington, MA
|
Yes. The number is in sectors. So that's exactly what you wanted to see.
|
|
Top |
|
 |