RE: lvm on RH8

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

  • Next message: Craig Daters: "Re: SpamAssassin and Sa-Learn"
    To: "'redhat-list@redhat.com'" <redhat-list@redhat.com>
    Date: Mon, 9 Feb 2004 14:50:08 -0000
    
    

    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
    

  • Next message: Craig Daters: "Re: SpamAssassin and Sa-Learn"

    Relevant Pages

    • Re: resizing my slices/partitions - was pruning the Ports tree
      ... > I would like to expand my FreeBSD partion on the hard drive of which it only ... you don't run out of inodes before you run out of space. ... You may want to just ckeck the filesystem and see what's eating up all the ... _Assuming_ your Windows partition is the last partition on the HDD, ...
      (freebsd-questions)
    • Re: resizing my slices/partitions - was pruning the Ports tree
      ... > Hello Bill: ... > heavy drain on inodes occurred when I downloaded the full Ports ... To add space onto a partition, ... >> You may want to just ckeck the filesystem and see what's eating ...
      (freebsd-questions)
    • Re: Tar Problem??
      ... The filesystem you're writing to doesn't have sufficient inodes ... but the bytes-per-inode setting should be set to no more than the ... expected average size of files on the partition, ...
      (freebsd-questions)
    • DVD-RAM - best practice?
      ... Just put an LD DVD writer in my box and it included a DVD-RAM disk. ... result (one primary partition) with fdisk and I get: ... 4096 inodes per group ... Writing superblocks and filesystem accounting information: ...
      (comp.os.linux.hardware)
    • RE: lvm on RH8 _ SOLVED_
      ... Apparently, the lvm module wasn't getting initialised at boot, so I ... Using fdisk, change the partition usage to 0x8e (free space, logical ... Next the filesystem needs to be created in the logical volumes. ...
      (RedHat)