I have a partition table that looks like this:
[root@tower ~]# fdisk /dev/sda WARNING: DOS-compatible mode is deprecated. It's strongly recommended to switch off the mode (command 'c') and change display units to sectors (command 'u'). Command (m for help): p Disk /dev/sda: 320.1 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x44fdfe06 Device Boot Start End Blocks Id System /dev/sda1 1 13 104391 83 Linux /dev/sda2 14 275 2104515 82 Linux swap / Solaris /dev/sda3 276 36828 293611972+ 83 Linux /dev/sda4 * 36829 38914 16748544 7 HPFS/NTFS
/dev/sda3 is mounted to
/. I would like to shrink the ext3 volume
/dev/sda3so I can expand the NTFS volume
/dev/sda4 and add about 15GB or so. How would I go about this? I would like to shrink the ext3 partition online if possible, so I don't have to bring down the server. I imagine my steps would be something like this:
- Delete the sda3 partion with fdisk.
- Create a new partition 3 with start cylinder of 276 and end cylinder of 35000 or so.
- Delete sda4 partition.
- Create new partition 4 with start cylinder of 35001 and end cylinder of 38914.
- Write changes.
- resize2fs /dev/sda3
- ntfsresize -size 35GB /dev/sda4 (35GB would equal whatever my partition is sized to in fdisk)
Can anybody double check my steps? I'm too scared to try. :)