Ubuntu 服务器上外部驱动器的所有权

Ubuntu 服务器上外部驱动器的所有权

自从大约一年前第一次使用西部数据 6TB 外置硬盘以来,我一直遇到很多问题。

首先,我进入了服务器的世界,并使用一台装有 Ubuntu Server OS 的旧笔记本电脑,主要用于托管 Plex 媒体服务器。所有这些媒体都在这个外部驱动器上。首先,我使用我的 Windows 计算机复制了数 TB 的媒体,但一旦我将其安装到 Ubuntu,它只允许 root 拥有所有权。

我最近学习了很多有关服务器的知识,买了一台二手戴尔 Precision 工作站,全新安装了 Ubuntu Server 22.04.2 LTS,并尝试将其安装到用户而不是 root,但仍然遇到同样的问题。我还有其他内部和外部驱动器和驱动器池,我可以随时更改所有权和权限。

我查看了所有问题,有些人不熟悉如何更改权限或所有权,但我尝试了所有不同的方法。我尝试在驱动器安装和卸载的情况下更改权限和所有权。我真的很想能够更改所有权,这样我就可以像使用其他驱动器或甚至 SFTP 一样通过 Samba 使用它。我将在下面提供一些信息,如果有人有任何想法,这些信息可能会有所帮助。

另一个有趣的事实是,当驱动器插入时,服务器将无法启动到操作系统(是的,我已经检查了分区上的任何启动标志),所以我必须在服务器操作系统启动后将其插入。

$ blkid /dev/sdm1(输出):

/dev/sdm1: LABEL="My Book" UUID="E01F-6997" BLOCK_SIZE="512" TYPE="exfat" PARTLABEL="My Book" PARTUUID="ace84bbc-8a6d-462b-b543-0f5f65457510"

$ df -H(输出):

    Filesystem      Size  Used Avail Use% Mounted on
tmpfs           3.4G  5.1M  3.4G   1% /run
/dev/sda2       983G  717G  216G  77% /
tmpfs            17G  189k   17G   1% /dev/shm
tmpfs           5.3M     0  5.3M   0% /run/lock
tmpfs            17G     0   17G   0% /run/qemu
External2Pool   8.2T  1.4T  6.5T  17% /mnt/ext2Pool
/dev/sdi1       738G   29k  700G   1% /mnt/ePool5
/dev/sdj1       984G   29k  934G   1% /mnt/ePool7
/dev/sde1       2.0T  286G  1.6T  16% /mnt/ePool1
/dev/sdg1       984G   29k  934G   1% /mnt/ePool2
/dev/sdh1       2.0T  300G  1.6T  17% /mnt/ePool3
/dev/sdk1       245G   29k  233G   1% /mnt/ePool6
/dev/sdl1       314G   29k  298G   1% /mnt/ePool4
/dev/sda1       1.2G  6.4M  1.2G   1% /boot/efi
/dev/sdf1       2.1T  1.7T  306G  85% /mnt/JoDrive
tmpfs           3.4G   25k  3.4G   1% /run/user/1000
/dev/sdb1       984G  321M  934G   1% /mnt/iPool1
/dev/sdc1       984G  321M  934G   1% /mnt/iPool2
/dev/sdd1       492G   29k  467G   1% /mnt/iPool3
Internal2Pool   2.5T  642M  2.4T   1% /mnt/int2Pool
/dev/sdm1       6.1T  5.4T  638G  90% /mnt/MAIN

$ fdisk /dev/sdm (输出):

