Re: is it possible to add a secondary disk to an existing debian systems and install programs to the secondary disk
On Tue, Feb 23, 2021 at 12:37:52AM +0300, Semih Ozlem wrote:
> I am currently pre-planning. If it could be done, then I am going to go
> about searching and purchasing necessary devices in order to do the task.
> That's why I am asking in the first place. I have a usb device that I can
> attach for testing now.
>
> Currently I am just running from a live usb. Here is the output of df -h
>
> Filesystem Size Used Avail Use% Mounted on
> udev 1.9G 0 1.9G 0% /dev
> tmpfs 384M 6.4M 378M 2% /run
> /dev/sdb1 2.9G 2.9G 0 100% /run/live/medium
> /dev/loop0 2.6G 2.6G 0 100% /run/live/rootfs/filesystem.squashfs
> tmpfs 1.9G 1.8G 86M 96% /run/live/overlay
> overlay 1.9G 1.8G 86M 96% /
> tmpfs 1.9G 102M 1.8G 6% /dev/shm
> tmpfs 5.0M 4.0K 5.0M 1% /run/lock
> tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup
> tmpfs 1.9G 436K 1.9G 1% /tmp
> tmpfs 384M 5.8M 378M 2% /run/user/1000
>
>
> Greg Wooledge <greg@wooledge.org>, 23 Şub 2021 Sal, 00:14 tarihinde şunu
> yazdı:
>
> > Semih Ozlem (semihozlemlinuxuser@gmail.com) wrote:
> > > It is a starting point but the problem is really not with whether there
> > is
> > > enough space to download installation files, for they can be downloaded
> > > remotely to some other disk. The problem is when installing from the
> > > downloaded files, the system itself may give an error saying no disk
> > space
> > > left. The problem is when installing the file I presume some files are
> > > written in linux directory usually I presume or guess in /bin/ or /sbin
> > so
> > > that the installed programs become usable. When an external disk is
> > added,
> > > it is writable and readable but its space does not become incorporated or
> > > available to /bin /sbin or whatever directories in linux filesystem get
> > > used... Is it possible to make some changes to filesystem hierarchy so
> > that
> > > the additional disk becomes available to the system?
> >
> > You decide where to mount the new partition(s) or logical volume(s).
> >
> > Start from the beginning, please. Show us the output of "df -h" or
> > something. Also tell us how the computer is being used (personal
> > desktop/laptop, server of some kind, etc.). Tell us where the big
> > files are, or the big collections of files.
> >
> > Tell us how big each disk is.
> >
> > From there, people may be able to give you concrete advice, like "make
> > a 10 GB partition and mount it as /var", or "mount the entire second
> > disk as /home".
> >
> >
This is, effectively, what LVM was invented for: with a bit of care, you can
add another disk and "just add it" as extra storage.
[The debian-handbook package may be quite useful: a long book which covers a
lot of the basics and some advanced topics. It was very professionally written
by a Debian developer of long experience and covers a lot of your questions.
The package installs a PDF - you can also purchase print copies online.]
Having said that, if you partition disks using your own partitioning scheme
and run out of space in /var/ , say, you may have locked up the machine enough
that it's hard to undo enough to attach another disk.
This is one of the reasons why it's quite useful to keep a spare desktop style
machine around to practice installs, learn how to deal with breakage, have a
machine to practice upgrades to the next stable version and so on :)
All the best,
Andy C.
Reply to: