0

I have a USB External SSD with 4 disk partitions. The file system of partitions are

  • APFS
  • ExFAT
  • ext4
  • NTFS

I'm using kernel version

$ uname -r
4.18.0-193.6.3.el8_2.x86_64 

checking ls -al /dev/sd*...

$ ls -al /dev/sda*
brw-rw----. 1 root disk 8, 0 Jul  3 23:46 /dev/sda
brw-rw----. 1 root disk 8, 1 Jul  3 23:46 /dev/sda1
brw-rw----. 1 root disk 8, 2 Jul  3 23:46 /dev/sda2
brw-rw----. 1 root disk 8, 3 Jul  3 23:46 /dev/sda3
brw-rw----. 1 root disk 8, 4 Jul  3 23:46 /dev/sda4
brw-rw----. 1 root disk 8, 5 Jul  3 23:46 /dev/sda5

Now checking mount list

$ mount -l | grep sda
/dev/sda3 on /run/media/joseluisbz/EXT4 type ext4 (rw,nosuid,nodev,relatime,seclabel,uhelper=udisks2) [EXT4]
/dev/sda4 on /run/media/joseluisbz/ExFAT type exfat (rw,nosuid,nodev,relatime,uid=1000,gid=1000,fmask=0022,dmask=0022,iocharset=utf8,errors=remount-ro,uhelper=udisks2) [ExFAT]
/dev/sda5 on /run/media/joseluisbz/NTFS type ufsd (rw,nosuid,nodev,relatime,nls=utf8,uid=1000,gid=1000,showdots,uhelper=udisks2) [NTFS]

and checking with blkid

$ blkid | grep -v loop | grep /dev/sda
/dev/sda1: LABEL="EFI" UUID="67E3-17ED" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="759e06ee-9a30-4e51-81a4-41ee8ebfecd3"
/dev/sda3: LABEL="EXT4" UUID="ce8c8777-e073-4f0a-8faa-361c6136154f" TYPE="ext4" PARTUUID="93480588-2497-4c06-8aff-5d218f6a5260"
/dev/sda4: LABEL="ExFAT" UUID="5F00-07F7" TYPE="exfat" PARTUUID="a0c6c246-9f36-43f2-acd6-fd6214852fa1"
/dev/sda5: LABEL="NTFS" UUID="AA00430E0042E145" TYPE="ntfs" PARTUUID="b26baae4-6b53-4358-b707-18bfde5679f4"

with df

$ df -aTh | grep /dev/sd
/dev/sda3       ext4             220G   61M  208G   1% /run/media/joseluisbz/EXT4
/dev/sda4       exfat            224G  8.7M  224G   1% /run/media/joseluisbz/ExFAT
/dev/sda5       ufsd             224G  520M  224G   1% /run/media/joseluisbz/NTFS

with lsblk

$ lsblk -o name,mountpoint,label,fstype,size,type,uuid,group,owner
sda                                                                              894.3G disk                                      disk  root
├─sda1                                                       EFI        vfat       200M part 67E3-17ED                            disk  root
├─sda2                                                                           223.5G part                                      disk  root
├─sda3       /run/media/joseluisbz/EXT4                      EXT4       ext4     223.5G part ce8c8777-e073-4f0a-8faa-361c6136154f disk  root
├─sda4       /run/media/joseluisbz/ExFAT                     ExFAT      exfat    223.5G part 5F00-07F7                            disk  root
└─sda5       /run/media/joseluisbz/NTFS                      NTFS       ntfs     223.5G part AA00430E0042E145                     disk  root

using GParted:

enter image description here

using Disks:

enter image description here

I have two private scripts that mount the partitions NTFS and APFS. The problem arises with APFS. The private scripts are pretty similar, the NTFS filesystem is automounted , but the APFS filesystem is not automunted.

Is there some kernel limitation in detecting APFS file system? If yes, what version kernel detect it?

When I created the labels, I put in the APFS partition the label AFPS in order check what happens. As you can see on Disks application the partition is named partition 2 instead of AFPS.

How can I read the label in order to make a mount point with the real label?

$ cat /sbin/mount.theAFPS
#!/bin/sh
/bin/mount -t apfs "$@"`
$

$ cat /usr/sbin/mount.theAFPS #!/bin/sh /bin/mount -t apfs "$@"`

What would be the life cycle involving automount with the /sbin/mount. commands in linux?

Who calls them, and when are they called?

muru
  • 72,889
joseluisbz
  • 365
  • 7
  • 22
  • Did you build afps-fuse on the system in order to mount it? https://github.com/sgan81/apfs-fuse – Nasir Riley Jul 04 '20 at 05:43
  • Does it work if you attempt to mount it manually or if you put it in /etc/fstab and then run mount -a? – Nasir Riley Jul 04 '20 at 05:45
  • Yes, mount manually is working. But, I was (I can't how I say) checking if aumount works, But I fails. I was comparing with NTFS script version and the NTFS works, but AFPS fails. Only, I want to know if some version of kernel limitation. – joseluisbz Jul 04 '20 at 05:47
  • What exactly are you doing? Add the script that you are using to automount it to your question. – Nasir Riley Jul 04 '20 at 05:54
  • Why not change the line to /sbin/mount -t apfs /dev/sda2 /mount/point? – Nasir Riley Jul 04 '20 at 06:19
  • I think it is a static way of doing it (In fact I did so at first). This implies that I would have to change users manually, including disk, when connected after another disk. First I want to understand how it works in order to automate the mount. – joseluisbz Jul 04 '20 at 06:24
  • If you just want it to automount, then why not just add a line for it in /etc/fstab so that it mounts at boot? – Nasir Riley Jul 06 '20 at 00:21

0 Answers0