Do these have the same effect when the drive has only one big partition?
udisks --unmount /dev/sdb
udisks --unmount /dev/sdb1
Well --- it depends. Basically, it depends on if the device is partitioned or not (used whole). If it has just one big partition, it's partitioned anyway.
I have a device (a Garmin GPS) that looks like an unpartioned disk, look (from the command mount
which shows the mounted devices):
/dev/sdc on /media/romano/GARMIN type vfat (rw,nosuid,nodev,uid=1153,gid=1001,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks2)
so this disk needs to be unmounted with umount /dev/sdc
.
Notice however that this is a bad thing in general, stemming from the age of floppy disks --- if you still have one of those, they were mostly unpartitioned. Devices should be partitioned, even if they have just one big partition. Otherwise a lot of things expecting it will not automount the thing --- it happens randomly on Trusty with my Garmin, too.
A normal disk when mounted look like this:
/dev/sdd1 on /media/romano/I2MTC15_RG type vfat (rw,nosuid,nodev,uid=1153,gid=1001,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks2)
so it has to be unmounted with umount /dev/sdd1
.
Anyway, getting it wrong will just throw an error...
[romano:~] % umount /dev/sdd
umount: /dev/sdd is not mounted (according to mtab)
You can unmount only a partition, not a disk. So it is /dev/sdb1
.
You can do it by
umount /dev/sdb1
too.
mkfs /dev/sdb
(don't try if there is anything important on the disk) and then you'll be able tomount /dev/sdb
and unmount it too. People usually use partitions for filesystems, but the whole disk device can be used too. It's more common on "small" devices like flash drives, CD-R or DVD-R, etc. – Nate Eldredge Oct 03 '15 at 20:46mkfs
the whole disk you will not have any partition left ;-) --- so this answer is tersely correct for a device "with one big partition" as the OP is asking. – Rmano Oct 04 '15 at 08:35