我有一个亚马逊EC2实例。我启动了一个卷并将其附加到/dev/sdj。我编辑了我的fstab文件,使其包含以下行然后挂载它(sudo mount /home/ec2-user/mydirectory)/dev/xvdj on /home/ec2-user/mydirectory type xfs (rw,noatime)
如果我选择较小的机器大小,我有更少的临时设备,因此它必须是设备的动态发现。.blockdevice that don't match xvda, reset ephemeral counter to 0
if blockdevice match regex xvd[e-h] create an entry in fstab for /d
是否有更多的Pythonic方法来获取Linux上可用磁盘设备名称的列表。def get_list_of_available_disk_device_names(): # any alpha'xvd' is Xen devices on Linux device_letters = [x[3] for x in os.list