linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] lvm and fstab
@ 2006-06-29 14:10 ThomasC.
  2006-06-29 14:23 ` Cristian Livadaru
  2006-06-29 15:53 ` Dieter Stüken
  0 siblings, 2 replies; 7+ messages in thread
From: ThomasC. @ 2006-06-29 14:10 UTC (permalink / raw)
  To: linux-lvm

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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [linux-lvm] lvm and fstab
  2006-06-29 14:10 [linux-lvm] lvm and fstab ThomasC.
@ 2006-06-29 14:23 ` Cristian Livadaru
  2006-06-29 14:30   ` ThomasC.
  2006-06-29 15:53 ` Dieter Stüken
  1 sibling, 1 reply; 7+ messages in thread
From: Cristian Livadaru @ 2006-06-29 14:23 UTC (permalink / raw)
  To: linux-lvm

On Thu, Jun 29, 2006 at 04:10:31PM +0200, ThomasC. wrote:
> 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?
> 

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

 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [linux-lvm] lvm and fstab
  2006-06-29 14:23 ` Cristian Livadaru
@ 2006-06-29 14:30   ` ThomasC.
  2006-06-29 14:33     ` Cristian Livadaru
  2006-06-29 14:36     ` Brian McCullough
  0 siblings, 2 replies; 7+ messages in thread
From: ThomasC. @ 2006-06-29 14:30 UTC (permalink / raw)
  To: LVM general discussion and development

Cristian Livadaru wrote:
> On Thu, Jun 29, 2006 at 04:10:31PM +0200, ThomasC. wrote:
>> 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?
>>
> 
> 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....

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [linux-lvm] lvm and fstab
  2006-06-29 14:30   ` ThomasC.
@ 2006-06-29 14:33     ` Cristian Livadaru
  2006-06-29 14:36     ` Brian McCullough
  1 sibling, 0 replies; 7+ messages in thread
From: Cristian Livadaru @ 2006-06-29 14:33 UTC (permalink / raw)
  To: linux-lvm

On Thu, Jun 29, 2006 at 04:30:19PM +0200, ThomasC. wrote:
> Cristian Livadaru wrote:
> >On Thu, Jun 29, 2006 at 04:10:31PM +0200, ThomasC. wrote:
> >>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?
> >>
> >
> >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....
> 

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [linux-lvm] lvm and fstab
  2006-06-29 14:30   ` ThomasC.
  2006-06-29 14:33     ` Cristian Livadaru
@ 2006-06-29 14:36     ` Brian McCullough
  1 sibling, 0 replies; 7+ messages in thread
From: Brian McCullough @ 2006-06-29 14:36 UTC (permalink / raw)
  To: LVM general discussion and development

[-- Attachment #1: Type: text/plain, Size: 1270 bytes --]

On Thu, Jun 29, 2006 at 04:30:19PM +0200, ThomasC. wrote:
> Cristian Livadaru wrote:
> >On Thu, Jun 29, 2006 at 04:10:31PM +0200, ThomasC. wrote:
> >>Hi,
> >>
> >>I am using RHEL3.
> >>One LV for /opt and another one for /stage.
> >>
> >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


[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 2229 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [linux-lvm] lvm and fstab
  2006-06-29 14:10 [linux-lvm] lvm and fstab ThomasC.
  2006-06-29 14:23 ` Cristian Livadaru
@ 2006-06-29 15:53 ` Dieter Stüken
  2006-06-30  7:33   ` ThomasC.
  1 sibling, 1 reply; 7+ messages in thread
From: Dieter Stüken @ 2006-06-29 15:53 UTC (permalink / raw)
  To: LVM general discussion and development

ThomasC. wrote:
> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [linux-lvm] lvm and fstab
  2006-06-29 15:53 ` Dieter Stüken
@ 2006-06-30  7:33   ` ThomasC.
  0 siblings, 0 replies; 7+ messages in thread
From: ThomasC. @ 2006-06-30  7:33 UTC (permalink / raw)
  To: LVM general discussion and development

Dieter St�ken wrote:
> ThomasC. wrote:
>> 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
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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-06-30  7:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-29 14:10 [linux-lvm] lvm and fstab ThomasC.
2006-06-29 14:23 ` Cristian Livadaru
2006-06-29 14:30   ` ThomasC.
2006-06-29 14:33     ` Cristian Livadaru
2006-06-29 14:36     ` Brian McCullough
2006-06-29 15:53 ` Dieter Stüken
2006-06-30  7:33   ` ThomasC.

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).