merging two ext4 partitions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have a disk that looks like this:

[root@alpha ~]# /sbin/fdisk -l /dev/sda
Disk /dev/sda: 930.39 GiB, 998999326720 bytes, 1951170560 sectors
Disk model: VIRTUAL DISK    
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: dos
Disk identifier: 0x0385371c

Device     Boot     Start        End    Sectors   Size Id Type
/dev/sda1            2048  102402047  102400000  48.8G 83 Linux
/dev/sda2       102402048 1951170559 1848768512 881.6G 83 Linux


I want to expand sda2 to the beginning of the disk, without losing the 
data on sda1 (and obviously on sda2 as well). Can that be done safely?

For instance, I'm thinking I can delete both partitions in fdisk and 
create a single one for the entire disk. Then, don't format the new 
partition. Would that pick up the existing filesystem?

Or, maybe gparted? I can delete sda1, then expand sda2 to the beginning 
of the disk. Would that work?

Luckily, sda1 is fairly small so I can back it up somewhere, then gparted 
should work, but does anyone have first hand experience with this?


_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux