Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Unknown partition

  1. #1
    Join Date
    Jul 2021
    Beans
    6

    Unknown partition

    Hello, everyone, hope you're fine.

    I've been using Ubuntu since two or three weeks and everything went well. However, last night I was exploring the preinstalled apps and when I opened the disks I saw an unknown partition:

    Block Device
    1.0 GB
    /dev/vgubuntu/swap_1
    855c405a-c7d9-472f-adfe-24370aa30ee3
    Ext4 (version 1.0)

    Is this normal or should I worry?

    Thank you in advance for your time.

  2. #2
    Join Date
    Mar 2007
    Beans
    1,110

    Re: Unknown partition

    Not sure what is going on but the name seems to suggest you have installed using LVM and that resulted in a swap partition, or file but a swap partition shouldn't be ext4.

    How did you come to see this unknown partition?

    Can you open a terminal window (control-alt-t ) and run the command swapon and copy and past the results in a reply?
    Last edited by rsteinmetz70112; July 19th, 2021 at 03:06 PM.

  3. #3
    Join Date
    Aug 2006
    Beans
    13,283
    Distro
    Ubuntu Mate 20.04 Focal Fossa

    Re: Unknown partition

    It doesn't look like the partition is unknown. It is identified as a swap partition, which is usually created by default.
    Not sure why the filesystem is ext4, but other then that..., more info would be required.

  4. #4
    Join Date
    Jun 2010
    Location
    London, England
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Unknown partition

    Please open the Disks utility and take a screenshot of what it shows you and attach it to a post in this thread using the insert image icon.

    Regards
    It is a machine. It is more stupid than we are. It will not stop us from doing stupid things.
    Ubuntu user #33,200. Linux user #530,530


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

    Re: Unknown partition

    a) When using LVM, a "partition" probably isn't being used for swap. That looks like an LV - Logical Volume.
    b) Using LVM is great, but very different from anything you've probably seen on Windows or OSX. LVM is an enterprise level storage volume management solution. It is very handy and brings some amazing capabilities. Many long-time users of Linux know nothing about LVM and don't use it because it can be very complex. But is doesn't need to be complex.
    c) An LV can almost always be through about like a partition in the old way, but with many more capabilities. Resizing an LV on a running system is possible and easy. Takes about 5 seconds, provided the PV and VG are not fully used. Those are other LVM objects to help with more complex management.
    If you can run this command:
    Code:
    lsblk -e 7 -o name,size,type,fstype,mountpoint
    and post the command AND the output using 'code-tags', then we'll know much more about your setup. The code-tags part is extremely important so the columns line up correctly. Https://ubuntuforums.org/misc.php?do=bbcode#code explains code-tag use.

    Gnome-Disks is a fairly dumb tool and very little use for LVM systems.

  6. #6
    Join Date
    Jul 2021
    Beans
    6

    Re: Unknown partition

    Quote Originally Posted by grahammechanical View Post
    Please open the Disks utility and take a screenshot of what it shows you and attach it to a post in this thread using the insert image icon.

    Regards
    Last edited by siralocse; July 19th, 2021 at 05:32 AM.

  7. #7
    Join Date
    Jul 2021
    Beans
    6

    Re: Unknown partition

    Quote Originally Posted by TheFu View Post
    a) When using LVM, a "partition" probably isn't being used for swap. That looks like an LV - Logical Volume.
    b) Using LVM is great, but very different from anything you've probably seen on Windows or OSX. LVM is an enterprise level storage volume management solution. It is very handy and brings some amazing capabilities. Many long-time users of Linux know nothing about LVM and don't use it because it can be very complex. But is doesn't need to be complex.
    c) An LV can almost always be through about like a partition in the old way, but with many more capabilities. Resizing an LV on a running system is possible and easy. Takes about 5 seconds, provided the PV and VG are not fully used. Those are other LVM objects to help with more complex management.
    If you can run this command:
    Code:
    lsblk -e 7 -o name,size,type,fstype,mountpoint
    and post the command AND the output using 'code-tags', then we'll know much more about your setup. The code-tags part is extremely important so the columns line up correctly. Https://ubuntuforums.org/misc.php?do=bbcode#code explains code-tag use.

    Gnome-Disks is a fairly dumb tool and very little use for LVM systems.
    Code:
    d@D-System:~$ lsblk -e 7 -o name,size,type,fstype,mountpoint
    NAME                    SIZE TYPE  FSTYPE      MOUNTPOINT
    sda                   465.8G disk              
    ├─sda1                  512M part  vfat        /boot/efi
    ├─sda2                  732M part  ext4        /boot
    └─sda3                464.6G part  crypto_LUKS 
      └─sda3_crypt        464.5G crypt LVM2_member 
        ├─vgubuntu-root   463.6G lvm   ext4        /
        └─vgubuntu-swap_1   980M lvm   ext4        
    sdb                   223.6G disk

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

    Re: Unknown partition

    So, vgubuntu-swap_1 is the swap (virtual memory) on your system. It is inside the encrypted LUKS container that you selected during installation.

    vgubuntu-root is huge. Much too large for what anyone would ever need.

    If it was me, I'd boot from installation media, manually use cryptsetup to open the sda3_crypt "LUKS container", then use vgchange -ay to get the LVM2 objects seen, then use lvreduce -r to reduce the size of vgubuntu-root to something about 40G in size, which is still too large for /, but should fit any needs for at least 3 yrs.

    Then I'd delete the vgubuntu-swap_1 LV, recreate a new swap LV sized at 4.1GB. That would use these commands: swapoff, lvremove, lvcreate, mkswap, then modify the /etc/fstab for the new name/location of the new swap. For a desktop, swap should be just a tad over 4GB. You cannot hibernate, but you can still standby. For a server, I'd probably leave the swap alone until you 100% know the workload, then ensure that no swap is actually needed and remove it completely.

    Then I'd create a "home" LV, probably sized to be 30-50GB (smaller is better), put an ext4 file system onto it and mount it on /home; moving any files/directories in the old /home/ to the new /home in the process. Because you are in the "Try Ubuntu" environment, the old and new "home" will be mounted to temporary locations anyways.

    Because you chose encryption, you got LVM for free. LVM is an enterprise volume management solution which is designed to be modified while the system is running, but there are limitations. Resizing an LV to larger size on a running system is easy. Reducing the size is a little harder and all the used storage is at risk, since Linux/Unix will allow you to resize smaller than the current files require. Don't do that. It will be bad.

    It should do without saying, but make a backup of anything you can't lose BEFORE starting all of this. During installation, I truly wish that setting up encryption and LVM were easier with custom sizes. I can't believe that Canonical's install team does what they did here with the sizing. Anything for root over 50G is just abuse. They seem to be trying to avoid support calls as the primary goal, not do what's best-practice for storage.

    Of course, you can leave this as is. I think the swap size is too small for a desktop and that the root LV is 10x too large and removes some of the main reasons why people use LVM. In this LV setup, we cannot use LVM snapshots, for example. There isn't any room left over for snapshots. I understand that new users would expect to see their entire HDD available for use after an install, but that isn't normally how Linux/Unix systems work. The price it too high with they default LV setup.

  9. #9
    Join Date
    Jul 2021
    Beans
    6

    Re: Unknown partition

    Quote Originally Posted by TheFu View Post
    So, vgubuntu-swap_1 is the swap (virtual memory) on your system. It is inside the encrypted LUKS container that you selected during installation.

    vgubuntu-root is huge. Much too large for what anyone would ever need.

    If it was me, I'd boot from installation media, manually use cryptsetup to open the sda3_crypt "LUKS container", then use vgchange -ay to get the LVM2 objects seen, then use lvreduce -r to reduce the size of vgubuntu-root to something about 40G in size, which is still too large for /, but should fit any needs for at least 3 yrs.

    Then I'd delete the vgubuntu-swap_1 LV, recreate a new swap LV sized at 4.1GB. That would use these commands: swapoff, lvremove, lvcreate, mkswap, then modify the /etc/fstab for the new name/location of the new swap. For a desktop, swap should be just a tad over 4GB. You cannot hibernate, but you can still standby. For a server, I'd probably leave the swap alone until you 100% know the workload, then ensure that no swap is actually needed and remove it completely.

    Then I'd create a "home" LV, probably sized to be 30-50GB (smaller is better), put an ext4 file system onto it and mount it on /home; moving any files/directories in the old /home/ to the new /home in the process. Because you are in the "Try Ubuntu" environment, the old and new "home" will be mounted to temporary locations anyways.

    Because you chose encryption, you got LVM for free. LVM is an enterprise volume management solution which is designed to be modified while the system is running, but there are limitations. Resizing an LV to larger size on a running system is easy. Reducing the size is a little harder and all the used storage is at risk, since Linux/Unix will allow you to resize smaller than the current files require. Don't do that. It will be bad.

    It should do without saying, but make a backup of anything you can't lose BEFORE starting all of this. During installation, I truly wish that setting up encryption and LVM were easier with custom sizes. I can't believe that Canonical's install team does what they did here with the sizing. Anything for root over 50G is just abuse. They seem to be trying to avoid support calls as the primary goal, not do what's best-practice for storage.

    Of course, you can leave this as is. I think the swap size is too small for a desktop and that the root LV is 10x too large and removes some of the main reasons why people use LVM. In this LV setup, we cannot use LVM snapshots, for example. There isn't any room left over for snapshots. I understand that new users would expect to see their entire HDD available for use after an install, but that isn't normally how Linux/Unix systems work. The price it too high with they default LV setup.
    Thank you very much for explaining so well what's happening with my PC storage. You've really done something very selfless here.
    I thought I was part of that small percentage of Ubuntu users who, somehow, caught some malware or something similar; it's a relief to know that it was a mismanagement of the partitions and nothing more.

    I will put into practice everything you advise. Many thanks again and thanks to the other people as well.

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

    Re: Unknown partition

    Partition mismanagement? Well, not really.

    More like LVM mismanagement. Of course, what should and could be done is a matter of opinion.

    You don't need to touch any partitions or modify the encrypted container or PV or VG on the system. It is only the LVs that I would touch. Probably best to work through an LVM tutorial first, since I listed commands, but not all the options. There is 1 truth. Whenever resizing an LV, add the -r option, so it will resize (up or down) the file system too. Also, with LVM, the manpages are mandatory reading. Don't try to guess anything. LVM assumes the administrator knows what they are doing. Ask it to do something stupid and it will, happily.

Page 1 of 2 12 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
  •