1

I need to format a second hard drive for use by Ubuntu 15.04. I have two disks of approx. 310 GB each. One drive is in use by Ubuntu. That one keeps running out of room (though I use sudo apt-get autoclean; clean; autoremove and I am unsure if I am applying those commands correctly). However, I need to have the formatting commands that will make the second drive available for Ubuntu. Would the second drive be able to be seamlessly available to the OS for all storage operations? Would I have to move applications to the new drive? If so, how?

3 Answers 3

1

You can format it in every readable aand writeable format like ext2/3/4 for just Linux as the're native for it and if used by Windows too - to FAT32 or NTFS. Tgen you may just move files/folders. The file manager is able to mount the partition just with one click.

The formatting may easily be done with GParted. To install it, use the following command:

sudo apt-get install gparted
4
  • gparted gives an error trying to reformat Free BSD partition made by firewall install.
    – Stephenish
    Jul 25, 2015 at 1:10
  • what error? have you unmounted the partition?
    – aastefanov
    Jul 25, 2015 at 8:35
  • Actually, I had to reinstall. Then I applied gparted again and got the partition to be formatted in ext4. Will the partition be usable by Ubuntu for installation and such?
    – Stephenish
    Jul 25, 2015 at 21:20
  • I am a little concerned that ubuntu-vg has used 297.84 GB for lvm
    – Stephenish
    Jul 25, 2015 at 21:22
0

In order to have the drive available to Ubuntu, you would have to format the drive in a Linux friendly format (ext,xfs), as well as update your /etc/fstab in order for Ubuntu to actually mount and use the drive for storage.

However, if youre planning on using both drives to hold system files (/usr, /etc, /opt...), thats a bit more complex. https://askubuntu.com/questions/7002/how-to-set-up-multiple-hard-drives-as-one-volume

1
  • I was trying to set up the second drive as Linux LVM but when I write the changes in fdisk, I get the error: The partition table has been altered. Calling ioctl() to re-read partition table. Re-reading the partition table failed.: invalid argument. The format won't change from Free BSD. The computer in question used to be a firewall.
    – Stephenish
    Jul 24, 2015 at 21:59
0

Here is a one liner to identify the 200 largest dirs / files

cd /
sudo du -k  | sort -n | tail -200

This will let you identify potential monster files U no longer need.

ubuntu itself and any normal install will fit nicely under 10 gigs so if you are filling up 300+ gig it is probably movies/photos or other media which is probably not needed on a daily basis.

There is a format utility ubuntu search on : disks
Just format your spare drive using format : Ext4 then move dirs / files onto that 2nd drive. If you are on a laptop this is probably the easiest approach. If on a desktop where U would rather have the 2nd drive readily available then more homework will be needed, if so update your question so we can proceed.

1
  • that wasn't it. the biggest files were for email at 600K.
    – Stephenish
    Jul 24, 2015 at 21:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .