Can't attach secondary hard disk after formatin

Before what I did, I could click on the devices icon in the system tray, select my secondary hard disk, attach it to one of my VM and inside that VM I could see a new hard disk appear in the file manager.

After formating that disk by running: sudo mkfs -t ntfs /dev/xvdi
I can no longer do what I did above. Now, when I attach the same disk to VM, I can’t see him in the file manager. I do able to see him by running the lsblk inside the VM.

I tried to run:
sudo mkdir -p /mt/xvdi
sudo mount -t auto /dev/xvdi /mt/xvdi
but it didn’t help. I’m afraid to run qvm-block… not sure if that’s the right thing.

What do I need to do so it will be as it was before?

What error did you get from mount command?

I didn’t get any error, it just passed and that’s it.
Was I supposed to run this in dom0 maybe?

If it didn’t give you an error then it should’ve succeed.
Check if it was mounted with this command:

mount | grep xvdi
df -h /mt/xvdi
1 Like

When I first run what you just said, it showed me that there’s no file or directory. But then I tried to mount again as I did before and then it did showed me my disk, but I can’t see him in the file manager.

You can access it at /mt/xvdi in file manager.

1 Like

Oh man, I feel so silly now :slight_smile:

How can I make so it will appear as before, next to my file system in the sidebar and not mounting it to /mt/xvdi? Do I leave that mountpoint empty or something else maybe?

It seems to only work for ext filesystem. Or at least it doesn’t work for vfat filesystem and I guess not for ntfs as well.
Maybe the fat/ntfs support could be somehow enabled but I don’t know how.
I don’t think it’s Qubes-specific issue so you can search for this issue with a general Linux systems.
It seems to work using GVFS.

1 Like

Thank you, got it working.

Apparently if you mount it to the media directory, it will catch out automatically.