Find the answer to your Linux question:
Results 1 to 4 of 4
hi, i am new in here, hopefully somebody knows an easier solution to my problem... for ease of administration, iŽd like to place multiple partitions in ONE device created through ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2010
    Location
    Germany
    Posts
    2

    Partitionable blockdevices


    hi,

    i am new in here, hopefully somebody knows an easier solution to my problem...

    for ease of administration, iŽd like to place multiple partitions in ONE device created through md raid or encryption or lvm... whatever. i always end up having a block device comparable to one single partition - i can place a filesystem on it, but i canŽt treat it as a whole harddisk to nest multiple partitions inside.

    example:
    - /dev/md0 created using some real partitions
    - /dev/mapper/backupdisk created using cryptsetup
    i can use fdisk to create partitions on those devices but i never get something like /dev/md0p2 or /dev/mapper/backupdiskp2...

    iŽve read SOME stuff about mknod, major/minor numbers, or a patch for loop devices to be partitionable... by now, i havnŽt made it.

    any advice before i burn plenty more time?

    thanks!!!

  2. #2
    Linux Enthusiast
    Join Date
    Jan 2005
    Location
    Saint Paul, MN
    Posts
    640
    LVM TERMS:
    PHYSICAL VOLUME --- Refers to the "partition of a real drive" or a "real drive".
    VOLUME GROUP ------ Refers to the "collection of one or PHYSICAL VOLUME grouped together as "Virtual Drive"
    LOGICAL VOLUME ---- Refers to a slice within a "VOLUME GROUP" a "Virtual Partition" with the "Virtual Drive"

    LVM uses real partition(s). The Partition(s) are assigned to a "VOLUME GROUP" by way of a name (Think of this as a virtual
    drive.) Then a "LOGICAL VOLUME" is created from part or all of the "VOLUME GROUP" by way of a name (Think of this as a
    partition within the virtual drive.) A filesystem is written to the "logical volume" and then it can be mounted and used.
    Additional "real drives" can be added partitioned to be a LVM partition and can be added to an existing "physical volume"
    or a new "physical volume". LVM even has scripts to move data off a "PYSICAL VOLUME" to other "PYHICAL VOLUMEs" in the
    "VOLUME GROUP" providing that there is space to hold that data. Once that is done, the "PHYSICAL VOLUME" can be removed
    from the "VOLUME GROUP". LVM does not provide RAID but software raid can be used on top of the LVM "logical volumes".

    Software RAID uses the "real drive partition" or "logical volume" to provide raid devices
    (
    Note: LVM uses real partition(s) or real whole disks. The Partition(s) or whole disk are assigned to a "VOLUME GROUPS" by way of a name (Think of this as a virtual drive.) Then a "LOGICAL VOLUME" is created from part or all of the "VOLUME GROUP" by way of a name (Think of this as a partition within the virtual drive.) A filesystem is written to the "logical volume" and then it can be mounted and used. Additional "PYSICAL VOLUMES" can be added partitioned to be a LVM "VOLUME GROUP" or a new "VOLUME GROUP". LVM even has scripts to move data off a "PYHSICAL VOLUME" to other "PHYSICAL VOLUMEs" in the "VOLUME GROUP" providing that there is space to hold that data. Once that is done, the "PHYSICAL VOLUME" can be removed from the "VOLUME GROUP". LVM does not provide RAID but software raid can be used on top of the LVM "logical volumes".

    Software RAID uses the "real drive partition" or "logical volume" to provide raid devices.
    (
    Note:
    That raid-0 does not provide a redunfancy and a failure on any portion of that device causes the device to be unusable. It provides a speed improvment my moving to other "units" (the partition or logical volume) before stepping to a new track). It is not recomended to used raid-0 by it's self.
    )

    LVM logical volumes can be expanded, contracted, and removed without having to re-arranging the layout (as their space needs not be is a single connected space on the disk.
    That raid-0 does not provide a redunfancy and a failure on any portion of that device causes the device to be unusable. It provides a speed improvment my moving to other "units" (the partition or logical volume) before stepping to a new track). It is not recomended to used raid-0 by it's self.
    )
    Last edited by alf55; 10-09-2010 at 04:33 PM. Reason: Added stuff after the NOTE on raid-0

  3. #3
    Just Joined!
    Join Date
    Oct 2010
    Location
    Germany
    Posts
    2
    thank you for those quick quotes. looks familiar, guess iŽve read this at some point in time.

    so i take this as a hint that thereŽs no other way to get multiple partions into another partition but using lvm? really? is this best practice?

    i should be more specific on my actual vision:

    - /dev/sdb --> hard drive as backup medium.
    - sdb1 --> some live linux as service system - u never know...
    - sdb2 --> swap space - u never know...
    - sdb3 --> encrypted backup partition --> /dev/mapper/crypted
    - backup mirrors whole DISK /dev/sda to crypted - thats 3 partitions sda[123]
    - now i perfectly can restore sda from crypted, BUT
    - iŽd love to have access to crypted/p1/p2/p3 to mount and access single files

    ok i could stuff lvm into crypted, but iŽd end up having three lvs, iŽd have to mirror three partitions, take care of their sizes, take care if i added partitions or alter my partitioning sceme... take care, care, care. as i wrote, this topic is about ease of administration.

  4. #4
    Linux Enthusiast
    Join Date
    Jan 2005
    Location
    Saint Paul, MN
    Posts
    640
    Or a crypted on a "Logical Volume". Administration of an LVM is not hard.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •