Ask Your Question
3

How to know if a file/directory resides on SSD or HDD on a machine with more than one drive?

asked 2017-08-14 20:03:33 -0500

aminsadeghi gravatar image

updated 2017-08-15 15:27:27 -0500

I have a workstation with a 256 GB SSD and a 1 TB HDD. During Fedora installation, I was asked to select which partitions I want Fedora to use, and I intuitively selected both my SSD and HDD. The installation finished successfully. However, I can't distinguish between my SSD and HDD anymore as they seem to have merged (!). Ideally, one would want the user-installed software to reside on SSD, and the static data (documents, etc.) to reside on HDD. The problem is currently, I can't distinguish if a file/directory resides on my SSD or HDD. My question is how do I do that?

Here's the output for fdisk -l

Disk /dev/sda: 238.5 GiB, 256060514304 bytes, 500118192 sectors
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: gpt
Disk identifier: 8087A68B-0C91-4AC1-A906-F67D5FBE9B70

Device       Start       End   Sectors   Size Type
/dev/sda1     2048    411647    409600   200M EFI System
/dev/sda2   411648   2508799   2097152     1G Linux filesystem
/dev/sda3  2508800 500117503 497608704 237.3G Linux LVM


Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
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: BADD1E7E-5A36-43CF-BB20-92431B43E9F6

Device     Start        End    Sectors   Size Type
/dev/sdb1   2048 1953523711 1953521664 931.5G Linux LVM


Disk /dev/mapper/fedora-root: 50 GiB, 53687091200 bytes, 104857600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/fedora-swap: 7.9 GiB, 8438939648 bytes, 16482304 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/fedora-home: 1.1 TiB, 1192847474688 bytes, 2329780224 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes

And here's the output for lsblk

NAME            MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda               8:0    0 238.5G  0 disk 
├─sda1            8:1    0   200M  0 part /boot/efi
├─sda2            8:2    0     1G  0 part /boot
└─sda3            8:3    0 237.3G  0 part 
  ├─fedora-root 253:0    0    50G  0 lvm  /
  ├─fedora-swap 253:1    0   7.9G  0 lvm  [SWAP]
  └─fedora-home 253:2    0   1.1T  0 lvm  /home
sdb               8:16   0 931.5G  0 disk 
└─sdb1            8:17   0 931.5G  0 part 
  └─fedora-home 253:2    0   1.1T  0 lvm  /home
sr0              11:0    1  1024M  0 rom

And here's the output for df -h

Filesystem               Size  Used Avail Use% Mounted on
devtmpfs                 7.8G     0  7.8G   0% /dev
tmpfs                    7.8G  328M  7.5G   5% /dev/shm
tmpfs                    7.8G  2.9M  7.8G   1% /run
tmpfs                    7.8G     0  7.8G   0% /sys/fs/cgroup
/dev ...
(more)
edit retag flag offensive close merge delete

Comments

If you select auto partitioning (selecting both SSD and HDD), the logical volume management will consider both SSD and HDD as one physical volume and will create a logical volume on the top of it. You may have to re-install the Fedora with manual partition. If you google, you may find many threads about the best/optimized partition scheme for SSD and HDD.

anishjp gravatar imageanishjp ( 2017-08-15 07:56:59 -0500 )edit

it would be helpful to show us the output of fdisk -l and lsblk. As an example, I have machine, where the root file system (/) resides on an SSD and /home resides on a HDD. I made an additional /boxes on the SSD where I have room for virtual machines. All is organized in a LVM setup, easily manageable and, moreover, encrypted.

florian gravatar imageflorian ( 2017-08-15 08:54:07 -0500 )edit

Is your confusion over not having top-level representations of your harddrives? The typical drive letters and such on Windows, I mean.

Aeyoun gravatar imageAeyoun ( 2017-08-15 14:47:23 -0500 )edit

No, my confusion is that my HDD and SDD are somehow combined. But that's not what I wanted. I want to put my software on the SSD for performance, and my static data like videos, text, etc. on the HDD. But right now, I can't do so. @Aeyoun

aminsadeghi gravatar imageaminsadeghi ( 2017-08-15 15:25:54 -0500 )edit

@Aeyoun, take a look at the output of lsblk in the OP's question. He has an LVM whose logical volume fedora-home (mounted to /home) spans over several physical volumes (sda3 and sdb1).

florian gravatar imageflorian ( 2017-08-15 16:28:59 -0500 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2017-08-15 06:18:23 -0500

Check RAID status

and also post output of this commands:

$ df -h
$ lsblk
edit flag offensive delete link more

Comments

I updated the question. @MrRolling

aminsadeghi gravatar imageaminsadeghi ( 2017-08-15 15:26:20 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2017-08-14 20:03:33 -0500

Seen: 186 times

Last updated: Aug 15 '17