Welcome to fdisk (util-linux 2.37.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


[?2004hCommand (m for help): p
[?2004l
Disk /dev/sdm: 5.46 TiB, 6001174511616 bytes, 11721043968 sectors
Disk model: My Book 25ED    
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: 3FA9CA38-7310-44E6-8972-1B2B5B8FC0DC

Device     Start         End     Sectors  Size Type
/dev/sdm1   2048 11721041919 11721039872  5.5T Linux filesystem

这是我的 fstab:

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda2 during curtin installation
/dev/disk/by-uuid/4b40d9bb-a2cb-48d7-84db-1f193caab897 / ext4 defaults 0 1
# /boot/efi was on /dev/sda1 during curtin installation
/dev/disk/by-uuid/CF6E-0CFC /boot/efi vfat defaults 0 1
/swap.img   none    swap    sw  0   0


##### Original Plex Media Disks #######################################################

# Mom's Drive (2TB)
UUID=66728AB8728A8C8D   /mnt/JoDrive    ntfs    defaults,nofail 0   0

# Media Drive (6TB)
UUID=E01F-6997  /mnt/MAIN   exfat   defaults,nofail 0   0


##### (OLD) Drives for ePool (External) #######################################################

# My Storage Drive 1
UUID=4bcd5ddf-92b8-4c57-a359-c081f43a33e8   /mnt/ePool1      ext4    defaults,nofail    0   0

# Storage Drive 2
UUID=4b974804-1c20-43bc-b857-c9fa42b75e7b   /mnt/ePool2 ext4    defaults,nofail     0   0

# Storage Drive 3
UUID=ae7418f3-d555-4f63-a4bf-cb1d74b9468b   /mnt/ePool3 ext4    defaults,nofail     0   0

# My Storage Drive 4
UUID=d2495930-ee12-462b-be34-bc29a120bce6   /mnt/ePool4 ext4    defaults,nofail     0   0

# Storage Drive 5
UUID=e256781d-0ecc-4074-a0d9-6ba92751e7e6   /mnt/ePool5 ext4    defaults,nofail     0   0

# Storage Drive 6
UUID=bcd2f4a6-39f8-4ba9-aecf-48f42c5308b9   /mnt/ePool6 ext4    defaults,nofail     0   0

# Storage Drive 7
UUID=e13ccb83-e65a-46f6-8320-4e5b7cd49e38   /mnt/ePool7 ext4    defaults,nofail     0   0

##### Disks for iPool (Internal) ##############################################

# Internal Drive Storage (1TB)
UUID=eaea4e5b-b9b0-45fe-8ffe-e1b3edfab434   /mnt/iPool1 ext4    defaults,nofail 0   0


# Internal Drive Storage 2 (1TB)
UUID=6ae3d2df-651b-438e-91b4-170377ca89ea   /mnt/iPool2 ext4    defaults,nofail 0   0

# Internal Drive Storage 3 (500GB)
UUID=9bf0af4b-dcf3-48f6-8dae-d2bbb06f4737   /mnt/iPool3 ext4    defaults,nofail 0   0


##### Pools ##################################################################

# External Drive Pool
/mnt/ePool* /mnt/ext2Pool   fuse.mergerfs   cache.files=auto-full,dropcacheonclose=true,category.create=mfs,moveonenospc=true,minfreespace=10G,fsname=External2Pool,nonempty    0   0


# Internal Drive Pool
/mnt/iPool* /mnt/int2Pool   fuse.mergerfs   cache.files=auto-full,dropcacheonclose=true,category.create=mfs,moveonenospc=true,minfreespace=10G,fsname=Internal2Pool,nonempty    0   0




####################################################################

# Internal Drive Pool

#/mnt/iPool*    /mnt/5iPool fuse.mergerfs   cache.files=auto-full,dropcacheonclose=true,category.create=mfs,moveonenospc=true,minfreespace=10G,fsname=Internal2Pool,nonempty    0   0



# (OLd) Internal Drisk Pool
#/mnt/iPool*    /mnt/int3Pool   fuse.mergerfs   cache.files=auto-full,dropcacheonclose=true,category.create=mfs,moveonenospc=true,minfreespace=5G,fsname=Internal3Pool,nonempty 0   0

在此先感谢任何知道答案的人,如果需要更多信息,请告诉我。

相关内容