You are not logged in.

#1 2019-01-31 15:46:36

Zhme
Member
Registered: 2017-06-11
Posts: 80

Trouble accessing data partition after mounting with liveUSB/genfstab

I made a partition table that has root and home distributions for 2 Linux partitions, 1 Windows partition, and 2 data partitions, and a swap partition.

Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: HGST HTS721010A9
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: 303058C6-7089-4826-A3D8-7FAA644481B5

Device          Start        End   Sectors   Size Type
/dev/sda1        2048    1050623   1048576   512M EFI System
/dev/sda2     1050624   40039062  38988439  18.6G Linux filesystem
/dev/sda3    40040448   79101951  39061504  18.6G Linux filesystem
/dev/sda4    79101952  118163455  39061504  18.6G Linux filesystem
/dev/sda5   118163456  157227007  39063552  18.6G Linux filesystem
/dev/sda6   157227008  196288511  39061504  18.6G Linux filesystem
/dev/sda7   196288512  235352063  39063552  18.6G Linux filesystem
/dev/sda8   235352064  918945312 683593249   326G Linux filesystem
/dev/sda9   919922688 1798828125 878905438 419.1G Microsoft basic data
/dev/sda10 1798830080 1953523711 154693632  73.8G Linux filesystem

I first tried to make a Data folder in my home directory and symlink with

ln -s

without success.  Afterwards I tried to use my liveUSB to mount each partition again (including Data on sda8) and to regenerate the fstab file.
After doing so I looked into the disk usage for the data size and it only shows 4.1kb.  I am worried that having made the Data file and attempting a soft link to the sda8 partition prior to mounting it and updating the fstab may be conflicting.  The first thing I plan on doing is removing the Data folder which isn't functioning properly anyway and removing the fstab entry for sda8 to try from a fresh start.  I would post more command output but I am not sure which commands would be relevant so i'll save them for later!

Also, looking at this post preview I noticed my sda10 is not a swap partition atm... So please ignore that -_- oops...

Offline

#2 2019-01-31 19:22:47

Zhme
Member
Registered: 2017-06-11
Posts: 80

Re: Trouble accessing data partition after mounting with liveUSB/genfstab

