From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D4E1F1382C5 for ; Sun, 10 Jan 2021 22:46:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CA01EE0AC6; Sun, 10 Jan 2021 22:46:07 +0000 (UTC) Received: from smtp.hosts.co.uk (smtp.hosts.co.uk [85.233.160.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7E3A6E0ABB for ; Sun, 10 Jan 2021 22:46:07 +0000 (UTC) Received: from host86-158-105-41.range86-158.btcentralplus.com ([86.158.105.41] helo=[192.168.1.65]) by smtp.hosts.co.uk with esmtpa (Exim) (envelope-from ) id 1kyjTF-0009Rf-CQ for gentoo-user@lists.gentoo.org; Sun, 10 Jan 2021 22:46:02 +0000 Subject: Re: [gentoo-user] resizing and moving home directory to new partition on save drive To: gentoo-user@lists.gentoo.org References: From: antlists Message-ID: <0de4c60d-1889-3bae-eab7-64cd8279952e@youngman.org.uk> Date: Sun, 10 Jan 2021 22:46:00 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Archives-Salt: 86e9dbb9-5dd1-41dd-98ea-091b11b39cc1 X-Archives-Hash: e4b3d117c6e8fb09b4aed2d91161d1df On 10/01/2021 21:42, thelma@sys-concept.com wrote: > I want to move /home directory to a new partition (save drive). > > I have 1-SSD drive: > Filesystem Size Used Avail Use% > /dev/sda4 916G 405G 464G 47% / > > > Home directory is on it taking about 360GB > > I was planning doing it in stages. > > Stage-1 > Using Gparted to resize "/" portion shirk it to about 450GB > create new ext4 partition for /home /dev/sda5 > > Boot-strap the PC with live-gentoo > mv /home /home.org > mkdir /home > mount ext4 /dev/sda5 /home/ > > cp -rp /home.org/* /home/ > > edit fstab: > /dev/sda5 /home ext4 default 0 0 > reboot and test home > > Am I missing something? Couple of things. Firstly, why use a gentoo live disk? Just log in as root. Secondly, why rename home? Just mount sda5 on /mnt to do the move, then add it to fstab to mount on /home. And a little bit you might have missed - DON'T put root's home on a mounted disk - if it's currently in /home, move it to /. Don't forget to edit /etc/passwd if you have to move it. > If everything works, remove /home.org > > Stage-2: > With Gparted resize both root and home portion, giving root about 200GB and rest to /home (dev/sda5) > The other way to do it is if you've got a spare hard drive lying around. Just copy /home onto it (bearing in mind my comment about root's home), and then copy it back. But what do you mean by "save drive"? Just splitting the drive into 2 partitions won't do anything, will it? If you want to "save the drive" I think you need to move /home to spinning rust :-) Unless you're physically updating the hardware, I wouldn't bother. > Cheers, Wol