how to adjust the size of the root partition on live arch linux system (/dev/mapper/arch_root-image)
Posted
by
leon
on Super User
See other posts from Super User
or by leon
Published on 2014-05-13T22:18:16Z
Indexed on
2014/08/24
16:22 UTC
Read the original article
Hit count: 241
arch-linux
|liveusb
Summary: I created a bootable usb drive with a live Bridge linux (ARCH based) on it. Everything works fine. The live system mounts a device called /dev/mapper/arch_root-image as its ext4 root partition (/ mount point). The problem is that I dont know how to control the size of this partition. This is not a Bridge specific issue (also happens with Archbang)
Detail: My usb drive has a dos partition table with 2 ext2 partitions
$ fdisk -l /dev/sdb
Disk /dev/sdb: 29,8 GiB, 32006733824 bytes, 62513152 sectors
Unités : secteur de 1 × 512 = 512 octets
Taille de secteur (logique / physique) : 512 octets / 512 octets
taille d'E/S (minimale / optimale) : 512 octets / 512 octets
Type d'étiquette de disque : dos
Identifiant de disque : 0x0007b7e2
Périphérique Amorçage Début Fin Blocs Id Système
/dev/sdb1 * 2048 2002943 1000448 83 Linux
/dev/sdb2 2002944 32258047 15127552 83 Linux
sdb1 is approx 1GB and sdb2 is 14GB. The live system is on sdb1. sdb2 is empty.
Now when I boot the live system, its filesystem looks like this:
$ mount
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
dev on /dev type devtmpfs (rw,nosuid,relatime,size=505272k,nr_inodes=126318,mode=755)
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
/dev/sda1 on /run/archiso/bootmnt type ext2 (ro,relatime)
cowspace on /run/archiso/cowspace type tmpfs (rw,relatime,size=772468k,mode=755)
/dev/loop0 on /run/archiso/sfs/root-image type squashfs (ro,relatime)
/dev/mapper/arch_root-image on / type ext4 (rw,relatime)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
mqueue on /dev/mqueue type mqueue (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=36,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
tmpfs on /tmp type tmpfs (rw)
tmpfs on /etc/pacman.d/gnupg type tmpfs (rw,relatime,mode=755)
As we can see, the root partition is from the device /dev/mapper/arch_root-image and my problem is that the live system recognizes it as a 3.9GB drive
$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/arch_root-image 3.9G 1.9G 2.1G 48% /
dev 494M 0 494M 0% /dev
run 503M 23M 481M 5% /run
/dev/sda1 962M 590M 324M 65% /run/archiso/bootmnt
cowspace 755M 32M 723M 5% /run/archiso/cowspace
/dev/loop0 520M 520M 0 100% /run/archiso/sfs/root-image
tmpfs 503M 132K 503M 1% /dev/shm
tmpfs 503M 0 503M 0% /sys/fs/cgroup
tmpfs 503M 360K 503M 1% /tmp
tmpfs 503M 896K 503M 1% /etc/pacman.d/gnupg
My question is how is this size controled? I suspect this is related to the content of the aitab file which is part of the Bridge iso image:
$ cat aitab
# <img> <mnt> <arch> <sfs_comp> <fs_type> <fs_size>
root-image / i686 xz ext4 50%
I have read https://wiki.archlinux.org/index.php/archiso#aitab but found no clue
© Super User or respective owner