Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: Accidently lost /home during resizing process

  1. #11
    Join Date
    Oct 2005
    Location
    Lab, Slovakia
    Beans
    10,362

    Re: Accidently lost /home during resizing process

    The install disk is necessarily a fresh boot. Before doing anything to the file system of /home again, first make a backup of your data. After that you can play with the disk utilities and if you are lucky you may still have your data intact.

  2. #12
    Join Date
    May 2006
    Location
    Switzerland
    Beans
    2,726
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Accidently lost /home during resizing process

    Quote Originally Posted by niclasrieger View Post
    but when I enter /home it's just empty.
    Of course it is empty. You unmounted it!

    I agree with the others: Please reboot a live CD / live USB-stick and use "gparted" from there. In that state none of your harddrive partitions should be mounted and they are a lot safer to manipulate that way.

  3. #13
    Join Date
    Apr 2021
    Beans
    5

    Re: Accidently lost /home during resizing process

    Well, that's definitely another lesson learned for me Thanks for all your helpful comments, it seems I managed to resize my partitions without (obviously) corrupting my data.
    1. unmounted again my /home
    2. expanded my /home to its original size via resize2fs /dev/my_home
    3. reboot and start from live USB
    4. resize via gparted
    5. reboot

    I actually expected to reinstall GRUB because I had to move my /home partition to increase the space of /, but surprisingly my computer boots normally without complaining + I can access all my data without problem.
    Thanks again

  4. #14
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Accidently lost /home during resizing process

    Whenever looking at LVM stuff, use these commands to get an overview:
    Code:
    sudo pvs
    sudo vgs
    sudo lvs
    lsblk -e 7 -o name,size,type,fstype,mountpoint
    They make nice text tables/graphs of the layout. Also, I'm confused that /dev/my_home worked at all. Normally, the location for LV links to the device-mapper "devices" are either:
    /dev/mapper/{vg}-{lv}
    or
    /dev/{vg}/{lv}
    For example:
    Code:
    lrwxrwxrwx 1 root root 7 Apr 20 01:35 /dev/hadar-vg/root -> ../dm-1
    lrwxrwxrwx 1 root root 7 Apr 20 01:35 /dev/hadar-vg/swap_1 -> ../dm-2
    VG name = hadar-vg
    LV names = swap_1 or root

    On a different system:
    Code:
    $ ls -l /dev/vgubuntu-mate/
    total 0
    lrwxrwxrwx 1 root root 7 Apr 20 01:15 home -> ../dm-2
    lrwxrwxrwx 1 root root 7 Apr 20 01:15 root -> ../dm-0
    lrwxrwxrwx 1 root root 7 Apr 20 01:15 swap_1 -> ../dm-1
    VG name = vgubuntu-mate
    LV names = swap_1 or root or home

    The dm-[0-99] values can change with every boot. There are other symbolic links generated by the device mapper that point to dm-[0-99] under /dev/disks/* too. That's where the LABEL and UUID links are placed.

    Regardless, happy that you seem to have found an answer, though it is unclear how from the data posted. If this is solved, please use the "Thread Tools" button near the top of the page to mark it that way so other people don't waste time.

  5. #15
    Join Date
    Jun 2006
    Location
    UK
    Beans
    Hidden!
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Accidently lost /home during resizing process

    Quote Originally Posted by TheFu View Post
    Whenever looking at LVM stuff,
    But the OP wasn't looking at lvm stuff, as is mentioned in the first post:

    Quote Originally Posted by niclasrieger
    Unfortunately, I wasn't aware of the differences between standard partitions (which I use) and the logical volume management (LVM) which the walkthrough is based on.
    Last edited by coffeecat; April 20th, 2021 at 06:42 PM. Reason: I really hate it when the u and i keys move sideways when I'm typing!
    Ubuntu 18.04 Desktop Guide - Ubuntu 20.04 Desktop Guide - Forum Guide to BBCode - Using BBCode code tags - IRC #ubuntuforums

    Member: Not Canonical Team

    If you need help with your forum account, such as SSO login issues, username changes, etc, the correct place to contact an admin is here. Please do not PM me about these matters unless you have been asked to - unsolicited PMs concerning forum accounts will be ignored.

Page 2 of 2 FirstFirst 12

Tags for this Thread

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
  •