You are not logged in.

#1 2024-08-06 19:09:51

aljustiet
Member
Registered: 2024-02-09
Posts: 89
Website

Can't mount exfat logical volume?

When I run:

doas mount -o uid=aljustiet,gid=aljustiet /dev/hdd/1 /mnt/hdd

I got the error:

aljustiet@arch ~> mount /dev/hdd/1 /mnt/hdd
mount: /mnt/hdd: can't read superblock on /dev/mapper/hdd-1.
       dmesg(1) may have more information after failed mount system call.

When I run lsblk, it doesn't show the logical volume, it should be under sdc1

root@arch ~# lsblk
NAME                MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
sda                   8:0    1 117.2G  0 disk  
└─sda1                8:1    1 117.2G  0 part  /mnt/usb
sdc                   8:32   0 931.5G  0 disk  
└─sdc1                8:33   0 931.5G  0 part
zram0               253:0    0   5.8G  0 disk  [SWAP]

Here're logs:
journalctl:

Aug 06 23:57:58 arch doas[459631]: pam_systemd_home(doas:account): New sd-bus connection (system-bus-pam-systemd-home-459631) opened.
Aug 06 23:57:58 arch doas[459631]: pam_unix(doas:session): session opened for user root(uid=0) by aljustiet(uid=1000)
Aug 06 23:57:58 arch doas[459633]: aljustiet ran command mount /dev/hdd/1 /mnt/hdd as root from /home/aljustiet
Aug 06 23:57:58 arch kernel: Buffer I/O error on dev dm-0, logical block 244189168, async page read
Aug 06 23:57:58 arch kernel: Buffer I/O error on dev dm-0, logical block 16, async page read
Aug 06 23:57:58 arch doas[459631]: pam_unix(doas:session): session closed for user root
Aug 06 23:58:00 arch crond[459643]: pam_unix(crond:session): session opened for user root(uid=0) by root(uid=0)
Aug 06 23:58:00 arch CROND[459645]: (root) CMD (/home/aljustiet/.local/bin/stop_charging)
Aug 06 23:58:00 arch CROND[459643]: (root) CMDEND (/home/aljustiet/.local/bin/stop_charging)
Aug 06 23:58:00 arch CROND[459643]: pam_unix(crond:session): session closed for user root

dmesg:

[Aug 7 01:11] [Wed Aug  7 01:11:01 2024] Buffer I/O error on dev dm-0, logical block 244189168, async page read
[  +0.000133] [Wed Aug  7 01:11:01 2024] Buffer I/O error on dev dm-0, logical block 16, async page read

After reboot, it fixes, but then it happens again. It disappears from the lsblk after some time. Maybe it's going to sleep mode ig, but when I unplug and plug it again, it doesn't fix the issue. I have a cron job that updates system every 1 hour, maybe when it mkinitcpios the kernel, it starts failing. How can 'running mkinitcpio' break mounting lvm volume?

Last edited by aljustiet (2024-08-06 19:24:09)

Offline

#2 2024-08-06 19:33:43

frostschutz
Member
Registered: 2013-11-15
Posts: 1,647

Re: Can't mount exfat logical volume?

unplug what?

lvm (device mapper) does not work well with removable devices. as long as the mapping exists (vgchange -a y) the device is considered in use. if it's unplugged (or any cable issue) then the mapping is broken, until you delete and re-create it.

your lsblk shows sda, sdc - where is sdb? if that was your lvm device and you activated volumes (backed by sdb) and it got replugged / redetected as sdc, no wonder nothing works.

to find out you'll have to read further back in your dmesg / journalctl if there was any disconnect event between enabling volumes and mount attempt. you can also check dmsetup table which backing device it's supposed to use...

Last edited by frostschutz (2024-08-06 19:34:53)

Offline

#3 2024-08-06 19:39:03

aljustiet
Member
Registered: 2024-02-09
Posts: 89
Website

Re: Can't mount exfat logical volume?

frostschutz wrote:

unplug what?

lvm (device mapper) does not work well with removable devices. as long as the mapping exists (vgchange -a y) the device is considered in use. if it's unplugged (or any cable issue) then the mapping is broken, until you delete and re-create it.

your lsblk shows sda, sdc - where is sdb? if that was your lvm device and you activated volumes (backed by sdb) and it got replugged / redetected as sdc, no wonder nothing works.

to find out you'll have to read further back in your dmesg / journalctl if there was any disconnect event between enabling volumes and mount attempt. you can also check dmsetup table which backing device it's supposed to use...

vgchange -ay doesn't help. I haven't plugged and unplugged the drive when rebooting. I have this entry in my fstab:

# /dev/mapper/hdd-1
UUID=E6FD-2ED8      	/mnt/hdd  	exfat     	rw,relatime,nofail,uid=1000,gid=1000,fmask=0022,dmask=0022,iocharset=utf8,errors=remount-ro	0 2

Maybe it's causing the problem.

Last edited by aljustiet (2024-08-06 19:41:23)

Offline

Board footer

Powered by FluxBB