I erred in setting up my F30 system. Since the notebook has 4GB memory, the install set up swap of 4GB.
This is not enough. I have two options. Add more memory (which will take more electrons to support), or enlarge swap. Of course more swapping even to an SSD will probably use more electrons (this is about battery life).
So the question for now is can I shrink partition 4-5 (why did the install do it this way?) and expand swap, or is this just too risky and just go with more memory.
thanks
# parted /dev/sda
(parted) print all Model: ATA WDC WDBNCE5000PN (scsi) Disk /dev/sda: 500GB Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags:
Number Start End Size Type File system Flags 1 1049kB 1075MB 1074MB primary ext4 boot 2 1075MB 4576MB 3501MB primary linux-swap(v1) 3 4576MB 79.7GB 75.2GB primary ext4 4 79.7GB 500GB 420GB extended 5 79.7GB 500GB 420GB logical ext4
# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda3 69G 19G 47G 29% / /dev/sda1 976M 222M 688M 25% /boot /dev/sda5 385G 224G 142G 62% /home
On 7/26/19 10:33 PM, Robert Moskowitz wrote:
I erred in setting up my F30 system. Since the notebook has 4GB memory, the install set up swap of 4GB.
This is not enough. I have two options. Add more memory (which will take more electrons to support), or enlarge swap. Of course more swapping even to an SSD will probably use more electrons (this is about battery life).
So the question for now is can I shrink partition 4-5 (why did the install do it this way?) and expand swap, or is this just too risky and just go with more memory.
In searching, have you found https://access.redhat.com/articles/1196333%C2%A0 for example?
I've never had the need to do it. But if I did I'd first practice on a VM. :-)
On 7/26/19 10:50 AM, Ed Greshko wrote:
On 7/26/19 10:33 PM, Robert Moskowitz wrote:
I erred in setting up my F30 system. Since the notebook has 4GB memory, the install set up swap of 4GB.
This is not enough. I have two options. Add more memory (which will take more electrons to support), or enlarge swap. Of course more swapping even to an SSD will probably use more electrons (this is about battery life).
So the question for now is can I shrink partition 4-5 (why did the install do it this way?) and expand swap, or is this just too risky and just go with more memory.
In searching, have you found https://access.redhat.com/articles/1196333%C2%A0 for example?
My search foo is weak. I missed this. Thanks.
I've never had the need to do it. But if I did I'd first practice on a VM. :-)
Well, I would have to put the drive in a USB/sata adapter and run this on another system. That does seem reasonable.
Actually I have seen the resizing used a lot in the Fedora and CentOS arm images. You dd the base image then resize them larger. I do this frequently, so I can experiment with Fedora arm images first. Instead of just enlarging, also reduce and move them.
Well, first put in an additional 4GB memory, then play around with enlarging swap.
I don’t know how risky it is to shrink existing partitions but you also could use a swap file instead of a partition
Alex
On 7/26/19 12:10 PM, Alexander Ruetz wrote:
I don’t know how risky it is to shrink existing partitions but you also could use a swap file instead of a partition
Ah, so I could create a swap file of 4GB, add that to fstab and give it a go.
Or make the file 8GB and make it the first swap unit with the physical the 2nd so that a large image to suspend would more likely fit.
On 7/26/19 9:48 AM, Robert Moskowitz wrote:
Ah, so I could create a swap file of 4GB, add that to fstab and give it a go.
Yes.
Or make the file 8GB and make it the first swap unit with the physical the 2nd so that a large image to suspend would more likely fit.
Suspend doesn't use swap, that's only for hibernate. I don't think hibernate can use a swap file, but I might be wrong.
On 7/26/19 12:10 PM, Alexander Ruetz wrote:
I don’t know how risky it is to shrink existing partitions but you also could use a swap file instead of a partition
So I just did this using the following commands:
fallocate --length 8GiB /mnt/swapfile chmod 600 /mnt/swapfile mkswap /mnt/swapfile swapon /mnt/swapfile
Before swapon free showed:
total used free shared buff/cache available Mem: 3287328 2799184 105568 188488 382576 86712 Swap: 3419132 2047228 1371904
Afterwards:
total used free shared buff/cache available Mem: 3287328 2793736 110848 188448 382744 92232 Swap: 11807736 2062724 9745012
Thus meaning swapon is additive. I can understand that since I was using the swap partition, it might have been bad to try and move all that swapped stuff to the new file.
Now to change fstab. Right now I have:
UUID=05a77f3d-bd07-4a3b-87ee-482cb28dcfd2 none swap defaults 0 0
The instructions I saw was to add (or replace?) with
/mnt/swapfile swap swap defaults 0 0
Couple questions. When I ran mkswap:
# mkswap /mnt/swapfile Setting up swapspace version 1, size = 8 GiB (8589930496 bytes) no label, UUID=ad2c6856-023a-4fbe-97f9-594d260c85de
Should I use the file name or the UUID in fstab?
Do I replace the current swap entry in fstab, or if I put both in, do both get used as I see right now?
# cat /proc/swaps Filename Type Size Used Priority /dev/sda2 partition 3419132 2153948 -2 /mnt/swapfile file 8388604 0 -3
thanks
On 7/28/19 11:37 AM, Robert Moskowitz wrote:
The instructions I saw was to add (or replace?) with
/mnt/swapfile swap swap defaults 0 0
Couple questions. When I ran mkswap:
# mkswap /mnt/swapfile Setting up swapspace version 1, size = 8 GiB (8589930496 bytes) no label, UUID=ad2c6856-023a-4fbe-97f9-594d260c85de
Should I use the file name or the UUID in fstab?
Either one will be fine. FWIW, you may be more likely to remember what you've done if you use the file name. :-)
Do I replace the current swap entry in fstab, or if I put both in, do both get used as I see right now?
If you have both, both get used. If you have only one of them only the one gets used.
On 7/27/19 10:51 PM, Ed Greshko wrote:
On 7/28/19 11:37 AM, Robert Moskowitz wrote:
The instructions I saw was to add (or replace?) with
/mnt/swapfile swap swap defaults 0 0
Couple questions. When I ran mkswap:
# mkswap /mnt/swapfile Setting up swapspace version 1, size = 8 GiB (8589930496 bytes) no label, UUID=ad2c6856-023a-4fbe-97f9-594d260c85de
Should I use the file name or the UUID in fstab?
Either one will be fine. FWIW, you may be more likely to remember what you've done if you use the file name. :-)
You can't use the UUID because it won't be found. You can only use the UUID on devices that can be auto-detected.
On 7/28/19 2:11 PM, Samuel Sieb wrote:
On 7/27/19 10:51 PM, Ed Greshko wrote:
On 7/28/19 11:37 AM, Robert Moskowitz wrote:
The instructions I saw was to add (or replace?) with
/mnt/swapfile swap swap defaults 0 0
Couple questions. When I ran mkswap:
# mkswap /mnt/swapfile Setting up swapspace version 1, size = 8 GiB (8589930496 bytes) no label, UUID=ad2c6856-023a-4fbe-97f9-594d260c85de
Should I use the file name or the UUID in fstab?
Either one will be fine. FWIW, you may be more likely to remember what you've done if you use the file name. :-)
You can't use the UUID because it won't be found. You can only use the UUID on devices that can be auto-detected.
Thanks for the correction. Don't know what I was thinking. :-(
On 7/28/19 2:11 AM, Samuel Sieb wrote:
On 7/27/19 10:51 PM, Ed Greshko wrote:
On 7/28/19 11:37 AM, Robert Moskowitz wrote:
The instructions I saw was to add (or replace?) with
/mnt/swapfile swap swap defaults 0 0
Couple questions. When I ran mkswap:
# mkswap /mnt/swapfile Setting up swapspace version 1, size = 8 GiB (8589930496 bytes) no label, UUID=ad2c6856-023a-4fbe-97f9-594d260c85de
Should I use the file name or the UUID in fstab?
Either one will be fine. FWIW, you may be more likely to remember what you've done if you use the file name. :-)
You can't use the UUID because it won't be found. You can only use the UUID on devices that can be auto-detected.
Now that is obvious once someone else points it out.
Thanks!
On 19-07-26 10:33:49, Robert Moskowitz wrote:
I erred in setting up my F30 system. Since the notebook has 4GB memory, the install set up swap of 4GB.
This is not enough.
...
So the question for now is can I shrink partition 4-5
...
and expand swap, or is this just too risky and just go with more memory.
Use gparted from a live image (DVD, USB stick). Shrink 5 and then make a new 6 of type swap, and add it to fstab so there are 2 swap partitions -- both will be used. Hibernate will only use one, but the image is compressed, so chances are good that the first one will be enough.
You can instead shrink 5 and then 4 and move them up and then enlarge 3, but it will take a lot longer.
...
# parted /dev/sda
(parted) print all Model: ATA WDC WDBNCE5000PN (scsi) Disk /dev/sda: 500GB Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags:
Number Start End Size Type File system Flags 1 1049kB 1075MB 1074MB primary ext4 boot 2 1075MB 4576MB 3501MB primary linux-swap(v1) 3 4576MB 79.7GB 75.2GB primary ext4 4 79.7GB 500GB 420GB extended 5 79.7GB 500GB 420GB logical ext4
# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda3 69G 19G 47G 29% / /dev/sda1 976M 222M 688M 25% /boot /dev/sda5 385G 224G 142G 62% /home
If I were you I would get rid off that partion schema and would change it to GUID partioning ! I don't know if it's able to do without new installation !
In my view/with my understanding: if you ever get in the position/the need to do an new install with new partioning your /home on an logical partition is in danger. - maybe I'm wrong ?! -
If you move to GUID partioning you circumvent the barrier of 4 primary partions OR 3 prim. plus x logical. You simply get more then 4 primary partitions. - don't know the limit - And you are able - during a later new install - to leave your /home in an primary partition untouched and just mount it during an new install. For the other partitions (/, swap, ...) you are free to format /re-partitioning them without putting /home in danger. - no need to tell that a user data backup is important anyway -
Hints: - you need a partition named "Bios Boot" with 1-2 MB size as a first (?) partition. - you need (I'm unsure if this still relevant !!!) "inst.gpt" as boot parameter for your install media https://docs.fedoraproject.org/en-US/Fedora/25/html/Installation_Guide/sect-...
- leave some space (10-15 %) on your ssd un-partitioned ( again, don't know if this still valid)
my config: sudo fdisk -l /dev/nvme0n1 :
Disk /dev/nvme0n1: 465,8 GiB, 500107862016 bytes, 976773168 sectors Disk model: Samsung SSD 970 EVO Plus 500GB Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: F881C380-A695-4C12-BD2E-73B0D205EFAC
Device Start End Sectors Size Type /dev/nvme0n1p1 2048 6143 4096 2M BIOS boot /dev/nvme0n1p2 6144 97662975 97656832 46,6G Linux filesystem /dev/nvme0n1p3 97662976 781258751 683595776 326G Linux filesystem /dev/nvme0n1p4 781258752 820322303 39063552 18,6G Linux filesystem
swap is on another disk !
mount|grep ext4 :
/dev/nvme0n1p2 on /home type ext4 (rw,relatime,seclabel) /dev/nvme0n1p3 on /home/ron/DATA type ext4 (rw,relatime,seclabel) /dev/nvme0n1p4 on / type ext4 (rw,relatime,seclabel)
.../DATA - an extra partition carries movies/mp3/iso's, etc. mostly big data I'm lazy to move around during new installs. - extra partition cause it allows to format /home too during new installs, if needed
/home and .../DATA are backup-ed weekly !
a drawback with .../DATA if I format /home: /home/<user> is created during first gnome login, e.g. I can't mark it to mount it during install => a need to edit /etc/fstab AFTER first login/user creation, but I do it anyway to mount /var/tmp as tmpfs to !
cat /etc/fstab : UUID=... / ext4 defaults 1 1 UUID=... /home ext4 defaults 1 2 UUID=... swap swap defaults,discard=pages 0 0 # UUID=.... / /home/ron/DATA ext4 defaults 1 2 # tmpfs /var/tmp tmpfs defaults,nosuid,nodev,noexec,mode=1777 0 0
On 19-07-27 10:24:54, sixpack13 wrote:
If I were you I would get rid off that partion schema and would change it to GUID partioning ! I don't know if it's able to do without new installation !
You would have to copy all the data off and back on; might as well re-install.
What I suggested using gparted I did on a GPT formatted drive. That is, using GPT would not have helped you. (I actually did the moves on the running system, as those partitions weren't mounted, and the resize from a live DVD.) But if you just queue up all the things in gparted and start it, you can walk away and come back when it is done.
It does not matter whether a partition is primary or extended, and there is no limit on the number of extended partitions, though they get nested deeply. The limits are on the size of the drive, which won't change unless you replace the drive. You don't need GPT.
sure the OP doesn't need GPT. Not strongly/imperative !
and my suggestions are far away from just "extend swap".
but he needs to save his data anyway (backup) before he moves his partitions with gparted. - I never would manipulate partition WITHOUT an backup ! -
a second backup is needed again if he - in the future - needs to change something within his first three primary partitions and of cause a gparted run.
a extended partition with logical's in and on top of that /home (with the dearest data) as one of the logical partition was always - in my experiences - obstructive and time comsuming !
even if the OP decides in the future to run windows in addition to linux on his ONE disk box: he is fxxked: windows claims the first (and the second ?) primary partition as it's install target.
what do you do if you need to update your bios and the vendor only provides windows based bios updates ? WinPE might work and what if not ? second disk ? available ?
sure with the current partition layout it might be doable again with gparted, too. (but why to spend the time again for the same tasks ? I'm lazy !)
I was pissed often to move data lasting for hours caused by an aged limit of 4 primary partitions only (or 3x primary and 1x extended with x logical) before GPT was introduced/avaiable for linux.
my suggestion/intentions was/is "do it once, but do it (mostly) right then" with the view of most time saving/flexibility/etc for the future.
the time you need to move full partitions with gparted is - in my view - "simular" maybe longer then the time needed to do an fresh install (< 1 h) AND the pending user configuration/restore data (time depends on user needs) ?!
agreed ?
sure if you move empty partitions (backuped and then erased) OR erase sda5, sda4, resize sda{1,2,3} and create new sda{4,5, ..} you won't agree. quiet clear !
But you need to restore the data (/home on sda5), anyway.
Why not restore it on an nicer partition layout ?
so, if I need to do so much work (error prone for my taste: nobody warrants gparted won't fail ! - it hadn't in past though, but ... -) spending additional < 1 h for an new install on an clean/non-obstructive/etc. partition layout (GPT) is not much additional time. (the time for the restore is needed in any case [gparted without backup: no go !])
The time the OP needs to successfully perform the tasks I suggest is - maybe - somewhat higher then to just "extend swap". But maybe it might be shorter (I can't guess the time needed for user configurations after install to the current state) even if gparted fails somehow (no electron out of the wall for a second, ...).
I just try to prevent the OP for maybe bad, time consumming, un-needed, reiterating experiences I maid years ago with a one disk box.
That all !
When you have a notebook install, you are locked into the drive you have and whatever you did on the partitioning, you are stuck with, for the most part. No adding a new drive with additional partitions.
I originally deleted the default LVM setup and then created the ext4 partitions you see in the original post. The Fedora installer created those partitions. It was my oversight in not making swap larger in the 1st place; I was controling the install knobs.
Once you make /home to use up all the remaining space on your drive, you are stuck. Other than getting a bigger SSD and using dd to move /, /boot and /home to the new drive where you made a larger swap.
Or follow instructions to resize /home smaller.
Or create a swap file. I have plenty of space in the / partition for making a swap file.
On 7/27/19 10:24 AM, sixpack13 wrote:
If I were you I would get rid off that partion schema and would change it to GUID partioning ! I don't know if it's able to do without new installation !
In my view/with my understanding: if you ever get in the position/the need to do an new install with new partioning your /home on an logical partition is in danger. - maybe I'm wrong ?! -
If you move to GUID partioning you circumvent the barrier of 4 primary partions OR 3 prim. plus x logical. You simply get more then 4 primary partitions. - don't know the limit - And you are able - during a later new install - to leave your /home in an primary partition untouched and just mount it during an new install. For the other partitions (/, swap, ...) you are free to format /re-partitioning them without putting /home in danger. - no need to tell that a user data backup is important anyway -
Hints:
- you need a partition named "Bios Boot" with 1-2 MB size as a first (?) partition.
- you need (I'm unsure if this still relevant !!!) "inst.gpt" as boot parameter for your install media
https://docs.fedoraproject.org/en-US/Fedora/25/html/Installation_Guide/sect-...
- leave some space (10-15 %) on your ssd un-partitioned ( again, don't know if this still valid)
my config: sudo fdisk -l /dev/nvme0n1 :
Disk /dev/nvme0n1: 465,8 GiB, 500107862016 bytes, 976773168 sectors Disk model: Samsung SSD 970 EVO Plus 500GB Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: F881C380-A695-4C12-BD2E-73B0D205EFAC
Device Start End Sectors Size Type /dev/nvme0n1p1 2048 6143 4096 2M BIOS boot /dev/nvme0n1p2 6144 97662975 97656832 46,6G Linux filesystem /dev/nvme0n1p3 97662976 781258751 683595776 326G Linux filesystem /dev/nvme0n1p4 781258752 820322303 39063552 18,6G Linux filesystem
swap is on another disk !
mount|grep ext4 :
/dev/nvme0n1p2 on /home type ext4 (rw,relatime,seclabel) /dev/nvme0n1p3 on /home/ron/DATA type ext4 (rw,relatime,seclabel) /dev/nvme0n1p4 on / type ext4 (rw,relatime,seclabel)
.../DATA
- an extra partition carries movies/mp3/iso's, etc. mostly big data I'm lazy to move around during new installs.
- extra partition cause it allows to format /home too during new installs, if needed
/home and .../DATA are backup-ed weekly !
a drawback with .../DATA if I format /home: /home/<user> is created during first gnome login, e.g. I can't mark it to mount it during install => a need to edit /etc/fstab AFTER first login/user creation, but I do it anyway to mount /var/tmp as tmpfs to !
cat /etc/fstab : UUID=... / ext4 defaults 1 1 UUID=... /home ext4 defaults 1 2 UUID=... swap swap defaults,discard=pages 0 0 # UUID=.... / /home/ron/DATA ext4 defaults 1 2 # tmpfs /var/tmp tmpfs defaults,nosuid,nodev,noexec,mode=1777 0 0 _______________________________________________ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
When you have a notebook install, you are locked into the drive you have and whatever you did on the partitioning, you are stuck with, for the most part. No adding a new drive with additional partitions.
Exactly, that was my main point: that YOU get more flexibilty with GPT on an one-disk only box - maybe with the cost of new install AND re-partition ! - The time you need to spent now is the time you save in the future - in my view -
I originally deleted the default LVM setup and then created the ext4 partitions you see in the original post. The Fedora installer created those partitions. It was my oversight in not making swap larger in the 1st place; I was controling the install knobs.
I never use "automatic partitioning", cause I need to leave my /home un-touched. Otherwise you get LVM (still valid ?) or msdos partition scheme. In your current case LVM had been a win too, it also bring flexibility regarding re-partioning/re-sizing
I know/have learned if you don't start the installer without parameter inst.gpt (?) and choose manual partitioning you get the current partition scheme.
Maybe one should think about to make inst.gpt a default boot parameter for the installer ?
On Sat, 2019-07-27 at 23:02 -0400, Robert Moskowitz wrote:
When you have a notebook install, you are locked into the drive you have and whatever you did on the partitioning, you are stuck with, for the most part. No adding a new drive with additional partitions.
I originally deleted the default LVM setup and then created the ext4 partitions you see in the original post. The Fedora installer created those partitions. It was my oversight in not making swap larger in the 1st place; I was controling the install knobs.
With new a release, that I'm not familiar with their partitioning desires, I often have a play around with the partitioning routine of the install. Let it automatically set them up, then go and inspect what they did (this is before letting the install proceed). Look at the numbers of partitions, the types, the sizes, then re-do things my preferred way (without LVM, as it makes it annoyingly painful to unplug a drive, connect it elsewhere, and ferret around for old files).
sixpack13 composed on 2019-07-27 14:24 (UTC):
If I were you I would get rid off that partion schema and would change it to GUID partioning ! I don't know if it's able to do without new installation !
I have only nominal familiarity with partitioning tools other than that which I've been using cross-platform for two decades exclusively, DFSee[1], which is not FOSS. Because DFSee can make this conversion, I have to think others can do it as well.
In my view/with my understanding: if you ever get in the position/the need to do an new install with new partioning your /home on an logical partition is in danger. - maybe I'm wrong ?! -
If you move to GUID partioning you circumvent the barrier of 4 primary partions OR 3 prim. plus x logical.
That's 4 primaries: 3 normal primaries, plus a primary called extended. It is the extended which "contains" logicals. The extended is actually a chain of sectors that delineate one logical partition, and optionally point to a next sector in the extended chain.
You simply get more then 4 primary partitions. - don't know the limit -
IIRC, 256.
you need a partition named "Bios Boot" with 1-2 MB size as a first (?) partition.
Technically, much less than 1MB is needed, but not using a multiple of 1MB would normally disrupt conventional partitioning's sector alignment: https://en.wikipedia.org/wiki/BIOS_boot_partition
[1] http://www.dfsee.com/dfsee
sixpack13 composed on 2019-07-27 14:24 (UTC):
...
... DFSee[1]...
And it still supports IBM OS/2, neat, that brings up some good and some bad memories. worked on/with it 25 years ago ! What would be - with respect to Win10 user brainfxxk now- if IBM weren't so blind to give away the market to M$ ? ..
IIRC, 256.
...
Technically, much less than 1MB is needed, but not using a multiple of 1MB would normally disrupt conventional partitioning's sector alignment: https://en.wikipedia.org/wiki/BIOS_boot_partition
Thanks for clarification !
On 7/28/19 8:27 AM, sixpack13 wrote:
sixpack13 composed on 2019-07-27 14:24 (UTC):
...
... DFSee[1]...
And it still supports IBM OS/2, neat, that brings up some good and some bad memories. worked on/with it 25 years ago ! What would be - with respect to Win10 user brainfxxk now- if IBM weren't so blind to give away the market to M$ ? ..
I was one of 5 OS/2 2.0 beta 'Junior Blue Ninjas'. Extensively involved in that early testing. Special seating at the big rollout dinner at Interop in Las Vegas.
I recommended AGAINST OS/2 for the company in favor of Windows 3.0 beta (Yes, I was on that too).
The reason was simply networking. That is the availability of a TCP/IP stack. IBM was stuffing LU6.2 down my throat and I actually liked it for a FEW things, but I saw the future was all TCP/IP. At first I worked with the FTP Software stack (and they DID have an OS/2 stack but it worked strangely). The company forced me to use the Novell stack (it was 'free' to us). I only had to go to Mountain View twice to teach them what they had to do to really get TCP/IP working and to ease them away for IPX (yuck).
Ah, the early days. Well earlier than now!