0

I have a Debian 8 server with an external disk attached

$ sudo lsblk --fs
NAME    FSTYPE LABEL  UUID                                 MOUNTPOINT
sda     ext4          7169e849-0d6d-4094-b0f7-2daaeb1b1b00
vda
├─vda1  ext4   DOROOT 82446dcc-14f0-4e7f-ba53-4a256b379209 /
└─vda15

This is my /etc/fstab

# 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 installation
LABEL=DOROOT    /               ext4    errors=remount-ro 0       1
/dev/sr0        /media/cdrom0   udf,iso9660 user,noauto     0       0
/dev/disk/by-id/scsi-0DO_Volume_volume-sgp1-01 /mnt/vol1 ext4 defaults,nofail,user,noauto 0 0
#/dev/disk/by-id/scsi-0DO_Volume_volume-sgp1-01 /tmp ext4 defaults,nofail,user 0 0

I cannot mount the /dev/sda disk

$ ls /dev/disk/by-id/
scsi-0DO_Volume_volume-sgp1-01
$ ls -l /dev/disk/by-id/scsi-0DO_Volume_volume-sgp1-01
lrwxrwxrwx 1 root root 9 May 27 23:31 /dev/disk/by-id/scsi-0DO_Volume_volume-sgp1-01 -> ../../sda
$ sudo mount /dev/sda
mount: /dev/sda is already mounted or /mnt/vol1 busy
$ df -h -x tmpfs -x devtmpfs
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1        25G   21G  2.8G  89% /

For some reason the journalling daemon is picking up on the sda device.

$ ps aux | grep sda
root       989  0.0  0.0      0     0 ?        S    23:31   0:00 [jbd2/sda-8]

How can I successfully mount the disk?

Update 1

I am unable to mount nor unmount the disks

$ sudo mount -v /dev/sda    
mount: /dev/sda is already mounted or /mnt/vol1 busy    
$ sudo umount /dev/sda           
umount: /dev/sda: not mounted
$ sudo umount -f /dev/sda     
umount: /dev/sda: not mounted  

fdisk shows that the device is indeed /dev/sda and not /dev/sda1 etc

$ sudo fdisk -l

Disk /dev/vda: 25 GiB, 26843545600 bytes, 52428800 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 8B91C062-5A28-419D-9FBA-17F4EBA94861

Device     Start      End  Sectors Size Type
/dev/vda1   4096 52426751 52422656  25G Linux filesystem
/dev/vda15  2048     4095     2048   1M BIOS boot

Partition table entries are not in disk order.
Disk /dev/sda: 10 GiB, 10737418240 bytes, 20971520 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

$ ls -l /dev/sda*
brw-rw---- 1 root disk 8, 0 May 27 23:31 /dev/sda
$

This is a DigitalOcean virtual private server and /dev/sda is an attached disk volume.

Update 2

The following are information about the disk partition, showing that indeed it is ext4. I have mounted this disk before on another VM created from the same disk snapshot, and was able to read and write to the disk.

$ sudo file -sL /dev/sd*
/dev/sdb: Linux rev 1.0 ext4 filesystem data, UUID=7169e849-0d6d-4094-b0f7-2daaeb1b1b00 (extents) (large files) (huge files)
$ sudo parted -l
Model: DO Volume (scsi)
Disk /dev/sdb: 10.7GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags:

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

Update 3

The error mount: /dev/sda is already mounted or /mnt/vol1 busy is caused by jbd2

$ ps aux|grep jbd
root       389  0.0  0.0      0     0 ?        S    23:30   0:00 [jbd2/vda1-8]
root      2171  0.0  0.0      0     0 ?        S    23:32   0:00 [jbd2/sda-8]

My temporary solution is to comment out the device in /etc/fstab and reboot. Then I can manually mount the device

LABEL=DOROOT    /               ext4    errors=remount-ro 0       1
/dev/sr0        /media/cdrom0   udf,iso9660 user,noauto     0       0
#/dev/disk/by-id/scsi-0DO_Volume_volume-sgp1-01 /mnt/vol1 ext4 defaults,nofail,user,noauto 0 0

To narrow down my question, how can I get jbd2 to "release" the disk device so that I can manually mount it?

  • /dev/sda is a block device according to the output of ls. How did you mount it in other VPS's? Is it mounted on any of them right now? Is it a shared block device and is it set up to allow you to mount it on this particular machine? – Nasir Riley May 28 '18 at 2:29
  • @NasirRiley I just did a sudo mount /dev/sda and with the entry in /etc/fstab it was mounted correctly. I used the exact same disk image to mount the exact block volume. Only difference is this is a new VPS instance that is created from the snapshot. – hanxue May 28 '18 at 6:03
  • Your "update 2" is displaying info about sdb, not sda! – wurtel May 28 '18 at 14:45
  • @wurtel that is because I detached and re-attach my disk volume, so Debian now recognize it as sdb instead of sda – hanxue May 30 '18 at 22:54
  • Did you check the syslog for errors when attempting to mount? What's the output of the mount command when you can't mount it? – Lawrence May 31 '18 at 5:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.