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

Thread: Using gparted from installed system question

  1. #1
    Join Date
    Nov 2008
    Posts
    2,117
    Blog Entries
    1

    Default Using gparted from installed system question

    I installed gparted in the belief that it would be able to work on a partition if it was not mounted. I wished to resize the partition.
    Even though the partition is not mounted I am not able to resize. The menu suggests I can resize but nothing can be changed.
    Why is this?

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,219

    Default Re: Using gparted from installed system question

    Difficult to say without any information given. Making larger or smaller? No partition table information shown. Let alone that people can see if the resize wanted is possible at all. No information about what is on the partition and if you want this to be saved and/or resized also.
    Henk van Velden

  3. #3
    Join Date
    Apr 2016
    Location
    Cambridge, UK
    Posts
    255

    Default Re: Using gparted from installed system question

    As Henk said, more details of the partitions and filesystems would be very useful.

    You say the partition is not mounted, but if it is part of a drive that has had one of it's partitions mounted I suspect there could be issues with actions being locked. Certainly moving and resizing I could imagine would be compromised.

    Personally I always boot from the Gparted live CD for any half serious disk work. It's downloadable at:
    https://sourceforge.net/projects/gparted/files/

  4. #4
    Join Date
    Nov 2008
    Posts
    2,117
    Blog Entries
    1

    Default Re: Using gparted from installed system question

    Sorry Henk,
    I was trying to reduce the size of /dev/sda3 by 2GB to make room for another small partition. There is plenty of unoccupied space on the partition and I was surprised because I have never had this problem before.

    Here is present configuration:-

    Code:
    Disk /dev/nvme0n1: 1.82 TiB, 2000398934016 bytes, 488378646 sectors
    Disk model: KINGSTON SNVS2000G                      
    Units: sectors of 1 * 4096 = 4096 bytes
    Sector size (logical/physical): 4096 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disklabel type: gpt
    Disk identifier: D3EFA9D8-DB20-46C8-8DEB-1B032F93EC8A
    
    Device         Start       End   Sectors  Size Type
    /dev/nvme0n1p1   256 488378640 488378385  1.8T Linux filesystem
    
    
    Disk /dev/sda: 5.45 TiB, 5996996984832 bytes, 11712884736 sectors
    Disk model: ServeRAID M5014 
    Units: sectors of 1 * 512 = 512 bytes
    Sector size (logical/physical): 512 bytes / 4096 bytes
    I/O size (minimum/optimal): 4096 bytes / 4096 bytes
    Disklabel type: gpt
    Disk identifier: 7480392D-DD88-48C6-9739-B8EF7F896285
    
    Device       Start         End     Sectors  Size Type
    /dev/sda1     2048     1026047     1024000  500M EFI System
    /dev/sda2  1026048     5220351     4194304    2G Linux filesystem
    /dev/sda3  5220352 11712884702 11707664351  5.5T Linux filesystem
    alastair@localhost:~>
    Details are here:-

    Code:
    alastair@localhost:~> sudo cat /etc/fstab
    UUID=af4aa939-4a7e-4a1b-8d9a-1f894de7e159  /            btrfs  defaults             0  0
    UUID=af4aa939-4a7e-4a1b-8d9a-1f894de7e159  /home        btrfs  subvol=/@/home       0  0
    UUID=1b2142eb-66a3-4970-8c18-2e4ec1ddf57b  /boot        ext4   data=ordered         0  2
    UUID=FFF5-2AE0                             /boot/efi    vfat   utf8                 0  2
    UUID=af4aa939-4a7e-4a1b-8d9a-1f894de7e159  /var         btrfs  subvol=/@/var        0  0
    UUID=af4aa939-4a7e-4a1b-8d9a-1f894de7e159  /usr/local   btrfs  subvol=/@/usr/local  0  0
    UUID=af4aa939-4a7e-4a1b-8d9a-1f894de7e159  /tmp         btrfs  subvol=/@/tmp        0  0
    UUID=af4aa939-4a7e-4a1b-8d9a-1f894de7e159  /srv         btrfs  subvol=/@/srv        0  0
    UUID=af4aa939-4a7e-4a1b-8d9a-1f894de7e159  /root        btrfs  subvol=/@/root       0  0
    UUID=af4aa939-4a7e-4a1b-8d9a-1f894de7e159  /opt         btrfs  subvol=/@/opt        0  0
    UUID=542efa95-d540-4de0-9103-b81e614baf48  /multimedia  xfs    defaults             0  0
    alastair@localhost:~>
    I posted prematurely more in surprise than panic but have since tried live version of gparted and still no joy. Could it be the xfs file system is the problem?
    Always used ext4 previously.

  5. #5
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,219

    Default Re: Using gparted from installed system question

    You are still sloppy in making a difference talking about the partition and about the file system on it.
    Thus first some assumption from me (because you did not explicitly said so):
    There is a partition sda3 with an XFS file system on it. You want to make sda3 a smaller partition, but also want to keep the data on the file system. Thus you first have to reduce the size of the file system, after which sda3 can be created on the same starting point with a size that conforms to the underlying shrinken file system.

    It is important that you understand these logical steps because by using a tool like gparted, that does these steps in the correct sequence for you, you may forget the underlying principles.

    So the first step is shrinking the XFS file system. I browsed a bit on the WWW and find indications that an XFS file system can not be shirinkened. And when that is true, you are already stopped at the very first point of your path. So please first try to find out if my idea that shrinking XFS is not possible is indeed true or not..

    BTW I am a bit surprised that a tool like gparted does not provide a clear message about why it does not do anything.
    Henk van Velden

  6. #6
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    16,249

    Default Re: Using gparted from installed system question

    You can not reduce the size of a XFS file system only expand it. A limitation of XFS

  7. #7
    Join Date
    Nov 2008
    Posts
    2,117
    Blog Entries
    1

    Default Re: Using gparted from installed system question

    Hi and many thanks. It appears that I cannot do as I had proposed. No warnings from gparted, just a refusal to do as asked but I now know a bit more about what was preventing my proposed actions.

    This effort on my part had been to create a swap partition "just in case" absence of it might stall my system, even though many say not to bother especially as I have plenty of memory thanks to eBay!.

    I did read elsewhere that a swap partition can be created as a file. If that is the case I could use the space I have available without making ant partition changes.
    Is this feasible?

  8. #8
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,219

    Default Re: Using gparted from installed system question

    Yes, there is file swap. As other swap possibiloties, you can use swapon (and swapoff) to manage them. And define them in /etc/fstab to predefine them for use at boot.

    But there rae restrictions (I see XFS also mentioned there). thus first study
    Code:
    man swapon
    And maybe ask in the forums for experience, specially with respect to XFS.

    An alternative approach to make a smaller XFS is of course offloading the data (you should of course already have a backup, but an extra one when doing these sort of actions is not a bad idea) and create the new partition and a new XFS inside it (and copy the data back).
    Henk van Velden

  9. #9
    Join Date
    Nov 2008
    Posts
    2,117
    Blog Entries
    1

    Default Re: Using gparted from installed system question

    Yes a backup is the way to go. The total is not so big in this case. It will have to wait until weekend.

  10. #10
    Join Date
    Dec 2008
    Location
    FL, USA
    Posts
    3,181
    Blog Entries
    1

    Default Re: Using gparted from installed system question

    You wrote you got the point in your swap thread. Thus, with that 64G of RAM you installed, the way to go is status quo. If you really think you must have swap, as gogalthorp wrote, a swap file will do.

    How much data is on that XFS partition you just created? Is it any real trouble to delete it and create it smaller leaving room for a dedicated swap partition to be added?
    Reg. Linux User #211409 *** multibooting since 1992
    Primary: 15.2, TW, 15.3 & 13.1 on Haswell
    Secondary: eComStation (OS/2) &15.2 on i965P w/ Radeon
    Tertiary: Mageia, Fedora, Debian, more on Kaby Lake & older Intel, AMD, NVidia &&&&&

Page 1 of 2 12 LastLast

Posting Permissions

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