lvm and fstab
Hi,
I am using RHEL3.
I have been reading the LVM howto and it is very clear but i am missing something anyways. During the setup with DiskDruid i created a Volume group and two logical volumes. One LV for /opt and another one for /stage.
After rebooting the OS i don't have any /stage partition.
lvscan
lvscan -- ACTIVE "/dev/Volume00/LogVol00" [19.53 GB]
lvscan -- ACTIVE "/dev/Volume00/LogVol01" [19.53 GB]
lvscan -- 2 logical volumes with 39.06 GB total in 1 volume group lvscan -- 2 active logical volumes
But the fstab doesn't point to any Logical volume:
The fstab contains
LABEL=/1 / ext3 defaults 1 1 LABEL=/boot /boot ext3 defaults 1 2 none /dev/pts devpts gid=5,mode=620 0 0 none /proc proc defaults 0 0 none /dev/shm tmpfs defaults 0 0 /dev/cciss/c0d0p3 swap swap defaults 0 0 /dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0
and a df -h returns
[root@Pearl remarkit]# df -h
Filesystem Size Used Avail Use% Mounted on /dev/cciss/c0d0p4 9.7G 2.4G 6.8G 27% /
/dev/cciss/c0d0p1 97M 14M 78M 15% /boot
none 1.9G 0 1.9G 0% /dev/shm
So i don't understand what is really inside the logical volumes are they "empty" right now?
Thanks.
Quoted 31 lines · ThomasC.
Hi,
I am using RHEL3.
I have been reading the LVM howto and it is very clear but i am missing something anyways.
During the setup with DiskDruid i created a Volume group and two logical volumes.
One LV for /opt and another one for /stage.
After rebooting the OS i don't have any /stage partition.lvscan
lvscan -- ACTIVE "/dev/Volume00/LogVol00" [19.53 GB]
lvscan -- ACTIVE "/dev/Volume00/LogVol01" [19.53 GB]
lvscan -- 2 logical volumes with 39.06 GB total in 1 volume group lvscan -- 2 active logical volumesBut the fstab doesn't point to any Logical volume:
The fstab contains
LABEL=/1 / ext3 defaults 1 1 LABEL=/boot /boot ext3 defaults 1 2 none /dev/pts devpts gid=5,mode=620 0 0 none /proc proc defaults 0 0 none /dev/shm tmpfs defaults 0 0 /dev/cciss/c0d0p3 swap swap defaults 0 0 /dev/cdrom /mnt/cdrom udf,iso9660noauto,owner,kudzu,ro 0 0
and a df -h returns
[root@Pearl remarkit]# df -h
Quoted 9 lines
Filesystem Size Used Avail Use% Mounted on /dev/cciss/c0d0p4 9.7G 2.4G 6.8G 27% /
/dev/cciss/c0d0p197M 14M 78M 15% /boot
none 1.9G 0 1.9G 0%/dev/shmSo i don't understand what is really inside the logical volumes are they "empty" right now?
I don't know what Diskdruid does since I don't know RH but you have to enter the mount points manualy in fstab or mount the partitions manualy
...
you could do a mount /dev/Volume00/LogVol00 /opt and then you should have what you want.
Best Regards, Cristian Livadaru
Quoted 38 lines · Cristian Livadaru
Quoted 27 lines · ThomasC.
Hi,
I am using RHEL3.
I have been reading the LVM howto and it is very clear but i am missing something anyways. During the setup with DiskDruid i created a Volume group and two logical volumes. One LV for /opt and another one for /stage.
After rebooting the OS i don't have any /stage partition.lvscan
lvscan -- ACTIVE "/dev/Volume00/LogVol00" [19.53 GB]
lvscan -- ACTIVE "/dev/Volume00/LogVol01" [19.53 GB]
lvscan -- 2 logical volumes with 39.06 GB total in 1 volume group lvscan -- 2 active logical volumesBut the fstab doesn't point to any Logical volume:
The fstab contains
LABEL=/1 / ext3 defaults 1 1 LABEL=/boot /boot ext3 defaults 1 2 none /dev/pts devpts gid=5,mode=620 0 0 none /proc proc defaults 0 0 none /dev/shm tmpfs defaults 0 0 /dev/cciss/c0d0p3 swap swap defaults 0 0 /dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0and a df -h returns
Quoted 9 lines
[root@Pearl remarkit]# df -h
Filesystem Size Used Avail Use% Mounted on /dev/cciss/c0d0p4 9.7G 2.4G 6.8G 27% /
/dev/cciss/c0d0p197M 14M 78M 15% /boot
none 1.9G 0 1.9G 0%/dev/shmSo i don't understand what is really inside the logical volumes are they "empty" right now?
Quoted 7 lines
I don't know what Diskdruid does since I don't know RH but you have to enter the mount points manualy in fstab or mount the partitions manualy
...
you could do a mount/dev/Volume00/LogVol00/opt and then you should have what you want.Best Regards, Cristian Livadaru
Thats what i thought but the weird thing is that i can already access /opt so i am not very enthusiastic trying to mount it again....
Quoted 55 lines · ThomasC.
Quoted 54 lines · Cristian Livadaru
Quoted 37 lines · ThomasC.
Hi,
I am using RHEL3.
I have been reading the LVM howto and it is very clear but i am missing something anyways.
During the setup with DiskDruid i created a Volume group and two logical volumes.
One LV for /opt and another one for /stage.
After rebooting the OS i don't have any /stage partition.lvscan
lvscan -- ACTIVE "/dev/Volume00/LogVol00" [19.53 GB]
lvscan -- ACTIVE "/dev/Volume00/LogVol01" [19.53 GB]
lvscan -- 2 logical volumes with 39.06 GB total in 1 volume group lvscan -- 2 active logical volumesBut the fstab doesn't point to any Logical volume:
The fstab contains
LABEL=/1 / ext3 defaults 1
1
LABEL=/boot /boot ext3 defaults 1
2
none/dev/ptsdevpts gid=5,mode=620 0
0
none /proc proc defaults 0
0
none/dev/shmtmpfs defaults 0
0/dev/cciss/c0d0p3swap swap defaults 0
0/dev/cdrom/mnt/cdromudf,iso9660
noauto,owner,kudzu,ro 0 0and a df -h returns
[root@Pearl remarkit]# df -h
Quoted 9 lines
Filesystem Size Used Avail Use% Mounted on /dev/cciss/c0d0p4 9.7G 2.4G 6.8G 27% /
/dev/cciss/c0d0p197M 14M 78M 15% /boot
none 1.9G 0 1.9G 0%/dev/shmSo i don't understand what is really inside the logical volumes are they "empty" right now?
I don't know what Diskdruid does since I don't know RH but you have to enter the mount points manualy in fstab or mount the partitions manualy
...
you could do a mount/dev/Volume00/LogVol00/opt and then you should have what you want.
Quoted 4 lines
Quoted 1 line
Best Regards, Cristian Livadaru
Thats what i thought but the weird thing is that i can already access /opt so i am not very enthusiastic trying to mount it again....
but this means that opt is NOT on your LVM!
it's on /dev/cciss/c0d0p4
if you want to move the content of opt to your LVM you would have to boot some rescue disc or a knoppix and move the data to the lvm, actualy it should be ok if you do it live. copy the data (cp -ax ...), rename opt and mount your lvm as /opt
Quoted 7 lines · ThomasC.
Quoted 6 lines · Cristian Livadaru
Quoted 5 lines · ThomasC.
Hi,
I am using RHEL3.
One LV for /opt and another one for /stage.
Quoted 8 lines
Quoted 6 lines
enter the mount points manualy in fstab or mount the partitions manualy
...
you could do a mount/dev/Volume00/LogVol00/opt and then you should have what you want.Best Regards, Cristian Livadaru
Thats what i thought but the weird thing is that i can already access /opt so i am not very enthusiastic trying to mount it again....
I agree with your reluctance.
What I would do, being the paranoid person that I am, is create a second mount point, called /opt-1 or something else that you like, and mount your LV there, as "mount /dev/Volume00/LogVol00 /opt-1" and compare the two. I suspect that you will find that your /opt-1 will be empty, in which case you can then move all of the files in /opt to /opt-1, unmount /opt-1, remount it as /opt, fix your /etc/fstab and everything will be as you expect.
I was about to go on and suggest that you could then add /stage to your /etc/fstab, but we don't know whether it was actually created. What does "lvscan" show?
Brian
Quoted 7 lines · ThomasC.
I am using RHEL3.
I have been reading the LVM howto and it is very clear but i am missing something anyways.
During the setup with DiskDruid i created a Volume group and two logical volumes.
One LV for /opt and another one for /stage.
After rebooting the OS i don't have any /stage partition.
initializing LVM is a multi stage process.
1. create the volume
2. create LVs within the volume.
3. format the LVs i.e. with "mke2fs"
4. copy data to the LVs
5. register the LVs with /etc/fstab to have them
available by default after each boot.
Don't know what "DiskDruid" is, but it seems it did not perform steps 4 and 5 automatically. May be you have to perform them by hand.
Todo:
Verify step 2) by entering "lvs" to get a list of all your LVs created. Try to mount one of your LVs manually. i.E. try "mount /dev/Volume00/LogVol00 /mnt" (if your LV is named "LogVol00", else choose the name the "lvs" command told you). If you get an error, you should try to format the LV by "mke2fs". Else you may look into /mnt if there is already some data (you should find an empty lost+found directory).
If there is no data, you may copy all your /opt to /mnt.
Use: "cp -av /opt/* /mnt". Now you may umount /mnt. You may rename your current /opt into /opt-old and create a new empty /opt directory, then try:
"mount /dev/Volume00/LogVol00 /opt".
If all looks good, you should add a line to your /etc/fstab to get /opt mounted by default. Test the entry by umounting your /opt again ("umount /opt") and try a "mount -a", which mounts all entries from /etc/fstab. If all works well, you will find /opt mounted again without any error messages.
Now you may try to reboot.
Same for /stage...
Tip:
If your "DiskDruid" named your volumes /dev/Volume00/LogVol00 this is OK, but a big feature of LVM is, that the LV may have expressive names. So it may find it useful to "rename" your /dev/Volume00/LogVol00 into "/dev/Volume00/OPT".
See: "man lvrename".
Dieter
Quoted 55 lines · Dieter St�ken
Quoted 7 lines · ThomasC.
I am using RHEL3.
I have been reading the LVM howto and it is very clear but i am missing something anyways.
During the setup with DiskDruid i created a Volume group and two logical volumes.
One LV for /opt and another one for /stage.
After rebooting the OS i don't have any /stage partition.initializing LVM is a multi stage process.
1. create the volume
2. create LVs within the volume.
3. format the LVs i.e. with "mke2fs"
4. copy data to the LVs
5. register the LVs with
/etc/fstabto have them
available by default after each boot.Don't know what "DiskDruid" is, but it seems it did not perform steps 4 and 5 automatically. May be you have to perform them by hand.
Todo:
Verify step 2) by entering "lvs" to get a list of all your LVs created. Try to mount one of your LVs manually. i.E. try "mount
/dev/Volume00/LogVol00/mnt" (if your LV is named "LogVol00", else choose the name the "lvs" command told you). If you get an error, you should try to format the LV by "mke2fs". Else you may look into /mnt if there is already some data (you should find an empty lost+found directory).If there is no data, you may copy all your /opt to /mnt.
Use: "cp -av/opt/*/mnt". Now you may umount /mnt. You may rename your current /opt into /opt-old and create a new empty /opt directory, then try:
"mount/dev/Volume00/LogVol00/opt".If all looks good, you should add a line to your
/etc/fstabto get /opt mounted by default. Test the entry by umounting your /opt again ("umount /opt") and try a "mount -a", which mounts all entries from/etc/fstab. If all works well, you will find /opt mounted again without any error messages.Now you may try to reboot.
Same for /stage...
Tip:
Quoted 7 lines
If your "DiskDruid" named your volumes
/dev/Volume00/LogVol00
this is OK, but a big feature of LVM is, that the LV may have
expressive names. So it may find it useful to "rename" your/dev/Volume00/LogVol00into "/dev/Volume00/OPT".See: "man lvrename".
Dieter
Thanks very much (all) for your valuable help. Dieter thanks very much the great explanation.
PS DiskDruid is the disk partitioning manager contained in RedHat installation.