Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Aviortheking/4a1d2e316ddbeef609d60fb21fd3c254 to your computer and use it in GitHub Desktop.
Save Aviortheking/4a1d2e316ddbeef609d60fb21fd3c254 to your computer and use it in GitHub Desktop.
Upgrade logs
[RESCUE] root@vps-8897b6e0:~ $ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 2.5G 0 disk
└─sda1 8:1 0 2.5G 0 part /
sdb 8:16 0 160G 0 disk
└─sdb1 8:17 0 160G 0 part
[RESCUE] root@vps-8897b6e0:~ $ e2fsck -yf /dev/sdb1
e2fsck 1.44.5 (15-Dec-2018)
/dev/sdb1: recovering journal
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Free blocks count wrong (7995093, counted=9644334).
Fix? yes
Free inodes count wrong (10116125, counted=10137422).
Fix? yes
/dev/sdb1: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sdb1: 348338/10485760 files (1.7% non-contiguous), 32298445/41942779 blocks
[RESCUE] root@vps-8897b6e0:~ $ fdisk -u /dev/sdb
Welcome to fdisk (util-linux 2.33.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): p
Disk /dev/sdb: 160 GiB, 171798691840 bytes, 335544320 sectors
Disk model: QEMU HARDDISK
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: 0x00000000
Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 335544286 335542239 160G 83 Linux
Command (m for help): d
Selected partition 1
Partition 1 has been deleted.
Command (m for help): n
Partition type
p primary (0 primary, 0 extended, 4 free)
e extended (container for logical partitions)
Select (default p):
Using default response p.
Partition number (1-4, default 1):
First sector (2048-335544319, default 2048):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-335544319, default 335544319):
Created a new partition 1 of type 'Linux' and of size 160 GiB.
Partition #1 contains a ext4 signature.
Do you want to remove the signature? [Y]es/[N]o: N
Command (m for help): a
Selected partition 1
The bootable flag on partition 1 is enabled now.
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
[RESCUE] root@vps-8897b6e0:~ $ resize2fs /dev/sdb1
resize2fs 1.44.5 (15-Dec-2018)
Resizing the filesystem on /dev/sdb1 to 41942784 (4k) blocks.
The filesystem on /dev/sdb1 is now 41942784 (4k) blocks long.
[RESCUE] root@vps-8897b6e0:~ $ mount /dev/sdb1 /mnt
[RESCUE] root@vps-8897b6e0:~ $ dh -h
-bash: dh: command not found
[RESCUE] root@vps-8897b6e0:~ $ df -h
Filesystem Size Used Avail Use% Mounted on
udev 7.7G 0 7.7G 0% /dev
tmpfs 1.6G 8.5M 1.6G 1% /run
/dev/sda1 2.4G 1.6G 630M 73% /
tmpfs 7.7G 0 7.7G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 7.7G 0 7.7G 0% /sys/fs/cgroup
/dev/sdb1 158G 121G 31G 80% /mnt
[RESCUE] root@vps-8897b6e0:~ $ exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment