Snakeoil Forums

Full Version: Permissions issue on 128GB SSD internal drive
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I created a snakeoil instance on 128GB SSD drive and resized so the LVM consumed the whole drive rather than 50G.

Number Start End Size File system Name Flags
1 1049kB 538MB 537MB fat32 boot, esp
2 538MB 1612MB 1074MB ext4
3 1612MB 128GB 126GB
Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/ubuntu--vg-ubuntu--lv: 126GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags:

Number Start End Size File system Flags
1 0.00B 126GB 126GB ext4

On Music Library on Snakeoil webapp I tried to create a new mount on /media but it is not a block device.
I ssh and created folders in the  /media directory Music + playlists
I added music files to the Music folder
On LMS I browsed to the folder and allowed it to scan the Music folder. No files were scanned although the flac files should be picked up. 

I attach the SSH folder and its properties in case that helps. 
I will be away for the next week so any questions may need to wait til then. 
[Image: Screenshot-2022-03-11-20-56-08.png]
(12-Mar-2022, 05:00 AM)patricia1066 Wrote: [ -> ]On Music Library on Snakeoil webapp I tried to create a new mount on /media but it is not a block device.
Interesting. It should be a block device.. 

Can you SSH into your computer, run the following and show me the output? Also what options did you set in the library page of the WebApp?
Code:
sudo lvdisplay
(12-Mar-2022, 07:56 AM)agent_kith Wrote: [ -> ]
(12-Mar-2022, 05:00 AM)patricia1066 Wrote: [ -> ]On Music Library on Snakeoil webapp I tried to create a new mount on /media but it is not a block device.
Interesting. It should be a block device.. 

Can you SSH into your computer, run the following and show me the output? Also what options did you set in the library page of the WebApp?
Code:
sudo lvdisplay
 

(12-Mar-2022, 10:57 PM)patricia1066 Wrote: [ -> ]
(12-Mar-2022, 07:56 AM)agent_kith Wrote: [ -> ]
(12-Mar-2022, 05:00 AM)patricia1066 Wrote: [ -> ]On Music Library on Snakeoil webapp I tried to create a new mount on /media but it is not a block device.
Interesting. It should be a block device.. 

Can you SSH into your computer, run the following and show me the output? Also what options did you set in the library page of the WebApp?
Code:
sudo lvdisplay

I might have used the wrong operator. I will check.
 I will check lvdisplay next week 
thanks
I used the correct operator to set up the music folder /media/music. I can navigate to the folder in LMS,  and set it as the music source, but the test flac files dont scan. 

Last login: Fri Mar 11 19:39:51 2022 from 192.168.0.57
patricia@t520:~$ sudo lvdisplay
[sudo] password for patricia:
--- Logical volume ---
LV Path /dev/ubuntu-vg/ubuntu-lv
LV Name ubuntu-lv
VG Name ubuntu-vg
LV UUID CHavmf-2tXl-GeXL-dPNt-UzDf-RIef-VvqvGC
LV Write Access read/write
LV Creation host, time ubuntu-server, 2022-03-11 17:01:48 +0000
LV Status available
# open 1
LV Size <117.74 GiB
Current LE 30141
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0

Logitech Media Server Version: 8.0.1 - 1606059084 @ Sun Nov 22 16:42:48 CET 2020
Hostname: t520
Server IP Address: 192.168.0.16
Server HTTP Port Number: 9000
Operating system: Debian - EN - utf8
Platform Architecture: x86_64-linux
Perl Version: 5.30.0 - x86_64-linux-gnu-thread-multi
Audio::Scan: 1.02
IO::Socket::SSL: 2.067
Database Version: DBD::SQLite 1.58 (sqlite 3.22.0)
Total Players Recognized: 0
 
Library Statistics
Total Tracks: 0
Total Albums: 0
Total Artists: 0
Total Genres: 0
Total Playlists: 0
Total Playing Time: 0:00:00


[Image: Screenshot-2022-03-22-20-15-19.png]
I have put a music folder in the home folder and media folder.
The mount entry /media/music cannot be saved as VFAT or EXT4, as save button is greyed out.
The mount entry /music has an active "save" button, but when I attempt I get an error. 

[Image: Screenshot-2022-03-22-20-22-11.png]

Now the save button is active!
Still wont mount on /media/music

[Image: Screenshot-2022-03-22-20-33-00.png]
(23-Mar-2022, 04:08 AM)patricia1066 Wrote: [ -> ]--- Logical volume ---
LV Path /dev/ubuntu-vg/ubuntu-lv
LV Name ubuntu-lv
VG Name ubuntu-vg
LV UUID CHavmf-2tXl-GeXL-dPNt-UzDf-RIef-VvqvGC
LV Write Access read/write
LV Creation host, time ubuntu-server, 2022-03-11 17:01:48 +0000
LV Status available
# open 1
LV Size <117.74 GiB
Current LE 30141
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0
Is that the only group you have? Can you run "sudo lvscan" to confirm? I think you mentioned that in the first post, just like to confirm. I just find it weird because if this is the only disk in your computer, Ubuntu will usually call it root. Can you also show me the output to "sudo mount".

If this is not your OS drive, then you need to enter the name (/dev/ubuntu-vg/ubuntu-lv) in the media text box. The filesystem should be whatever filesystem you formatted that to (e.g. EXT4, etc).

Edit: Check out this thread also to how to mount a volume outside the WebApp. I have a ticket on this, but havn't done anything as yet because my test systems don't use LVM. Will look into this in the next update.
(23-Mar-2022, 06:41 AM)agent_kith Wrote: [ -> ]
(23-Mar-2022, 04:08 AM)patricia1066 Wrote: [ -> ]--- Logical volume ---
LV Path /dev/ubuntu-vg/ubuntu-lv
LV Name ubuntu-lv
VG Name ubuntu-vg
LV UUID CHavmf-2tXl-GeXL-dPNt-UzDf-RIef-VvqvGC
LV Write Access read/write
LV Creation host, time ubuntu-server, 2022-03-11 17:01:48 +0000
LV Status available
# open 1
LV Size <117.74 GiB
Current LE 30141
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0
Is that the only group you have? Can you run "sudo lvscan" to confirm? I think you mentioned that in the first post, just like to confirm. I just find it weird because if this is the only disk in your computer, Ubuntu will usually call it root. Can you also show me the output to "sudo mount".

If this is not your OS drive, then you need to enter the name (/dev/ubuntu-vg/ubuntu-lv) in the media text box. The filesystem should be whatever filesystem you formatted that to (e.g. EXT4, etc).

Edit: Check out this thread also to how to mount a volume outside the WebApp. I have a ticket on this, but havn't done anything as yet because my test systems don't use LVM. Will look into this in the next update.
Yes it is the only group as far as I know. I have not made any links to external drives.
sudo lvscan
  ACTIVE            '/dev/ubuntu-vg/ubuntu-lv' [<117.74 GiB] inherit
sudo mount

sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,noexec,relatime,size=3478060k,nr_inodes=869515,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=704572k,mode=755)
/dev/mapper/ubuntu--vg-ubuntu--lv on / type ext4 (rw,relatime)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
none on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=28,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=18582)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
sunrpc on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
/dev/sda2 on /boot type ext4 (rw,relatime)
/var/lib/snapd/snaps/core18_1944.snap on /snap/core18/1944 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/core18_2344.snap on /snap/core18/2344 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/core20_1376.snap on /snap/core20/1376 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/lxd_19188.snap on /snap/lxd/19188 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/lxd_22526.snap on /snap/lxd/22526 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/snapd_15177.snap on /snap/snapd/15177 type squashfs (ro,nodev,relatime,x-gdu.hide) 
/dev/sda1 on /boot/efi type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
tmpfs on /run/snapd/ns type tmpfs (rw,nosuid,nodev,noexec,relatime,size=704572k,mode=755)
nsfs on /run/snapd/ns/lxd.mnt type nsfs (rw)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=704568k,mode=700,uid=1000,gid=1000)

Following the link I tried to install lvm2
sudo apt install lvm2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
lvm2 is already the newest version (2.03.07-1ubuntu1).
lvm2 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 76 not upgraded.

​​​​​​sudo vgscan
  Found volume group "ubuntu-vg" using metadata type lvm2

​​​​​​sudo lvs
  LV        VG        Attr       LSize    Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  ubuntu-lv ubuntu-vg -wi-ao---- <117.74g

This block is mounted. Is the command below necessary to mount a music folder at /media/music ?
sudo mount /dev/mapper/DEVICE /path/to/mount
From your mount output:

(23-Mar-2022, 11:02 PM)patricia1066 Wrote: [ -> ]/dev/mapper/ubuntu--vg-ubuntu--lv on / type ext4 (rw,relatime)

We can see you're already mounting that volume as root. As such you don't have to do anything in the library tab, as you're using the root partition to keep your music. So that's sorted.

Now the question is why didn't LMS pick up the files. Do you have any issues copying music files over the network? Can MPD scan files properly?
(24-Mar-2022, 06:49 AM)agent_kith Wrote: [ -> ]From your mount output:
(23-Mar-2022, 11:02 PM)patricia1066 Wrote: [ -> ]/dev/mapper/ubuntu--vg-ubuntu--lv on / type ext4 (rw,relatime)

We can see you're already mounting that volume as root. As such you don't have to do anything in the library tab, as you're using the root partition to keep your music. So that's sorted.

Now the question is why didn't LMS pick up the files. Do you have any issues copying music files over the network? Can MPD scan files properly?

I can copy files delete files create folders in any directory. I can access for playback  the music folder over the network. Because  LMS can browse music folder but failed to scan the folder i can get the log file. 

 the permissions on files are on the image in file first post in this thread. I have never had this happen in LMS before so thought it a directory permission problem
(24-Mar-2022, 11:21 AM)patricia1066 Wrote: [ -> ]the permissions on files are on the image in file first post in this thread. I have never had this happen in LMS before so thought it a directory permission problem
Oh. Of course, how did I miss that Blush ? The file permissions are wrong. SSH to your computer, and run this to fix:

Code:
find . -type f -exec chmod 644 {} \;

That GUI transfer program may have changed your umask. Set it to either 644 (or rw-r--r--) for your FLAC files and LMS should be able to pick it up during scanning. MPD should have no problems looking up these files though as it's running as root.
(24-Mar-2022, 06:26 PM)agent_kith Wrote: [ -> ]
(24-Mar-2022, 11:21 AM)patricia1066 Wrote: [ -> ]the permissions on files are on the image in file first post in this thread. I have never had this happen in LMS before so thought it a directory permission problem
Oh. Of course, how did I miss that Blush ? The file permissions are wrong. SSH to your computer, and run this to fix:
 
Code:
find . -type f -exec chmod 644 {} \;

That GUI transfer program may have changed your umask. Set it to either 644 (or rw-r--r--) for your FLAC files and LMS should be able to pick it up during scanning. MPD should have no problems looking up these files though as it's running as root.
The Debian program is Double Commander which accesses the snakeoil pc by FTP.

I tried the CLI code in Terminal as is and with sudo, but the music folder contents were made inaccessible and zipped. 

The music and playlists folders have attribute 777, while the recursive folders are 755.
I used to be able to copy flac files over the FTP connection. No longer
I deleted both music and playlists folders in terminal.
I created Music and Playlists folders in terminal which have attributes 755

Something in the linux laptop is unhappy with this morning's work because I can no longer copy files across even when logged out of terminal snakeoil. Every time I try to copy a file nothing happens and I have to force close the DC program. I can no longer copy between folders of my laptop. Looks like chromeos linux on laptop is the problem doesn't it?
Pages: 1 2