Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


resizing active partition on Debian 8 Jessie
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

resizing active partition on Debian 8 Jessie

Hello Guys.

I am hosting a Game Server on a VPS from Chapal.net . it is a cloud server and i am using the package which says 7000 PKR = Pakistani Rupees.

Here are the specs of the Cloud Server.

4GB Memory
2 Core Processor1
80GB Disk
2TB Transfer

I upgraded from 2 GB to 4 GB Package.

Earlier my HDD size was 40 GB according to plan . after upgrade it remains the same. But the hosting company confirmed that it has been upgrade but i do not see it as of yet. it seems i have to resize the current active partition of /root

root@debian:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 10M 0 10M 0% /dev
tmpfs 791M 17M 774M 3% /run
/dev/sda1 38G 14G 23G 37% /
tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
tmpfs 396M 0 396M 0% /run/user/1001
tmpfs 396M 0 396M 0% /run/user/0

so what command to make it 80 GB to resize the current partition which is active?

Please help.

Comments

  • resize2fs /dev/sda1

  • MasonRMasonR Community Contributor
    edited August 2017

    Likely, you'll just need to run a resize2fs command.

    edit: @Ishaq's quick on the draw today ;)

  • Chances are you'll probably need to extend your partition table also to use the new sector count, before extending the filesystem as mentioned above.

    That normally involves deleting the / partition, and re-creating it using the original sector start point.

    Thanked by 1emiratesgaming
  • root@debian:~# resize2fs /dev/sda1
    resize2fs 1.43.4 (31-Jan-2017)
    The filesystem is already 10047744 (4k) blocks long. Nothing to do!

    any idea?

    @Ishaq said:
    resize2fs /dev/sda1

  • exception0x876exception0x876 Member, Host Rep, LIR

    @emiratesgaming said:
    root@debian:~# resize2fs /dev/sda1
    resize2fs 1.43.4 (31-Jan-2017)
    The filesystem is already 10047744 (4k) blocks long. Nothing to do!

    any idea?

    @Ishaq said:
    resize2fs /dev/sda1

    You need to resize the partition too (use parted, fdisk etc.)

    Thanked by 1emiratesgaming
  • can you guide me over team viewer?

  • @emiratesgaming said:
    can you guide me over team viewer?

    .1. You didn't show us how fdisk -l looks like.

    .2. Why not following some guide?

  • Basic idea behind this is:

    1. Write down all parameters shown in fdisk -l, or screen shot it.

    2. Disable and delete swap if there is one.

    3. Delete your root partition.

    4. Re-create your root partition using the same start position.

    5. Activate that partition.

    6. Run partprobe to update partition table, and do resize2fs as you did.

    Thanked by 1emiratesgaming
  • edited August 2017

    here you go

    root@debian:~# fdisk -l

    Disk /dev/sda: 80 GiB, 85899345920 bytes, 167772160 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
    Disklabel type: dos
    Disk identifier: 0xac935b07

    Device Boot Start End Sectors Size Id Type
    /dev/sda1 * 2048 80383999 80381952 38.3G 83 Linux
    /dev/sda2 80386046 83884031 3497986 1.7G 5 Extended
    /dev/sda5 80386048 83884031 3497984 1.7G 82 Linux swap / Solaris

  • WSSWSS Member

    You are kind of fucked with the secondary partition. Swapoff /dev/sda5, delete sda5, delete sda2, then resize sda1, then recreate sda2.

  • could you guide me?

  • WSSWSS Member

    I just did.

  • with command sorry if i am repeating

  • WSSWSS Member
    edited August 2017

    As I said.

    swapoff /dev/sda5
    go into fdisk and delete /dev/sda5 and /dev/sda2
    resize /dev/sda1
    resize2fs /dev/sda1 
    recreate /dev/sda2 (as a primary, fuck logical for two partitions).
    Change /dev/sda2 to swap.
    mkswap /dev/sda2
    edit /etc/fstab
    reboot
    

    If you need more help than that- pay someone to help you so you don't fuck it up.

Sign In or Register to comment.