LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-09-2014, 02:16 PM   #1
iwtbf
Member
 
Registered: Apr 2009
Location: cybernetic space
Distribution: debian
Posts: 40

Rep: Reputation: 1
Resizing / on encrypted system [debian jessie, ext4, lvm(?)]


Ok, so I have no space left but plenty in /home. I would like to enlarge root somewhat.

I have googled on this problem and found some solutions but I'm a bit scared to try them out because when I installed jessie I choose to encrypt my system, I'm worrying if this might mess things up. Also I don't know if I have LVM or not.

What is the best way to do this in my particular situation?

Some information:

df-h
Code:
Filesystem                   Size  Used Avail Use% Mounted on
/dev/mapper/computer--vg-root  9.1G  8.6G   52K 100% /
udev                          10M     0   10M   0% /dev
tmpfs                        713M  768K  712M   1% /run
tmpfs                        5.0M     0  5.0M   0% /run/lock
tmpfs                        1.4G  688K  1.4G   1% /run/shm
/dev/sda2                    229M   29M  188M  14% /boot
/dev/sda1                    487M  136K  486M   1% /boot/efi
/dev/mapper/computer--vg-home  893G  223G  626G  27% /home
tmpfs                        4.3G   52K  4.3G   1% /tmp
none                         4.0K     0  4.0K   0% /sys/fs/cgroup
df -T
Code:
Filesystem                  Type     1K-blocks      Used Available Use% Mounted on
/dev/mapper/computer--vg-root ext4       9480420   8975748        48 100% /
udev                        devtmpfs     10240         0     10240   0% /dev
tmpfs                       tmpfs       729412       772    728640   1% /run
tmpfs                       tmpfs         5120         0      5120   0% /run/lock
tmpfs                       tmpfs      1458820       424   1458396   1% /run/shm
/dev/sda2                   ext2        234153     29524    192137  14% /boot
/dev/sda1                   vfat        497696       136    497560   1% /boot/efi
/dev/mapper/computer--vg-home ext4     936109056 233065532 655468896  27% /home
tmpfs                       tmpfs      4474280        52   4474228   1% /tmp
none                        tmpfs            4         0         4   0% /sys/fs/cgroup

fdisk -l
Code:
WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1  1953525167   976762583+  ee  GPT
Partition 1 does not start on physical sector boundary.

Disk /dev/mapper/sda3_crypt: 999.4 GB, 999434485760 bytes
255 heads, 63 sectors/track, 121507 cylinders, total 1952020480 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/sda3_crypt doesn't contain a valid partition table

Disk /dev/mapper/computer--vg-root: 9999 MB, 9999220736 bytes
255 heads, 63 sectors/track, 1215 cylinders, total 19529728 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/computer--vg-root doesn't contain a valid partition table

Disk /dev/mapper/computer--vg-swap_1: 15.4 GB, 15439233024 bytes
255 heads, 63 sectors/track, 1877 cylinders, total 30154752 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/computer--vg-swap_1 doesn't contain a valid partition table

Disk /dev/mapper/computer--vg-home: 974.0 GB, 973992886272 bytes
255 heads, 63 sectors/track, 118414 cylinders, total 1902329856 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/computer--vg-home doesn't contain a valid partition table
mount
Code:
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=909618,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=729412k,mode=755)
/dev/mapper/computer--vg-root on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
pstore on /sys/fs/pstore type pstore (rw,relatime)
tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=1458820k)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
/dev/sda2 on /boot type ext2 (rw,relatime)
/dev/sda1 on /boot/efi type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=utf8,shortname=mixed,errors=remount-ro)
/dev/mapper/computer--vg-home on /home type ext4 (rw,relatime,data=ordered)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,relatime,size=4474280k)
rpc_pipefs on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
none on /sys/fs/cgroup type tmpfs (rw,relatime,size=4k,mode=755)
systemd on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,name=systemd)
Any help would be highly appreciated!
 
Old 03-09-2014, 07:06 PM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
Hi,

you can do this. I did basically the same install, encryption with lvm and then later shrank home by 10G and then extended root by 10G. The basic procedure is as follows

- unmount /home
- shrink home filesystem (use resize2fs)
- shrink home logical volume (use lvresize)
- mount /home/
- expand root logical volume (use lvresize)
- expand root filesystem (use resize2fs)

Read the man pages of the above two commands, and also familiarize yourself with the lvdisplay and vgdisplay commands. You should also probably e2fsck your home partition before and after resizing the filesystem.

Post back if you have more questions.

HTH,

Evo2.
 
1 members found this post helpful.
Old 03-11-2014, 08:08 AM   #3
iwtbf
Member
 
Registered: Apr 2009
Location: cybernetic space
Distribution: debian
Posts: 40

Original Poster
Rep: Reputation: 1
Thank you so much! It worked like a charm!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] change from Debian 7 testing to Jessie mess up the system xiongnu Debian 6 01-10-2014 07:33 AM
Install Debian with encrypted home partition (without lvm) lazylogic Debian 1 02-19-2013 03:40 PM
file system error due to resizing lvm and not getting shell on reboot anil98433 Linux - Newbie 2 05-19-2012 08:48 AM
[SOLVED] LVM ontop of encrypted file system - 2 drives BashTin Slackware 11 10-19-2011 03:21 PM
LXer: Set Up A Fully Encrypted Raid1 LVM System LXer Syndicated Linux News 0 12-08-2008 07:30 AM


All times are GMT -5. The time now is 08:31 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration