a) The term "drive" is actually incorrect. In both Windows and Linux, the term "partition" is accurate. It really is too bad that MSFT decided to name something incorrectly which leads those users to unnecessary confusion. On Windows, your C: and D: "drives" really are partitions. There is a huge difference and for Linux, it matters greatly. Use the wrong device and you'll corrupt the data.
b) In Unix/Linux, we mount file systems. Those can take up an entire partition or use some volume manager like LVM if you need/want advanced management capabilities. The mount location is just an empty directory anywhere except the top directory, /. Besides that, you can mount anywhere, but there are common things that get mounted to specific locations. For example, it is very common to have a separate partition for /home/ which is where all the files for each userid are typically (but not required) placed. There are instructions for "moving HOME to a new partition" in the ubuntu wiki.
c) Another method to make access to additional storage is to use symbolic links from your HOME directory to another partition. For a long time, NTFS didn't have any similar idea to the Unix symbolic link that has been around 50+ yrs. Basically, you'd mount the 2nd partition to /media/{username}/docs then create a symlink from your HOME to that location. ln -s /media/{username}/docs ~/Documents is the command. Just be certain that any existing ~/Documents directory has been removed first. It is impossible to create a file system object (file, directory, symlink, etc) if other file system object already exists with the same name, in the same location.
Lots of people use this method, outlined in "c)" too.
The main issue with any of these techniques is ensuring that your backups capture all the locations with files you don't want to lose. Most backup tools copy the symbolic link as a link file, but don't follow it and backup where it points.
So ... here's an example file system setup:
Code:
$ lsblk -e 7 -o name,size,type,fstype,mountpoint
NAME SIZE TYPE FSTYPE MOUNTPOINT
sda 465.8G disk
├─sda1 512M part vfat /boot/efi
├─sda2 732M part ext2 /boot
└─sda3 464.6G part crypto_LUKS
└─sda3_crypt 464.6G crypt LVM2_member
├─ubuntu--vg-root 25G lvm ext4 /
├─ubuntu--vg-swap_1 4.5G lvm swap [SWAP]
├─ubuntu--vg-home--lv 75G lvm ext4 /home
└─ubuntu--vg-stuff 100G lvm ext4 /stuff
Ignore the sda3_crypt line. I use an encrypted container in the sda3 partition. Doesn't matter to you.
As you can see, I have /home as a different "partition" (it is actually an LVM-logical volume, but for this discussion, consider it a partition).
/home gets backed up.
/stuff does NOT get backed up. Everything in /stuff is actually stored somewhere else where it gets the real backups.
Inside my HOME directory, I could easily access all the storage in /stuff by creating a symbolic link to that directory.
Also, note that these partitions all use native Linux file systems, not NTFS. This is important, since NTFS doesn't provide the expected capabilities needed for most Linux programs related to owner, group, permissions and ACLs.
You might notice that sda3 is 460G in size, but my "partitions" only add up to be less than 250G. Here's the actual storage used today:
Code:
$ df -hT -x squashfs -x tmpfs -x devtmpfs
Filesystem Type Size Used Avail Use%
Mounted on
/dev/mapper/ubuntu--vg-root ext4 25G 18G 5.9G 75% /
/dev/sda1 vfat 511M 4.5M 507M 1% /boot/efi
/dev/sda2 ext2 721M 176M 509M 26% /boot
/dev/mapper/ubuntu--vg-home--lv ext4 74G 23G 48G 33% /home
/dev/mapper/ubuntu--vg-stuff ext4 99G 65G 30G 69% /stuff
There is plenty of excess storage available both already there and unallocated. The power of LVM is being able to add storage to an existing LV easily, later, but that only works if the pool VG has unused space available. It takes about 5 seconds to extend an existing LV where and when it is needed. The system doesn't need to be stopped, rebooted, or anything else. The extend command can be used while the file system is active, being used. That's very handy.
Bookmarks