Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I installed Debian 7 onto a one terabyte drive, I let Debian automatically setup partitions, also selected LVM, Then installed OwnCLoud. All was working fine until I receved the message Low Disk Space on Root, it is only 35mb free, I could no longer access the cloud storage, Also Apache2 had to be restarted? which it started automaticaly. I can access the cloud after restarting Apache, But Cloud cannot access database? It must be that program cannot run due to space limitation. How can I increase this volume? I tired using Gpart live, but could not increase any volumes> Here is my fdisk -l listing!

Disk /dev/sda: 1500.3 GB, 1500301910016 bytes
255 heads, 63 sectors/track, 182401 cylinders, total 2930277168 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
Disk identifier: 0x8de4adf7

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1              63  2930272064  1465136001    7  HPFS/NTFS/exFAT

Disk /dev/sdb: 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 / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00048b84

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *        2048      499711      248832   83  Linux
/dev/sdb2          501758  1953523711   976510977    5  Extended
/dev/sdb5          501760  1953523711   976510976   8e  Linux LVM

Disk /dev/mapper/debian-root: 348 MB, 348127232 bytes
255 heads, 63 sectors/track, 42 cylinders, total 679936 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
Disk identifier: 0x00000000

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

Disk /dev/mapper/debian-swap_1: 4273 MB, 4273995776 bytes
255 heads, 63 sectors/track, 519 cylinders, total 8347648 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
Disk identifier: 0x00000000

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

Disk /dev/mapper/debian-usr: 8996 MB, 8996782080 bytes
255 heads, 63 sectors/track, 1093 cylinders, total 17571840 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
Disk identifier: 0x00000000

Disk /dev/mapper/debian-usr doesn't contain a valid partition table

Disk /dev/mapper/debian-var: 2998 MB, 2998927360 bytes
255 heads, 63 sectors/track, 364 cylinders, total 5857280 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
Disk identifier: 0x00000000

Disk /dev/mapper/debian-var doesn't contain a valid partition table

Disk /dev/mapper/debian-tmp: 398 MB, 398458880 bytes
255 heads, 63 sectors/track, 48 cylinders, total 778240 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
Disk identifier: 0x00000000

Disk /dev/mapper/debian-tmp doesn't contain a valid partition table

Disk /dev/mapper/debian-home: 982.9 GB, 982926753792 bytes
255 heads, 63 sectors/track, 119500 cylinders, total 1919778816 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
Disk identifier: 0x00000000

Disk /dev/mapper/debian-home doesn't contain a valid partition table
root@debian:/home/dmsigala#

Edit

The output of pvscan and df:

root@debian:/home/dmsigala# pvscan
 PV /dev/sdb5 VG debian lvm2 [931.27 GiB / 0 free]
 Total: 1 [931.27 GiB] / in use: 1 [931.27 GiB] / in no VG: 0 [0 ]

ot@debian:/home/dmsigala# df -h
 Filesystem               Size  Used  Avail  Use%  Mounted on
 rootfs                   322M  294M  11M    97%   /
 /dev/mapper/debian-root  322M  294M  11M    97%   /
 /dev/sdb1                228M  17M   199M   8%    /boot
share|improve this question
1  
Can you give us your df output so we know what volumes are mounted where? –  Joel Davis Jun 12 '13 at 15:04
    
I would also like to see output of pvscan –  Raza Jun 12 '13 at 15:10
    
@JoelDavis Do you really think that is unclear? ;-) –  Hauke Laging Jun 12 '13 at 15:18
    
Yeah I do. I'm seeing one LV has the word "root" in it but it's unclear if this is the root filesystem of the OS or just the root of some other directory tree (like the DocumentRoot in apache httpd). –  Joel Davis Jun 12 '13 at 15:38
    
I am thinking that this question has been asked and answered several times. Have you looked into the archives of this and SuperUser and ServerFault SEs prior to asking your question? –  mdpc Jun 12 '13 at 16:25

1 Answer 1

You should reduce the size of one of the other volumes. Probably there is much free space on debian/home; you could reduce it from 982.9 GB to e.g. 950 GiB in order to have some free space for flexibility. After you have reduced the filesystem (with resize2fs in case of ext3/ext4) you reduce the LV:

lvresize --size 950G debian/home

Then you can increase the root LV:

lvresize --size 1G debian/root

The last step is to resize the root volume file system (which may be possible after booting another system only).

share|improve this answer
    
I'll also mention that the -r option to lvresize is invaluable here, as shrinking volumes without first shrinking the filesystem can cause unrecoverable data loss. I'm extra paranoid so I also specify my resizes with the relative operations (plus and minus signs). –  Joel Davis Jun 12 '13 at 16:32
1  
@JoelDavis If you save the output of dmsetup table debian-home in a safe place then you can easily get the missing capacity back. lvresize does not overwrite the data on disk. Neither will a failing mount (due to a too small device) destroy the file system. –  Hauke Laging Jun 12 '13 at 16:50
    
Good to know, but I'm paranoid. So I'm still going to do the resize through the lvresize command, color me Oliver Stone I guess. –  Joel Davis Jun 12 '13 at 17:28
    
Joel,can you list the commands to resize the root? –  Dennis Sigala Jun 12 '13 at 17:54
    
At this point I am not concerned with data loss, also where should Owncloud have been installed. can you outline commands to increase Root to completion?I may re-install if this does not work. just a lot of work. –  Dennis Sigala Jun 12 '13 at 17:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.