LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Increase the size of /home - restricted because of dd clone from usb stick (https://www.linuxquestions.org/questions/linux-newbie-8/increase-the-size-of-home-restricted-because-of-dd-clone-from-usb-stick-4175512205/)

Ajaxual 07-24-2014 09:32 PM

Increase the size of /home - restricted because of dd clone from usb stick
 
i installed minx linux on an 8gb usb stick. i dd cloned that usb stick onto a 50gb partition (/dev/sda4).

now my /home says its running out of space - i think becasue it still thinks its on a 8gb usb stick.

fdisk -l output (windows is also installed)

---------------
Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 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: 0xfe2d6e0a

Device Boot Start End Blocks Id System
/dev/sda1 2048 25167871 12582912 27 Hidden NTFS WinRE
/dev/sda2 * 25167872 25372671 102400 27 Hidden NTFS WinRE
/dev/sda3 25372672 339945471 157286400 7 HPFS/NTFS/exFAT
/dev/sda4 499310592 625141759 62915584 5 Extended
/dev/sda5 604170240 625141759 10485760 82 Linux swap / Solaris
/dev/sda6 499312640 604170239 52428800 83 Linux

-----------------------

thanks

rknichols 07-24-2014 09:52 PM

If you never resized the filesystem, then yes, it's an 8GB filesystem sitting in a 50GB container. Assuming it's an ext2/3/4 filesystem, you just need to run (as root) "resize2fs /dev/sda6" and the filesystem will be enlarged to fill its partition. You can do that online, with the system running and the fileystem mounted.

EDIT: Arrrgh! I mistyped "sda4" where I should have had "sda6". Fortunately, trying to resize sda4 would have failed, harmlessly.

syg00 07-24-2014 09:54 PM

What does this produce - use [code] tags around your answer
Code:

df -hT

syg00 07-24-2014 09:55 PM

DON'T do anything to /dev/sda4

Ajaxual 07-24-2014 11:20 PM

thanks. here's the output

Code:

Filesystem          Type      Size  Used Avail Use% Mounted on
/dev/sda6          xfs      7.0G  6.6G  368M  95% /
none                tmpfs    4.0K    0  4.0K  0% /sys/fs/cgroup
udev                devtmpfs  1.4G  12K  1.4G  1% /dev
tmpfs              tmpfs    276M  1.4M  275M  1% /run
none                tmpfs    5.0M    0  5.0M  0% /run/lock
none                tmpfs    1.4G  15M  1.4G  2% /run/shm
none                tmpfs    100M  32K  100M  1% /run/user
/home/user/.Private ecryptfs  7.0G  6.6G  368M  95% /home/user
/dev/sda3          fuseblk  150G  44G  107G  29% /media/user/OS_Install


syg00 07-24-2014 11:42 PM

As suggested above, you can see the filesystem is around 8Gig in a 50 Gig partition. For xfs you'll need to use xfs_growfs while it is mounted - plenty of guides online.
Whether you need to do anything for that ecryptfs container for /home I don't know.

Ajaxual 07-25-2014 12:52 AM

heres the instructions that i found:

http://linux.die.net/man/8/xfs_growfs

I did the following:

Code:

xfs_growfs /dev/sda6 -d
thank you both very much for your help.

Ajaxual 07-25-2014 01:20 AM

http://fixunix.com/sgi/112091-using-...ngle-disc.html mentioned that i should have used xfs_copy or xfsdump/xfsrestore to move the filesystem, rather than dd to clone the file system. This would have avoid this problem.

syg00 07-25-2014 01:25 AM

"dd" is almost always the wrong answer. I only use it in recovery/forensic scenarios.

jefro 07-25-2014 03:39 PM

Can we assume this worked? "xfs_growfs /dev/sda6 -d"


All times are GMT -5. The time now is 08:39 AM.