Hi!
Beginners question about mounting hard drives.
I have been following this guide:
https://en.opensuse.org/SDB:Mount_additional_disk
Maybe first I paste the output to show you what disks I have and then ask questions.
> sudo fdisk -l
[sudo] password for root:
Disk /dev/sda: 223.6 GiB, 240057409536 bytes, 468862128 sectors
Disk model: SAMSUNG MZ7LM240
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000d6c8c
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 264253439 264251392 126G 82 Linux swap / Solaris
/dev/sda2 * 264253440 353429503 89176064 42.5G 83 Linux
/dev/sda3 353429504 468862127 115432624 55G 83 Linux
Disk /dev/sdb: 3.7 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: TOSHIBA MG04ACA4
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 467D5237-7570-4E6D-8880-B4FC74EE32E4
Device Start End Sectors Size Type
/dev/sdb1 34 262177 262144 128M Microsoft reserved
/dev/sdb2 264192 3908694015 3908429824 1.8T Linux RAID
/dev/sdb3 3908694016 7814035455 3905341440 1.8T Linux RAID
Partition 1 does not start on physical sector boundary.
Disk /dev/sdc: 3.7 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: TOSHIBA MG04ACA4
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 36DCF6CE-F64D-4D93-98BD-E8D7DE56D6FC
Device Start End Sectors Size Type
/dev/sdc1 2048 3908421631 3908419584 1.8T Linux RAID
/dev/sdc2 3908421632 7814035455 3905613824 1.8T Linux RAID
GPT PMBR size mismatch (1 != 7814037167) will be corrected by write.
Disk /dev/sdd: 3.7 TiB, 4000787030016 bytes, 7814037168 sectors
Disk model: HGST HUS724040AL
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 306588A1-2CA4-4D52-A14C-2C8A22715216
Device Start End Sectors Size Type
/dev/sdd1 2048 7814035455 7814033408 3.7T Microsoft basic data
So, I know this is going to sound weird to some of you, but I inherited a somewhat supported computer but now need to learn to administer it myself. That is why I am asking about everything.
- How many disks I have.
So my first question is if I understand the output correctly. I have 4 disks, meaning I need to mount 3 of them now.
I was actually aware of 3 disks, so maybe I am missing something here, not sure.
Disk /dev/sda: 223.6 GiB, 240057409536 bytes, 468862128 sectors
Disk /dev/sdb: 3.7 TiB, 4000787030016 bytes, 7814037168 sectors
Disk /dev/sdc: 3.7 TiB, 4000787030016 bytes, 7814037168 sectors
Disk /dev/sdd: 3.7 TiB, 4000787030016 bytes, 7814037168 sectors
sdb and sdc are both
Disk model: SAMSUNG MZ7LM240
but with different identifiers and partitioning. So I guess fdisk does not lie and it is 2 actual physical drives I have that happen to be the same model.
- The same disks in dolphin.
The one where Linux is installed (that is the * right?), I can see the two partitions in dolphin, I know which one is which one by size.
Sidenote: If you are wondering why is the SWAP so gigantic, I discussed this earlier. I sometimes needed a lot of memory in the past (up tp 256G), it is perhaps an overkill and it would be good for me to learn how to monitor my actual needs, but I will worry about his at a later point.
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 264253439 264251392 126G 82 Linux swap / Solaris
/dev/sda2 * 264253440 353429503 89176064 42.5G 83 Linux
/dev/sda3 353429504 468862127 115432624 55G 83 Linux
I can see one additional disk in dolphin under ‘Devices’. I mounted it, see below.
MAIN QUESTION:
what about the other disks?
What do I do to mount and access all these partitions sdb2, sdb3, sdc1, sdc2
I am skipping this reserved partition, not sure I need it but maybe I could use this at some point for other Linux distribution installs for running certain tools in a stable environment, but let’s skip this for now. I need to learn a lot more before I get to that point, and now what I want apart from not having to update everything for tools that are not well supported.
Device Start End Sectors Size Type
/dev/sdb1 34 262177 262144 128M Microsoft reserved
/dev/sdb2 264192 3908694015 3908429824 1.8T Linux RAID
/dev/sdb3 3908694016 7814035455 3905341440 1.8T Linux RAID
Device Start End Sectors Size Type
/dev/sdc1 2048 3908421631 3908419584 1.8T Linux RAID
/dev/sdc2 3908421632 7814035455 3905613824 1.8T Linux RAID
From dolphin I can not see which of the extra disks is already mounted there.
Following the guidelines I looked up the UUID in dolphin, from the path /run/media/user/UUID/
The suggested file system in the example is xfs but I dont understand yet if one can simply choose that.
I found file system under preferences for that specific Device (ext4) so I mounted it using that information.
I can also see that all other lines in fstab have 0 0 in the last columns instead of the recomended ‘1 2’. According to my googling this is not a big deal.
It was slightly confusing to know how should the line formatting look like, if that is spaces, tabs, or specific position - positions aligned with the lines above seems to work fine anyway.
> sudo cat /etc/fstab
UUID=dcdc1772-2bfa-4a91-a066-bf8b0d40017d / btrfs defaults 0 0
UUID=dcdc1772-2bfa-4a91-a066-bf8b0d40017d /boot/grub2/x86_64-efi btrfs subvol=/@/boot/grub2/x86_64-efi 0 0
UUID=dcdc1772-2bfa-4a91-a066-bf8b0d40017d /boot/grub2/i386-pc btrfs subvol=/@/boot/grub2/i386-pc 0 0
UUID=7cb193c3-d707-4426-9297-086f85b4edfb swap swap defaults 0 0
UUID=dcdc1772-2bfa-4a91-a066-bf8b0d40017d /.snapshots btrfs subvol=/@/.snapshots 0 0
UUID=dcdc1772-2bfa-4a91-a066-bf8b0d40017d /var btrfs subvol=/@/var 0 0
UUID=dcdc1772-2bfa-4a91-a066-bf8b0d40017d /usr/local btrfs subvol=/@/usr/local 0 0
UUID=dcdc1772-2bfa-4a91-a066-bf8b0d40017d /tmp btrfs subvol=/@/tmp 0 0
UUID=dcdc1772-2bfa-4a91-a066-bf8b0d40017d /srv btrfs subvol=/@/srv 0 0
UUID=dcdc1772-2bfa-4a91-a066-bf8b0d40017d /root btrfs subvol=/@/root 0 0
UUID=dcdc1772-2bfa-4a91-a066-bf8b0d40017d /opt btrfs subvol=/@/opt 0 0
UUID=bb672245-e9e8-4dc6-823c-94a06c04dbd0 /home xfs defaults 0 0
UUID=fa9eb208-82d5-4e72-9157-5f3dc253126d /home/kasiazar/Thijs ext4 defaults 1 2
>
Now I can see which of the disks I mounted with df -h and it is the one with one partition
/dev/sdd1 2048 7814035455 7814033408 3.7T Microsoft basic data
I am not sure why the type of that one is ‘Microsoft basic data’ or even what these types are. It was a disk used under Linux.
But the important thing is I can create new folders, files, move them around - it seems to work fine.
Any pointers, comments or links to read-up something are very appriciated.
Thanks!
Kasia