[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Resizing partitions on a headless server



Hello,

on my headless Debian GNU/Linux Jessie server I want to resize
partitions. So far I did followings:

root@b2:~# df -T
Filesystem                Type     1K-blocks    Used Available Use%
Mounted on
/dev/root                 ext3       9621848 8293064    840008  91% /
devtmpfs                  devtmpfs    127800       0    127800   0% /dev
tmpfs                     tmpfs       127880       4    127876   1%
/dev/shm
tmpfs                     tmpfs       127880   17992    109888  15% /run
tmpfs                     tmpfs         5120       0      5120   0%
/run/lock
tmpfs                     tmpfs       127880       0    127880   0%
/sys/fs/cgroup
/dev/mapper/bubba-storage ext3     470050224 8512368 437660636   2%
/home
tmpfs                     tmpfs        25576       0     25576   0%
/run/user/1001
tmpfs                     tmpfs        25576       0     25576   0% /run/user/0

root@b2:~# umount /dev/mapper/bubba-storage

root@b2:~# resize2fs -p /dev/mapper/bubba-storage 20G
resize2fs 1.42.12 (29-Aug-2014)
Please run 'e2fsck -f /dev/mapper/bubba-storage' first.

root@b2:~# e2fsck -f /dev/mapper/bubba-storage
e2fsck 1.42.12 (29-Aug-2014)
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
Bubba_home: 114439/59703296 files (0.4% non-contiguous), \
4001648/119386112 blocks

At this step I think I forgot to run again:
root@b2:~# resize2fs -p /dev/mapper/bubba-storage 20G

root@b2:~# lvresize --size 2.1G /dev/mapper/bubba-storage
  Rounding size to boundary between physical extents: 2.10 GiB
    WARNING: Reducing active logical volume to 2.10 GiB
      THIS MAY DESTROY YOUR DATA (filesystem etc.)
      Do you really want to reduce storage? [y/n]: y
        Size of logical volume bubba/storage changed from 455.42 GiB
  (116588 extents) to 2.10 GiB (538 extents).
    Logical volume storage successfully resized

Furthermore, I was wrong when I determined the --size to 2.1G in the
command abowe, because I wanted to write 20.1G instead.

root@b2:~# resize2fs -p /dev/mapper/bubba-storage
resize2fs 1.42.12 (29-Aug-2014)
resize2fs: New size smaller than minimum (2153070)

root@b2:~# mount /dev/mapper/bubba-storage

After these steps I rebooted the server but can't login on it with ssh
but only with serial cable.

Now, when I login on the serial console as non root user, I get
messages:

b2 login: csanyipal
Password:
EXT3-fs error (device dm-0): ext3_get_inode_loc: unable to read inode
block - inode=30752769, block=61505538
Last login: Sat Jun 13 14:06:27 CEST 2015 from 192.168.10.90 on pts/0
Linux b2 3.2.62-1 #1 Mon Aug 25 04:22:40 UTC 2014 ppc

The programs included with the Debian GNU/Linux system are free
software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
No mail.
EXT3-fs error (device dm-0): ext3_get_inode_loc: unable to read inode
block - inode=30752769, block=61505538
EXT3-fs error (device dm-0): ext3_get_inode_loc: unable to read inode
block - inode=30752769, block=61505538
EXT3-fs error (device dm-0): ext3_get_inode_loc: unable to read inode
block - inode=30752769, block=61505538
No directory, logging in with HOEXT3-fs error (device dm-0):
ext3_get_inode_loc: unable to read inode block - inode=30752769,
block=61505538
ME=/

Now what can I do to correct the partitions?

-- 
Regards from Pal



Reply to: