Page 5 of 6
Re: More Gparted problems. [SOLVED]
Posted: Sun Sep 27, 2020 6:25 pm
by Stuart_M
I am not sure swap files as opposed to a dedicated swap partition is a good option. I have seen some information saying that it should be on its own dedicated partition.
One post you may want to look at is by user "p.H"
http://forums.debian.net/viewtopic.php?p=706232#p706232 (20 August 2019) who said
Do think twice before doing that. Linux was designed to use raw block devices as swap space, and still is. Using swapfiles with Linux is a hack. A dirty one. It does not work natively on filesystems types which do not allow to map files to physical blocks, use copy-on-write, and so on ; making it work natively on some of them (NFS, Btrfs) has required heavy intrusive kernel patching. The only clean way to use a swap file would be through a loop device, which incurs a performance penalty.
I have heard both ways, that swap files are just as good as dedicated partitions, and that users have good results with a swap file vice partition.
I prefer a dedicated swap partition - just another point of view.
Re: More Gparted problems. [SOLVED]
Posted: Sun Sep 27, 2020 6:36 pm
by tony37
Sparky wrote: Sun Sep 27, 2020 5:59 pmDid it!
Nice.
It would have surprised me if Gparted would really have erased your main partition if you just chose to shrink it, but I can't guarantee of course. Anyway, partitioning is always a bit tricky, just making a file feels a lot safer (as long as there is enough space for it and you don't enter too many zeroes after 'count=').
When you get to the point that swap is heavily being used, it's time to close some applications anyway as swap is not a real substitute for RAM, it just functions as a bit of a safety measure, but when a lot of swap is being used your pc becomes unworkably slow anyway. At least in my experience.
Re: More Gparted problems. [SOLVED]
Posted: Sun Sep 27, 2020 6:45 pm
by tony37
Stuart_M wrote: Sun Sep 27, 2020 6:25 pm
I am not sure swap files as opposed to a dedicated swap partition is a good option.
If the OP would have used hibernation, then I would have been more cautious about using a swap file.
I think Linux Mint uses a swap file by default now, so it can't be that outlandish.
Re: More Gparted problems. [SOLVED]
Posted: Sun Sep 27, 2020 6:49 pm
by tascoast
I like having a 'data' partition, so that rearranging a drive with Gparted becomes easier. I have moved partitions few times without errors and find Gparted reliable, warnings of potential data loss aside.
Having spent some time setting up and modifying multiple partitions on several drives there are some tricks and strategies you can adopt to move, resize, create... with minimal juggling, such a keeping free target space to the right etc. It's really helpful to size partitions in multiples of 1,024, I think, if you want a precise 20GB root/30MB home, a rough target I go for (having big files in a 'data' partition). You can even try to create partitions in a specific order to get sda1, sda2, sda2...in the sequence you prefer, although labeling partitions in Gparted is probably the most effective way to keep things manageable in Thunar etc, where partitions become easily identifiable.
Re: More Gparted problems. [SOLVED]
Posted: Mon Sep 28, 2020 11:20 am
by Sparky
This is correct for fstab right?
Code: Select all
UUID=2f851df4-e0ec-425b-8944-8276cf36f4e0 / ext4 defaults 1 1
UUID=db352309-b3e7-4d6b-83bd-2ef92cd8dac1 swap swap defaults 0 0
/swapfile none swap sw 0 0
Re: More Gparted problems. [SOLVED]
Posted: Mon Sep 28, 2020 11:49 am
by tony37
That second entry is of your disappeared swap partition, didn't you already delete that?
The rest is ok.
Re: More Gparted problems. [SOLVED]
Posted: Mon Sep 28, 2020 11:52 am
by Sparky
Code: Select all
UUID=2f851df4-e0ec-425b-8944-8276cf36f4e0 / ext4 defaults 1 1
/swapfile none swap sw 0 0
Thanks!
Re: More Gparted problems. [SOLVED]
Posted: Mon Sep 28, 2020 12:11 pm
by Sparky
tascoast wrote: Sun Sep 27, 2020 6:49 pm
I like having a 'data' partition, so that rearranging a drive with Gparted becomes easier. I have moved partitions few times without errors and find Gparted reliable, warnings of potential data loss aside.
Having spent some time setting up and modifying multiple partitions on several drives there are some tricks and strategies you can adopt to move, resize, create... with minimal juggling, such a keeping free target space to the right etc. It's really helpful to size partitions in multiples of 1,024, I think, if you want a precise 20GB root/30MB home, a rough target I go for (having big files in a 'data' partition). You can even try to create partitions in a specific order to get sda1, sda2, sda2...in the sequence you prefer, although labeling partitions in Gparted is probably the most effective way to keep things manageable in Thunar etc, where partitions become easily identifiable.
Aren't you limited by 4 partitions in MBR?
If I hadn't deleted my SWAP by accident, I'd be able to create a new partition, but with the 1, even Live Gparted gave me a warning of potential data loss to my MX install (the 1 and only partition). I keep Timeshift updates, but I have so many apps and downloads, that reinstalling MX would be a pain.
Re: More Gparted problems. [SOLVED]
Posted: Mon Sep 28, 2020 12:17 pm
by tony37
Sparky wrote: Mon Sep 28, 2020 12:11 pm
Aren't you limited by 4 partitions in MBR?
In principle, yes, but in MBR you can create an 'extended' partition in which you can create as many 'locigal' partitions as you want.
Sparky wrote: Mon Sep 28, 2020 12:11 pmIf I hadn't deleted my SWAP by accident, I'd be able to create a new partition, but with the 1, even Live Gparted gave me a warning of potential data loss to my MX install (the 1 and only partition).
Gparted
always warns about potential data loss, even if you want to simply change a label. So by all likelihood, creating a swap partition would have gone just fine.
Re: More Gparted problems. [SOLVED]
Posted: Mon Sep 28, 2020 12:20 pm
by Sparky
So I know for the next time, what should I use instead of MBR?
What If I want MX, MX-KDE- and another distro on the same computer?