RE: lvm on RH8 _ SOLVED_

From: Cannon, Andrew (Andrew.Cannon_at_nnc.co.uk)
Date: 02/10/04

  • Next message: crucificator: "Re: strange network problem"
    To: "'redhat-list@redhat.com'" <redhat-list@redhat.com>
    Date: Tue, 10 Feb 2004 09:36:05 -0000
    
    

    Okay, I might need a lobotomy, but I finally figured out what was going
    wrong. Apparently, the lvm module wasn't getting initialised at boot, so I
    looked at the lvm HOWTO at the Linux Documentation Project (I really must
    get round to donating to them) and this told me how to activate the volumes
    and get the module loaded at boot.

    Thanks to everyone who tried to help.

    Andy

    P.S. If this comes with a long signature I apologise. It's the standard
    company signature, and I can't get it removed.

    -----Original Message-----
    From: Cannon, Andrew [mailto:Andrew.Cannon@nnc.co.uk]
    Sent: Monday, February 09, 2004 2:50 PM
    To: 'redhat-list@redhat.com'
    Subject: RE: lvm on RH8

    Find attached the method I used (along with some output) to create the
    logical volume (note, I think I missed copying some of the screen at some
    point)

    Unmount /work7 using the command umount -f /work7

    Using fdisk, change the partition usage to 0x8e (free space, logical
    partition) as shown in this text dump from the screen)

       p print the partition table
       t change a partition's system id
       w write table to disk and exit

    Command (m for help): p

    Disk /dev/hdb: 16 heads, 63 sectors, 19841 cylinders
    Units = cylinders of 1008 * 512 bytes

       Device Boot Start End Blocks Id System
    /dev/hdb1 * 1 1560 786208+ 82 Linux swap
    /dev/hdb2 1561 19841 9213624 83 Linux

    Command (m for help): t
    Partition number (1-4): 2
    Hex code (type L to list codes): 0x8e
    Type 0 means free space to many systems
    (but not to Linux). Having partitions of
    type 0 is probably unwise. You can delete
    a partition using the `d' command.
    Changed system type of partition 2 to 0 (Empty)

    Command (m for help): p

    Disk /dev/hdb: 16 heads, 63 sectors, 19841 cylinders
    Units = cylinders of 1008 * 512 bytes

       Device Boot Start End Blocks Id System
    /dev/hdb1 * 1 1560 786208+ 82 Linux swap
    /dev/hdb2 1561 19841 9213624 0 Empty

    Once this is completed, exit and write to the partition table (Option w).

    Command (m for help): w
    The partition table has been altered!

    Calling ioctl() to re-read partition table.

    WARNING: Re-reading the partition table failed with error 16: Device or
    resource busy.
    The kernel still uses the old table.
    The new table will be used at the next reboot.
    Syncing disks.

    Then use pvcreate to crate a volume group that will contain the logical
    volumes /userg and /work7.

    [root@cluster01 root]# pvcreate /dev/hdb2
    pvcreate -- physical volume "/dev/hdb2" successfully created

    Now use lvcreate to create the logical volumes userg and work7.

    [root@cluster01 root]# lvcreate -L 4000 -n userg cluster01vg
    lvcreate -- doing automatic backup of "cluster01vg"
    lvcreate -- logical volume "/dev/cluster01vg/userg" successfully created

    [root@cluster01 root]# lvcreate -L 4000 -n work7 cluster01vg
    lvcreate -- doing automatic backup of "cluster01vg"
    lvcreate -- logical volume "/dev/cluster01vg/work7" successfully created

    Note that the -L option is the volume size and -n is the name of the logical
    volume.

    Next the filesystem needs to be created in the logical volumes. This is
    performed by the mkfs command.

    [root@cluster01 root]# mkfs -t ext3 /dev/cluster01vg/work7
    mke2fs 1.27 (8-Mar-2002)
    Filesystem label=
    OS type: Linux
    Block size=4096 (log=2)
    Fragment size=4096 (log=2)
    512000 inodes, 1024000 blocks
    51200 blocks (5.00%) reserved for the super user
    First data block=0
    32 block groups
    32768 blocks per group, 32768 fragments per group
    16000 inodes per group
    Superblock backups stored on blocks:
            32768, 98304, 163840, 229376, 294912, 819200, 884736

    Writing inode tables: done
    Creating journal (8192 blocks): done
    Writing superblocks and filesystem accounting information: done

    This filesystem will be automatically checked every 35 mounts or
    180 days, whichever comes first. Use tune2fs -c or -i to override.
    [root@cluster01 root]# mkfs -t ext3 /dev/cluster01vg/userg
    mke2fs 1.27 (8-Mar-2002)
    Filesystem label=
    OS type: Linux
    Block size=4096 (log=2)
    Fragment size=4096 (log=2)
    512000 inodes, 1024000 blocks
    51200 blocks (5.00%) reserved for the super user
    First data block=0
    32 block groups
    32768 blocks per group, 32768 fragments per group
    16000 inodes per group
    Superblock backups stored on blocks:
            32768, 98304, 163840, 229376, 294912, 819200, 884736

    Writing inode tables: done
    Creating journal (8192 blocks): done
    Writing superblocks and filesystem accounting information: done

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

    The error messages I've getting are all a variation on the following:

    [root@cluster01 root]# lvdisplay /dev/cluster01vg/userg
    lvdisplay -- volume group "cluster01vg" of logical volume
    "/dev/cluster01vg/userg"is not active
    lvdisplay -- try -D, please

    [root@cluster01 root]# lvscan
    lvscan -- volume group "cluster01vg" is NOT active; try -D
    lvscan -- no logical volumes found

    Using lvscan -D:-

    [root@cluster01 root]# lvscan -D
    lvscan -- reading all physical volumes (this may take a while...)
    lvscan -- inactive "/dev/cluster01vg/userg" [3.91 GB]
    lvscan -- inactive "/dev/cluster01vg/work7" [3.91 GB]
    lvscan -- 2 logical volumes with 7.81 GB total in 1 volume group
    lvscan -- 2 inactive logical volumes

    Anyone with any ideas?

    Andy
    -----Original Message-----
    From: Ken Rossman [mailto:rossman@columbia.edu]
    Sent: Monday, February 09, 2004 2:42 PM
    To: redhat-list@redhat.com
    Cc: Ken Rossman
    Subject: Re: lvm on RH8

    On Monday, February 9, 2004, at 09:33 AM, Cannon, Andrew wrote:
    > I'm trying to get lvm working on one of our systems. I've gone through
    > the
    > steps (as given in the man pages) and tried to mount the filesystem. I
    > couldn't mount the filesystem.

    What error messages do you get? This would be helpful in debugging.

    Dumb question, but, did you build a file system on the newly created
    logical volume?

    -- 
    redhat-list mailing list
    unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
    https://www.redhat.com/mailman/listinfo/redhat-list
    NNC's UK Operating Companies : NNC Holdings Limited (no. 3725076), NNC
    Limited (no. 1120437), National Nuclear Corporation Limited (no. 2290928),
    STATS-NNC Limited (no. 4339062) and Technica-NNC Limited (no. 235856).  The
    registered office of each company is at Booths Hall, Chelford Road,
    Knutsford, Cheshire WA16 8QZ except for Technica-NNC Limited whose
    registered office is at 6 Union Row, Aberdeen AB10 1DQ.  NNC's head office
    and principal address is Booths Hall and the switchboard number is 01565
    633800.  The NNC website is www.nnc.co.uk
    Any information or opinions in this message which do not relate to our
    business are not authorised by any of the above companies.  Where this
    message does relate to our business the content is sent to you by the
    relevant company (as above) and is confidential and intended for the use of
    the individual or entity to whom it is addressed.  The contents do not form
    part of any contract unless so stated.  If you have received this e-mail in
    error please notify the NNC system manager by email at eadm@nnc.co.uk.
    -- 
    redhat-list mailing list
    unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
    https://www.redhat.com/mailman/listinfo/redhat-list
    NNC's UK Operating Companies : NNC Holdings Limited (no. 3725076), NNC Limited (no. 1120437), National Nuclear Corporation Limited (no. 2290928), STATS-NNC Limited (no. 4339062) and Technica-NNC Limited (no. 235856).  The registered office of each company is at Booths Hall, Chelford Road, Knutsford, Cheshire WA16 8QZ except for Technica-NNC Limited whose registered office is at 6 Union Row, Aberdeen AB10 1DQ.  NNC's head office and principal address is Booths Hall and the switchboard number is 01565 633800.  The NNC website is www.nnc.co.uk
    Any information or opinions in this message which do not relate to our business are not authorised by any of the above companies.  Where this message does relate to our business the content is sent to you by the relevant company (as above) and is confidential and intended for the use of the individual or entity to whom it is addressed.  The contents do not form part of any contract unless so stated.  If you have received this e-mail in error please notify the NNC system manager by email at eadm@nnc.co.uk.
    -- 
    redhat-list mailing list
    unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
    https://www.redhat.com/mailman/listinfo/redhat-list
    

  • Next message: crucificator: "Re: strange network problem"

    Relevant Pages

    • Re: Booting - Enterprise Volume Management System
      ... blocksize of your filesystem and calculate the new size based on those units. ... physical disk partition. ... You manipulate a virtual partition and don't ... Software raid will always be slower than LVM ...
      (Ubuntu)
    • Re: Booting - Enterprise Volume Management System
      ... nothing to do with LVM and everything to do with file systems. ... bother with LVM on a single disk if you can just make one big partition? ... Runaway processes can't fill the filesystem, ... windows machine when exchange fills the file system. ...
      (Ubuntu)
    • Re: lvm boot from second volume group
      ... I added another volume group, vg1, to my lvm setup, and placed an fc4 tree on it, and added an entry to grub.conf. ... when I try to boot into that image it fails. ... grub doesn't understand LVM at all AFAIK, it just boots the kernel/initrd from a regular partition and passes parameters to that kernel to tell it where to find the root filesystem. ... My original install uses lvm and was installed to /dev/vg0/fc4. ...
      (Fedora)
    • Re: Creating linux and windows partions in the same disk
      ... It deleted my partition table and the windows instalation ... I'm using grub as my boot manager, but it doesn't seem to be the ... filesystems, the statement/caveat is if the filesystem is resized (or ... Moving the start of an NTFS filesystem is more difficult (you ...
      (comp.os.linux.setup)
    • RE: RAID 1 Config with AMD 780G Chipset
      ... Use the dialog boxes to create one primary partition large enough to ... Later this will be used for swap. ... One approach is to set up LVM, make reasonable space for at least / ... LVM volumes for each desired separate filesystem (rootlv, homelv, ...
      (Ubuntu)