I have a now 6-year-old computer that is reaching the end of its life, but I would like to keep ready access to the data (about 1 TB) on it. So I bought a SanDisk 2TB Extreme at Costco, and need advice on how to set up the file system on it. I should know this, and I have a scheme I have used on 2 different USB disk drives used for backup and photo storage, but this seems to be a little different.
When I attach the SSD, Dolphin mounts it at /run/media/my_user_name/Extreme SSD, and shows that there is one folder labeled System Volume Information, and then two files: “Install Security for Mac.zip” and “Install Security for Window.exe”. Certainly I can delete the files, but should I leave the System Volume Information folder there? Or if I bring up the Partitioner in Yast2, am I going to rewrite this information, and possibly in a different folder as a side effect of creating a couple of new partitions? I would just as soon give the SSD a new volume label also. And possibly last, is there a “best” file system for these new partitions? I am using btrfs for my system files and xfs for my /home and /opt on my computers; is either of these more/less appropriate for this SSD? Basically I want to keep this SSD attached all the time to a new computer to have access to its data, but without filling the nvme drives on the new machine.
My apologies if there is a previous knowledge base article that covers this.
I need to know the device name, not a partition name, the device name. I use lsblk to find out:
knurpht@Lenovo-P16:~> lsblk | grep disk
sda 8:0 0 29,8G 0 disk
nvme0n1 259:0 0 953,9G 0 disk
knurpht@Lenovo-P16:~>
Let’s say /dev/sda the disk I bought. I want it completely clean, no ntfs or exfat filesystem. I then do: sudo dd if=/dev/zero of=/dev/sda bs=1M count=50 , This writes zeros to the 1st 50 MB of the disk and destroys the partition table.
Next it needs to be partitioned and have a file system, if you prefer a GUI, gparted has a good one, please use that. Now you select the nvme ( on the top right ), then
create a partition table, Use GPT
create one big partition, for your purpose I’d use xfs,
Let gparted do it’s thing
Done. To verify you can mount the partition and write some files to it
Almost there…but permission problems, and I am not sure what the default should be.
I successfully wiped the old partition table with the dd command, created a new GPT with gparted and then a single large XFS partition, named and labeled as “misc_store”.
When I plug in this SSD now, Dolphin mounts it to /run/media/my_username/misc_store. If I am in /run/media and do a “ls -l” the ownership of my_username shows up as “root root” with 750 permissions. If I cd to my_username and do a “ls -l” then misc_store shows up with similar “root root” ownership but now 755 permissions So I can’t write/create any files on misc_store. What combination of ownership and permission changes will be persistent across disconnections and reconnections of the SSD? I am asssuming that at least misc_store should have “[my_username users]” ownership, 750 or 755 permissions, but what do I do with the mount point at /run/media/my_username? Doesn’t the system create/delete this directory during the mount/unmount process?
Thanks for the suggestion, but I accessed this several months ago, and totally lost the thread of where it was going by about 15 posts and replies. My direct appeal yesterday seems to be generating more practical ideas.
bruno@LT-B:/run/media> ll
total 0
drwxr-x---+ 6 root root 120 mar 31 22:07 bruno
bruno@LT-B:/run/media> ll bruno
total 12
drwx------ 8 bruno users 4096 mar 28 2024 <name-of-partition>
@laurencek This is expected. You have run this as root, so the mountpoint /home/YOUR_USER/misc_store has root permissions. My guess is that your intention is to mount the disk as your user. Here’s how to do that:
unmount the disk
do sudo chown YOUR_USER:YOUR_GROUP /home/YOUR_USER/misc , this changes the ownership and group to your user and group
Now as your user do mount "DISK_PART" /home/YOUR_USER/misc_store
do sudo chown YOUR_USER:YOUR_GROUP /home/YOUR_USER/misc -R , this changes the ownership of all the content on the disk.
Write some files to disk.
If the disk is permanently connected, you could put it in /etc/fstab. Siince you are still on 15.6 you could also fix this from YaST
OK. Thank you, the specified ownership changes have allowed me to write the 800 GB of files from the old computer to the SSD. And a similar change of directory ownership on the new machine has allowed me access and write capability for these files there when the SSD is atached.