lsblk -if
NAME        FSTYPE LABEL       UUID                                 FSAVAIL FSUSE% MOUNTPOINT
sda                                                                                
|-sda1      vfat               4DB7-14EF                             412.1M    19% /boot
|-sda2      ext4               e05ec1b5-90d5-49cc-81ad-d26b05dc2be4      7G    56% /
|-sda3      ext4               5d23fbfe-3671-445a-96bf-668b7f582854    8.2G    50% /home
|-sda4      ext4   root        84449379-d6e6-4dad-a10c-0427211947bd                
|-sda5      ext4   home        9ce5c81d-ac4b-4bf2-b3c6-92b93ac5f606                
|-sda6      ext4               c3457606-8606-48c6-9591-f2889b0291fc                
|-sda7      ext4               7e955b3a-9c37-449d-8014-a295ff0a9433                
|-sda8      ext4               f8986e92-64e1-448c-940c-9e0e97f326e1  303.5G     0% /home/Data
|-sda9      ntfs               2FACFA354EF7850B                                    
`-sda10     swap               dc115029-6c98-4fb1-be67-ee4242e53df2                [SWAP]
sdb                                                                                
`-sdb1      vfat   ARCH_201901 CC7D-CC25                              14.3G     4% /run/media/zhme/
nvme0n1                                                                            
|-nvme0n1p1 vfat   SYSTEM      4E0C-4AF3                                           
|-nvme0n1p2                                                                        
|-nvme0n1p3 ntfs   WinRE tools F8BA0E6CBA0E2828                                    
|-nvme0n1p4 ntfs   BIOS_RVY    AE66134666130EA9                                    
`-nvme0n1p5 ntfs   Windows     90F05921F0590F3A

This is my fstab

# /dev/sda2
UUID=e05ec1b5-90d5-49cc-81ad-d26b05dc2be4       /               ext4            rw,relatime     0 1

# /dev/sda3
UUID=5d23fbfe-3671-445a-96bf-668b7f582854       /home           ext4            rw,relatime     0 2

# /dev/sda8
UUID=f8986e92-64e1-448c-940c-9e0e97f326e1       /home/Data      ext4            rw,relatime     0 2

# /dev/sda1
UUID=4DB7-14EF          /boot           vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixe$

Offline

#3 2019-01-31 21:02:54

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,659

Re: Trouble accessing data partition after mounting with liveUSB/genfstab

I can tell you that "ln -s" doesn't create a symlink but a usage help message and that you forgot to ask any kind of meaningful question.
Since I grasp your issues seem to revolve mounting /dev/sda8 into /home/Data, please post the ouputs of

mount
stat /home/Data

and in any event, please add a description of your actual problem at hand (what you want, expect and  see) - we cannot infer that from a random list of vague command references and your partition scheme.

Offline

#4 2019-02-01 17:22:01

Zhme
Member
Registered: 2017-06-11
Posts: 80

Re: Trouble accessing data partition after mounting with liveUSB/genfstab

Sorry for the vague post.  I am trying to use a partition that I previously made for data storage which I had planned to share with 2 other linux distributions which would have to be symlinked, bindmounted, or mounted as stated by some fellows here.  I had been content for some time without having to use the extra space until recently.  I tried to do a symbolic link with ln -s after reading in the man page that -s was the flag to create a symbolic link rather than a hard link.  After that didn't appear to be working (i.e. I had no access to the extra space) I attempted to use my liveUSB to remount each relevant mount point (/mnt, /mnt/home, /mnt/boot, /mnt/home/Data) and then to recreate my fstab file.

mount ouput

proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sys on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
dev on /dev type devtmpfs (rw,nosuid,relatime,size=4016860k,nr_inodes=1004215,mode=755)
run on /run type tmpfs (rw,nosuid,nodev,relatime,mode=755)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
/dev/sda2 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)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
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)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
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/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=25,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=17487)
mqueue on /dev/mqueue type mqueue (rw,relatime)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
/dev/sda1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/sda3 on /home type ext4 (rw,relatime)
/dev/sda8 on /home/Data type ext4 (rw,relatime)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=804728k,mode=700,uid=1000,gid=998)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=998)

mount | grep /dev/sda

/dev/sda2 on / type ext4 (rw,relatime)
/dev/sda1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro)
/dev/sda3 on /home type ext4 (rw,relatime)
/dev/sda8 on /home/Data type ext4 (rw,relatime)

stat /home/Data

  File: /home/Data
  Size: 4096      	Blocks: 8          IO Block: 4096   directory
Device: 808h/2056d	Inode: 2           Links: 3
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2019-01-31 13:12:08.202450663 -0600
Modify: 2019-01-31 13:02:35.000000000 -0600
Change: 2019-01-31 13:02:35.000000000 -0600
 Birth: -

Just to be clear, I want my data partition to be properly utilized just like the home partition is, while keeping in mind that sharing the data partition with more than one distribution could cause problems, as was explained to me in the other thread.  I expected that my attempt to 'ln -s' or to mount the partition would have worked.  What I see is a small amount of space from Disk Usage utility (4kb approximately) and permission denied when using some commands.

After looking around a bit more I noticed that I have been forgetting the implied /mnt where the root filesystem begins when making some directories.

I had confused /home/Data and /home/zhme/Data ---

I used ln -sf Data /home/Data to symbolically link (hopefully) and this is the output of stat after this was done.

stat /home/Data

  File: /home/Data
  Size: 4096      	Blocks: 8          IO Block: 4096   directory
Device: 808h/2056d	Inode: 2           Links: 3
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2019-02-01 11:09:10.262475010 -0600
Modify: 2019-02-01 11:08:53.279259734 -0600
Change: 2019-02-01 11:08:53.279259734 -0600
 Birth: -

stat /home/zhme/Data

  File: /home/zhme/Data
  Size: 4096      	Blocks: 8          IO Block: 4096   directory
Device: 803h/2051d	Inode: 525832      Links: 2
Access: (0755/drwxr-xr-x)  Uid: ( 1000/    zhme)   Gid: (  998/   wheel)
Access: 2019-02-01 11:10:03.715439611 -0600
Modify: 2019-02-01 11:09:29.722340305 -0600
Change: 2019-02-01 11:09:29.722340305 -0600
 Birth: -

I hope that I have posted relevant information and stated my question more clearly, please forgive me if otherwise and I'll try to fix it!

Offline

#5 2019-02-01 17:30:50

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,659

Re: Trouble accessing data partition after mounting with liveUSB/genfstab

/home/zhme/Data is a directory but I assume you'd like it to be a symlink to /home/Data?
Ensure the directory is empty, then rename or remove it and re-attempt "ln -s /home/Data ~/Data " (see the ln manpage, the first path is the target, the second one the link)
Ftr, you cannot hardlink directories.

Offline

#6 2019-02-01 18:51:22

Zhme
Member
Registered: 2017-06-11
Posts: 80

Re: Trouble accessing data partition after mounting with liveUSB/genfstab

So I deleted my users Data file and used ln -sf /home/Data ~/Data which created (and hopefully) symlinked the two locations.  Apparently I misinterpreted the meaning of directory and target in the man page and assumed the target was the source you plan on linking to.  After removing the current blunder and linking to a new and useful path I tried to "touch ~/Data file.txt" and got the error,

touch: cannot touch 'Data/file.txt': Permission denied

I issued sudo to complete the command but I worry that the permission may cause future problems O.o

Offline

#7 2019-02-01 20:42:34

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,659

Re: Trouble accessing data partition after mounting with liveUSB/genfstab

sudo chown -R <your_user>:<your_group> /home/Data

Offline

Board footer

Powered by FluxBB