Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 26

Thread: how to combine two hard without loss of contents?

  1. #11
    Join Date
    Apr 2008
    Location
    LOCATION=/dev/random
    Beans
    5,767
    Distro
    Ubuntu Development Release

    Re: how to combine two hard without loss of contents?

    OK then. First we need to delete the ext4 partition you've created and create an LVM partition instead. This will delete all of the data that's currently on your new drive.

    Code:
    sudo fdisk /dev/sda
    d
    n
    p
    1
    [ENTER]
    [ENTER]
    t
    8e
    w
    If you now do 'sudo fdisk -l /dev/sda' you should see that your new drive has 1 LVM partition taking up the entire drive.

    Next we create a new PV (physical volume) from the partition and add it to your existing VG (volume group).
    Code:
    sudo pvcreate /dev/sda1
    sudo vgextend ALSHARQI /dev/sda1
    We can now extend your root LV (logical volume) to take up all of the newly available space in your VG.
    Code:
     sudo lvextend -l +100%FREE /dev/ALSHARQI/root
    Finally we grow the root filesystem to use all of the available space on the underlying root VG.
    Code:
    sudo resize2fs /dev/ALSHARQI/root
    All done. You can check the size of your new root partition using..
    Code:
    df -h
    Cheesemill

  2. #12
    Join Date
    Mar 2012
    Beans
    34

    Re: how to combine two hard without loss of contents?

    sorry, but will this delete all my data of old drive??

  3. #13
    Join Date
    Apr 2008
    Location
    LOCATION=/dev/random
    Beans
    5,767
    Distro
    Ubuntu Development Release

    Re: how to combine two hard without loss of contents?

    No.
    It will create a new partition on your new drive, add it to your LVM setup, and resize your existing installation to use all of the available space.

    Although if anything does go wrong you do have a backup to restore from don't you?
    Cheesemill

  4. #14
    Join Date
    Mar 2012
    Beans
    34

    Re: how to combine two hard without loss of contents?

    i would thank you for your helping and your patience
    but how to backup it???

  5. #15
    Join Date
    Mar 2012
    Beans
    34

    Re: how to combine two hard without loss of contents?

    i get this error on sudo pvcreate /dev/sda1

    Code:
    Device /dev/sda1 not found (or ignored by filtering).

  6. #16
    Join Date
    Apr 2008
    Location
    LOCATION=/dev/random
    Beans
    5,767
    Distro
    Ubuntu Development Release

    Re: how to combine two hard without loss of contents?

    What does your new sda drive look like now, it should have one large LVM partition, sda1.
    Can you post the output of...
    Code:
    sudo fdisk -l /dev/sda
    Cheesemill

  7. #17
    Join Date
    Mar 2012
    Beans
    34

    Re: how to combine two hard without loss of contents?

    Code:
    Disk /dev/sda: 2000.4 GB, 2000398934016 bytes255 heads, 63 sectors/track, 243201 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disk identifier: 0x17441f77
    
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1               1      243201  1953512001   8e  Linux LVM
    Partition 1 does not start on physical sector boundary.

  8. #18
    Join Date
    Apr 2008
    Location
    LOCATION=/dev/random
    Beans
    5,767
    Distro
    Ubuntu Development Release

    Re: how to combine two hard without loss of contents?

    For some reason your LVM configuration isn't letting you add the new drive. I've not come across this before but I have a couple of ideas.
    Can you post the output of...
    Code:
    grep filter /etc/lvm/lvm.conf | grep -v "#"
    Cheesemill

  9. #19
    Join Date
    Mar 2012
    Beans
    34

    Re: how to combine two hard without loss of contents?

    Code:
     filter = [ "a/.*/" ]

  10. #20
    Join Date
    Mar 2012
    Beans
    34

    Re: how to combine two hard without loss of contents?

    Cheesemill
    is there solution for this error

Page 2 of 3 FirstFirst 123 LastLast

Bookmarks

Posting Permissions

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