[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: is it possible to add a secondary disk to an existing debian systems and install programs to the secondary disk



On Tue, 23 Feb 2021 11:37:12 -0500
rhkramer@gmail.com wrote:

> On Tuesday, February 23, 2021 11:13:12 AM Nicholas Geovanis wrote:
> > You can always add more filesystem space later. It's easier if
> > you're using LVM but that isn't required. You just build another
> > filesystem on the new drive after it's installed and mount it into
> > your filesystems, at the appropriate mount point.  
> 
> Don't you have to do things like copy the old filesystem content to
> the new filesystem (possibly using a temporary mount point for one of
> those), then move the new filesystem to the old mount point?  (Maybe
> that is only if they are "system" filesystems (e.g., /var, /etc,
> /home ...?)
> 

Yes, and you also need to delete the content in the original directory
tree, or else you don't recover the space. Most of this is most easily
done from a live/rescue OS with the host OS offline, though it can be
done online with a bit more work.

If you're moving /usr it is wise to rebuild grub from chroot, making a
new initramfs. Systemd requires /usr during boot and gets quite upset
if it can't find it. I'm aware there is controversy about putting
essential system software in a tree named '/usr' and I'm not going to
add to it.

There are many web articles on how to add and mount a new drive, but
hardly any (mostly one for Ubuntu repeated widely) for actually moving
an existing directory tree, especially a system one like /usr. I
hesitate to offer details as it is a long time, pre-systemd, since I
last did it.


-- 
Joe


Reply to: