W3Teal

Better data partitioning in Linux

Taking times for backup is such a waste of time. In this post, I want to share you how to create an portable home, and make an Windows-friendly data partition, which is great for you who still dualbooting with Windows.

Using NTFS partiton just for data

Yes, Linux is completely supporting NTFS. But if you mount NTFS partition as /home, you will get annoyed by Unix permission, because it's explicitly only working in Linux filesystems like ext4, btrfs, etc. And I almost having an big headache after reinstalling and reuse the NTFS partition as /home, because all my datas on it. My current workaround is:

  1. Move my Documents, Music, Pictures, ... to the root of the partition from the username folder.1
  2. Mount this NTFS partition as /data
  3. After install, I can simply symlinking the folders from /data to ~/.
# Delete the current /home directories
rm -r ~/Documents ~/Downloads ~/Videos ~/Pictures ~/Music ~/Public ~/Templates

ln -sfn /data/Documents ~/Documents
ln -sfn /data/Downloads ~/Downloads
ln -sfn /data/Videos ~/Videos
ln -sfn /data/Pictures ~/Pictures
ln -sfn /data/Music ~/Music
ln -sfn /data/Public ~/Public
ln -sfn /data/Templates ~/Templates

Spent a bit for /home partition

You wouldn't need to spend so much for the /home partition, because the data is already handled in another NTFS partition, it is just for some configurations, and not taking so much space. In my case, It's just only spend like 1.1GB. So, I recommend you to just giving an 10-20GB, in case you're not using it to store your data.

My current disk worklow is like this2:

NAME        FSTYPE FSVER LABEL   UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda
├─sda1
├─sda2      ntfs         Data M2 3816C82C16C7E8C8                      122.2G    61% /data
├─sda3      btrfs                1598c024-f8bc-4547-afaa-2a052b450366   47.5G     2% /home
├─sda4      vfat   FAT32         43B7-34CB                             298.7M     0% /boot/efi
└─sda5      btrfs                b61ddcb1-93b5-44db-b097-e9347fd5d118   90.6G    16% /var/cache
                                                                                     /var/log
                                                                                     /var/tmp
                                                                                     /srv
                                                                                     /root
                                                                                     /

2/100 #100DaysToOffload


  1. Because I use this partition as /home before

  2. Ignore the sda1, it's just something like "Microsoft reserved partition". And I spend way too much for /home, lol.

#en #guide #posts