I have a problem and I appreciate if anyone can help me.
1:
fdisk -l:
Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000d89a5
Device Boot Start End Blocks Id System
/dev/sda1 88086528 625141759 268527616 5 Extended
/dev/sda2 * 2048 80273407 40135680 83 Linux
/dev/sda4 80273408 88086527 3906560 82 Linux swap / Solaris
Partition table entries are not in disk order
2:
df -h:
Filesystem Size Used Avail Use% Mounted on
rootfs 38G 35G 1.1G 98% /
udev 10M 0 10M 0% /dev
tmpfs 397M 968K 396M 1% /run
/dev/disk/by-uuid/bcc39c18-9057-488c-a281-68377e15ce7f 38G 35G 1.1G 98% /
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 1.6G 1.4M 1.6G 1% /run/shm
3:
mount:
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=505836,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=405884k,mode=755)
/dev/disk/by-uuid/bcc39c18-9057-488c-a281-68377e15ce7f on / type ext4 (rw,relatime,errors=remount-ro,user_xattr,barrier=1,data=ordered)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=1593060k)
rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
I've read the post "How can I expand ext4 partition size on debian" in which Stéphane Chazelas came up with a good solution, by using fdisk -u /dev/sda. But as you see exactly after Linux partition (/dev/sda2) the swap partition is placed, so means I can't extend sda2 by adding more space at the END cause it will overlap with swap.
Now is it possible to extend sda2 by overlapping with swap and add more space, then START the swap exactly after the END of sda2!? In other word, the swap will be move forward and then the sda2 can grow as much as needed, so we can start the swap exactly after it!! If it's completely wrong, would anyone please help me?
Thanks