Thread: Simple help resizing a partition
hello all,
has 5 minutes spare? since forum changes formatting attaching same thing text make reading easier.
trying shrink , expand 2 ext4 partitions on software raid. gparted not picking md0 while on bootable media, (but somehow see partitions fine when boot out of hard drive). did install mdadm , assembled array while on bootable usb.
i think main issue how tell resize2fs , fdisk want.
before changes had this:
device boot start end blocks id system
/dev/md0p1 2048 46139391 23068672 83 linux
/dev/md0p2 46139392 62937087 8398848 83 linux
md0p1 ~21g (using 7-8g), , md0p2 ~8g (using 0.5g).
since gparted not helping goal was:
1. resize2fs md0p1 19g
2. shrink partition of md0p1 fdisk (delete first partition , add different ending)
3. expand partition of md0p2 fdisk
4. expand filesystem of md0p2 resize2fs.
tried this:
root@ubuntu:~# resize2fs /dev/md0p1 20000m
resize2fs 1.41.14 (22-dec-2010)
resizing filesystem on /dev/md0p1 5120000 (4k) blocks.
filesystem on /dev/md0p1 5120000 blocks long.
assuming the 5120000 blocks of resize2fs 4k blocks equal 20480000 fdisk blocks.
changed fdisk because displays things in sectors instead of blocks, in past did not have run fdisk -u /dev/md0
right have:
device boot start end blocks id system
/dev/md0p1 1 2553 20506941 83 linux
/dev/md0p2 2554 3917 10948297 83 linux
,
command (m help): v
information: 12530 unallocated sectors
in expert fdisk mode see:
nr af hd sec cyl hd sec cyl start size id
1 00 32 32 0 254 62 2552 2048 41011897 83
2 00 0 0 2553 254 62 3916 41013945 21912660 83
should move start of partition 1? mess data? raid info stored?
* after restart tmp not mount had recreate filesystem , mount 1777 permissions.
don't know why , not one's self make tmp partition huge.
Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [ubuntu] Simple help resizing a partition
Ubuntu
Comments
Post a Comment